mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-19 16:49:45 +08:00
Fix for server route options type
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user