Many fix discovered with the tests cases.

This commit is contained in:
rafaelsouzaf
2017-12-09 19:55:35 -03:00
parent a476fcedc1
commit b65a79ab8b
2 changed files with 9 additions and 4 deletions

View File

@@ -30,9 +30,9 @@ export interface ServerMethodCache extends catbox.PolicyOptions {
* For reference [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-servermethodname-method-options)
*/
export interface ServerMethodOptions {
bind: object;
cache: ServerMethodCache;
generateKey: Function;
bind?: object;
cache?: ServerMethodCache;
generateKey?: Function;
}
/**

View File

@@ -32,7 +32,7 @@ export interface ServerRoute {
/**
* (required when handler is not set) the route handler function called to generate the response after successful authentication and validation.
*/
handler?: Lifecycle.Method;
handler?: Lifecycle.Method | object;
/**
* 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.
@@ -44,4 +44,9 @@ export interface ServerRoute {
*/
rules?: object;
/**
* TODO: Missing documentation. Exist only in examples and test files.
*/
config?: any;
}