// Type definitions for promises-a-plus // Project: http://promisesaplus.com/ // Definitions by: Igor Oleinikov // Definitions: https://github.com/borisyankov/DefinitelyTyped declare module PromisesAPlus { interface PromiseCtor { (resolver: (resolvePromise: (value: T) => void, rejectPromise: (reason: any) => void) => void): Thenable; } interface PromiseImpl { new (resolver: (resolvePromise: (value: T) => void, rejectPromise: (reason: any) => void) => void): Thenable; } interface Thenable { then(onFulfill: (value: R) => Thenable, onReject: (error: any) => Thenable): Thenable; then(onFulfill: (value: R) => Thenable, onReject?: (error: any) => U): Thenable; then(onFulfill: (value: R) => U, onReject: (error: any) => Thenable): Thenable; then(onFulfill?: (value: R) => U, onReject?: (error: any) => U): Thenable; } }