From b65a79ab8bcb16f499ddc4861879792bacaf8e69 Mon Sep 17 00:00:00 2001 From: rafaelsouzaf Date: Sat, 9 Dec 2017 19:55:35 -0300 Subject: [PATCH] Many fix discovered with the tests cases. --- types/hapi/v17/definitions/server/server-method.d.ts | 6 +++--- types/hapi/v17/definitions/server/server-route.d.ts | 7 ++++++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/types/hapi/v17/definitions/server/server-method.d.ts b/types/hapi/v17/definitions/server/server-method.d.ts index e24f36cf74..c7d6e01446 100644 --- a/types/hapi/v17/definitions/server/server-method.d.ts +++ b/types/hapi/v17/definitions/server/server-method.d.ts @@ -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; } /** diff --git a/types/hapi/v17/definitions/server/server-route.d.ts b/types/hapi/v17/definitions/server/server-route.d.ts index b3c8e6fcee..caaa348fe0 100644 --- a/types/hapi/v17/definitions/server/server-route.d.ts +++ b/types/hapi/v17/definitions/server/server-route.d.ts @@ -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; + }