From b923c71fdc270a721d0976abd60407dc66d082de Mon Sep 17 00:00:00 2001 From: rafaelsouzaf Date: Sat, 16 Dec 2017 22:30:30 -0300 Subject: [PATCH] Replace "interface ServerMethod" with "type ServerMethod". Suggestion of @SimonSchick --- types/hapi/definitions/server/server-method.d.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/types/hapi/definitions/server/server-method.d.ts b/types/hapi/definitions/server/server-method.d.ts index c7d6e01446..af6f5b79ff 100644 --- a/types/hapi/definitions/server/server-method.d.ts +++ b/types/hapi/definitions/server/server-method.d.ts @@ -7,10 +7,7 @@ import * as catbox from "catbox"; * * * 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 interface ServerMethod { -// (args: any[], flags: {ttl?: number}): any; - (...args: any[]): any; // TODO it needs review. Look the doc: the first param is a ...args and the second is "flags". Typescript supports ...args only in the last param -} +export type ServerMethod = (...args: any[]) => any; /** * The same cache configuration used in server.cache().