diff --git a/types/hapi/index.d.ts b/types/hapi/index.d.ts index 65ce60be85..3c546f71f4 100644 --- a/types/hapi/index.d.ts +++ b/types/hapi/index.d.ts @@ -2704,7 +2704,7 @@ export interface ServerInjectResponse extends Shot.ResponseObject { * * * ttl - 0 if result is valid but cannot be cached. Defaults to cache policy. * For reference [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-servermethodname-method-options) */ -export type ServerMethod = (...args: any[]) => Promise; +export type ServerMethod = (...args: any[]) => any; /** * The same cache configuration used in server.cache(). diff --git a/types/hapi/test/server/server-method.ts b/types/hapi/test/server/server-method.ts index bb729516b7..39c3fdb9d7 100644 --- a/types/hapi/test/server/server-method.ts +++ b/types/hapi/test/server/server-method.ts @@ -6,7 +6,7 @@ const server = new Server({ }); server.start(); -const add = (a: any, b: any) => { +const add = (a: any, b: any): number => { return a + b; };