interface Thenable < R > { then < U > ( onFulfilled ? , onRejected ? ) : Thenable < U > ; then < U > ( onFulfilled ? , onRejected ? ) : Thenable < U > ; } declare class Promise < R > implements Thenable < R > { /**
     * If you call resolve in the body of the callback passed to the constructor,
     * your promise is fulfilled with result object passed to resolve.
     * If you call reject your promise is rejected with the object passed to reject.
     * For consistency and debugging (eg stack traces), obj should be an instanceof Error.
     * Any errors thrown in the constructor callback will be implicitly passed to reject().
     */ constructor ( callback ) ; param onFulfilled param onRejected then < U > ( onFulfilled ? , onRejected ? ) ; then < U > ( onFulfilled ? , onRejected ? ) ; param onRejected catch < U > ( onRejected ? ) ; } declare module Promise { /**
     * Make a new promise from the thenable.
     * A thenable is promise-like in as far as it has a "then" method.
     */ function resolve < R > ( value ? ) ; /**
     * Make a promise that rejects to obj. For consistency and debugging (eg stack traces), obj should be an instanceof Error
     */ function reject ( error ) ; /**
     * Make a promise that fulfills when every item in the array fulfills, and rejects if (and when) any item rejects.
     * the array passed to all can be a mixture of promise-like objects and other objects.
     * The fulfillment value is an array (in order) of fulfillment values. The rejection value is the first rejection value.
     */ function all < R > ( promises ) ; /**
     * Make a Promise that fulfills when any item fulfills, and rejects if any item rejects.
     */ function race < R > ( promises ) ; } declare module 'es6-promise' { var foo ; module rsvp { export var Promise ; } export = rsvp ; }