From 7495cb2c5cb70ad69efc7456664b9f391bbb680c Mon Sep 17 00:00:00 2001 From: Morten Christensen Date: Mon, 10 Apr 2017 18:42:59 +0200 Subject: [PATCH] hapi: use native promise types for async/await compatibility (#15568) * hapi: use native promise types for async/await compatibility * hapi: Updated version number --- types/hapi/index.d.ts | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/types/hapi/index.d.ts b/types/hapi/index.d.ts index 9d8f8f0120..dbfa3bf038 100644 --- a/types/hapi/index.d.ts +++ b/types/hapi/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for hapi 16.0.0 +// Type definitions for hapi 16.0.1 // Project: http://github.com/spumko/hapi // Definitions by: Jason Swearingen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -16,16 +16,9 @@ interface IDictionary { [key: string]: T; } -interface IThenable { - then(onFulfilled?: (value: R) => U | IThenable, onRejected?: (error: any) => U | IThenable): IThenable; - then(onFulfilled?: (value: R) => U | IThenable, onRejected?: (error: any) => void): IThenable; -} +export declare type IThenable = PromiseLike -interface IPromise extends IThenable { - then(onFulfilled?: (value: R) => U | IThenable, onRejected?: (error: any) => U | IThenable): IPromise; - then(onFulfilled?: (value: R) => U | IThenable, onRejected?: (error: any) => void): IPromise; - catch(onRejected?: (error: any) => U | IThenable): IPromise; -} +export declare type IPromise = Promise export interface IHeaderOptions { append?: boolean;