update as per comment

This commit is contained in:
Steve Jenkins
2016-11-22 08:42:09 +00:00
parent 27a1db59ce
commit b952cbe30b
+1 -18
View File
@@ -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;