mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-24 05:06:02 +08:00
hapi: use native promise types for async/await compatibility (#15568)
* hapi: use native promise types for async/await compatibility * hapi: Updated version number
This commit is contained in:
13
types/hapi/index.d.ts
vendored
13
types/hapi/index.d.ts
vendored
@@ -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 <http://github.com/jasonswearingen>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
@@ -16,16 +16,9 @@ interface IDictionary<T> {
|
||||
[key: string]: T;
|
||||
}
|
||||
|
||||
interface IThenable<R> {
|
||||
then<U>(onFulfilled?: (value: R) => U | IThenable<U>, onRejected?: (error: any) => U | IThenable<U>): IThenable<U>;
|
||||
then<U>(onFulfilled?: (value: R) => U | IThenable<U>, onRejected?: (error: any) => void): IThenable<U>;
|
||||
}
|
||||
export declare type IThenable<R> = PromiseLike<R>
|
||||
|
||||
interface IPromise<R> extends IThenable<R> {
|
||||
then<U>(onFulfilled?: (value: R) => U | IThenable<U>, onRejected?: (error: any) => U | IThenable<U>): IPromise<U>;
|
||||
then<U>(onFulfilled?: (value: R) => U | IThenable<U>, onRejected?: (error: any) => void): IPromise<U>;
|
||||
catch<U>(onRejected?: (error: any) => U | IThenable<U>): IPromise<U>;
|
||||
}
|
||||
export declare type IPromise<R> = Promise<R>
|
||||
|
||||
export interface IHeaderOptions {
|
||||
append?: boolean;
|
||||
|
||||
Reference in New Issue
Block a user