diff --git a/types/hapi/definitions/response/response-toolkit.d.ts b/types/hapi/definitions/response/response-toolkit.d.ts index 876f00b7bc..8fb64a6ea3 100644 --- a/types/hapi/definitions/response/response-toolkit.d.ts +++ b/types/hapi/definitions/response/response-toolkit.d.ts @@ -57,7 +57,7 @@ export interface ResponseToolkit { * The [request] object. This is a duplication of the request lifecycle method argument used by * [toolkit decorations](https://github.com/hapijs/hapi/blob/master/API.md#server.decorate()) to access the current request. */ - request: Readonly + readonly request: Readonly /** * Used by the [authentication] method to pass back valid credentials where: diff --git a/types/hapi/definitions/server/server-route.d.ts b/types/hapi/definitions/server/server-route.d.ts index 763f70ccf2..7c9087bddd 100644 --- a/types/hapi/definitions/server/server-route.d.ts +++ b/types/hapi/definitions/server/server-route.d.ts @@ -1,4 +1,4 @@ -import {Lifecycle, Server, Util} from "hapi"; +import {Lifecycle, RouteOptions, Server, Util} from "hapi"; export interface ServerRouteConfig { } @@ -40,7 +40,7 @@ export interface ServerRoute { /** * additional route options. The options value can be an object or a function that returns an object using the signature function(server) where server is the server the route is being added to and this is bound to the current realm's bind option. */ - options?: object | ((server: Server) => object); + options?: RouteOptions | ((server: Server) => RouteOptions); /** * route custom rules object. The object is passed to each rules processor registered with server.rules(). Cannot be used if route.options.rules is defined.