Fix for server route options type

This commit is contained in:
Justin Simms
2018-02-08 23:56:29 -06:00
parent b7edd5c1db
commit 5763bd6353
2 changed files with 3 additions and 3 deletions

View File

@@ -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<Request>
readonly request: Readonly<Request>
/**
* Used by the [authentication] method to pass back valid credentials where:

View File

@@ -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.