// Type definitions for mpromise 0.5.4 // Project: https://github.com/aheckmann/mpromise // Definitions by: Seulgi Kim // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped interface IResolveFunction { (err: R, ...args: F[]): void; (err: R, arg: F): void; } declare class Promise { constructor(fn?: IResolveFunction); static FAILURE: string; static SUCCESS: string; fulfill(...args: F[]): Promise; reject(reason: R): Promise; resolve(reason: R, ...args: F[]): Promise; resolve(reason: R, arg: F): Promise; onFulfill(callback: (...args: F[]) => void): Promise; onReject(callback: (err: R) => void): Promise; onResolve(callback: IResolveFunction): Promise; then(onFulfilled: (...values: F[]) => TRes | PromiseLike, onRejected?: (err: R) => TRes | PromiseLike): Promise; end(): void; chain(promise: Promise): Promise; } export = Promise;