mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-12-03 11:41:44 +00:00
update as per comment
This commit is contained in:
Vendored
+1
-18
@@ -3,21 +3,4 @@
|
||||
// Definitions by: Steve Jenkins <https://github.com/skysteve>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
export as namespace Promise;
|
||||
|
||||
export = Promise;
|
||||
declare var Promise: Promise.IPromise;
|
||||
|
||||
declare namespace Promise {
|
||||
export interface IPromise {
|
||||
new <T>(resolver: (resolve: (value: T) => void, reject: (reason: any) => void) => void): IThenable<T>;
|
||||
resolve: <T>(value: T) => IThenable<T>;
|
||||
reject: <T>(value: T) => IThenable<T>;
|
||||
all: (array: Array<IThenable<any>>) => IThenable<Array<any>>;
|
||||
}
|
||||
|
||||
export interface IThenable<T> {
|
||||
then<R>(onFulfilled?: (value: T) => IThenable<R>|R, onRejected?: (error: any) => IThenable<R>|R): IThenable<R>;
|
||||
catch<R>(onRejected?: (error: any) => IThenable<R>|R): IThenable<R>;
|
||||
}
|
||||
}
|
||||
export default Promise;
|
||||
Reference in New Issue
Block a user