diff --git a/types/hapi__hapi/index.d.ts b/types/hapi__hapi/index.d.ts index fccdab64a3..b4b6b1abf8 100644 --- a/types/hapi__hapi/index.d.ts +++ b/types/hapi__hapi/index.d.ts @@ -1728,6 +1728,12 @@ export interface RouteOptionsApp { } export interface CommonRouteProperties { + /** + * Application-specific route configuration state. Should not be used by plugins which should use options.plugins[name] instead. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-routeoptionsapp) + */ + app?: RouteOptionsApp; + /** * @default null. * An object passed back to the provided handler (via this) when called. Ignored if the method is an arrow function. @@ -1986,12 +1992,6 @@ export interface RouteSettings extends CommonRouteProperties { * For context [See docs](https://github.com/hapijs/hapi/blob/master/API.md#route-options) */ export interface RouteOptions extends CommonRouteProperties { - /** - * Application-specific route configuration state. Should not be used by plugins which should use options.plugins[name] instead. - * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-routeoptionsapp) - */ - app?: RouteOptionsApp; - /** * Route authentication configuration. Value can be: * false to disable authentication if a default strategy is set. diff --git a/types/hapi__hapi/test/route/settings.ts b/types/hapi__hapi/test/route/settings.ts index 71bde5f453..45c0ff5fd6 100644 --- a/types/hapi__hapi/test/route/settings.ts +++ b/types/hapi__hapi/test/route/settings.ts @@ -1,9 +1,10 @@ -import { RouteSettings, AuthSettings, AccessSetting, AuthMode, AccessEntity, AccessScopes, RequestRoute } from '@hapi/hapi'; +import { RouteSettings, AuthSettings, AccessSetting, AuthMode, AccessEntity, AccessScopes, RequestRoute, RouteOptionsApp } from '@hapi/hapi'; declare let route: RequestRoute; const settings: RouteSettings = route.settings; const auth: AuthSettings | undefined = settings.auth; +const app: RouteOptionsApp | undefined = settings.app; const strats: string[] = auth!.strategies; const mode: AuthMode = auth!.mode; const access: AccessSetting[] | undefined = auth!.access;