@@ -3572,14 +3572,14 @@ declare module Reflect {
35723572 function setPrototypeOf ( target : any , proto : any ) : boolean ;
35733573}
35743574
3575- interface IPromise < T > {
3575+ interface PromiseLike < T > {
35763576 /**
35773577 * Attaches callbacks for the resolution and/or rejection of the Promise.
35783578 * @param onfulfilled The callback to execute when the Promise is resolved.
35793579 * @param onrejected The callback to execute when the Promise is rejected.
35803580 * @returns A Promise for the completion of which ever callback is executed.
35813581 */
3582- then < TResult > ( onfulfilled ?: ( value : T ) => TResult | IPromise < TResult > , onrejected ?: ( reason : any ) => TResult | IPromise < TResult > ) : IPromise < TResult > ;
3582+ then < TResult > ( onfulfilled ?: ( value : T ) => TResult | PromiseLike < TResult > , onrejected ?: ( reason : any ) => TResult | PromiseLike < TResult > ) : PromiseLike < TResult > ;
35833583}
35843584
35853585/**
@@ -3592,14 +3592,14 @@ interface Promise<T> {
35923592 * @param onrejected The callback to execute when the Promise is rejected.
35933593 * @returns A Promise for the completion of which ever callback is executed.
35943594 */
3595- then < TResult > ( onfulfilled ?: ( value : T ) => TResult | IPromise < TResult > , onrejected ?: ( reason : any ) => TResult | IPromise < TResult > ) : Promise < TResult > ;
3595+ then < TResult > ( onfulfilled ?: ( value : T ) => TResult | PromiseLike < TResult > , onrejected ?: ( reason : any ) => TResult | PromiseLike < TResult > ) : Promise < TResult > ;
35963596
35973597 /**
35983598 * Attaches a callback for only the rejection of the Promise.
35993599 * @param onrejected The callback to execute when the Promise is rejected.
36003600 * @returns A Promise for the completion of the callback.
36013601 */
3602- catch ( onrejected ?: ( reason : any ) => T | IPromise < T > ) : Promise < T > ;
3602+ catch ( onrejected ?: ( reason : any ) => T | PromiseLike < T > ) : Promise < T > ;
36033603
36043604 [ Symbol . toStringTag ] : string ;
36053605}
@@ -3616,23 +3616,23 @@ interface PromiseConstructor {
36163616 * a resolve callback used resolve the promise with a value or the result of another promise,
36173617 * and a reject callback used to reject the promise with a provided reason or error.
36183618 */
3619- new < T > ( executor : ( resolve : ( value ?: T | IPromise < T > ) => void , reject : ( reason ?: any ) => void ) => void ) : Promise < T > ;
3619+ new < T > ( executor : ( resolve : ( value ?: T | PromiseLike < T > ) => void , reject : ( reason ?: any ) => void ) => void ) : Promise < T > ;
36203620
36213621 /**
36223622 * Creates a Promise that is resolved with an array of results when all of the provided Promises
36233623 * resolve, or rejected when any Promise is rejected.
36243624 * @param values An array of Promises.
36253625 * @returns A new Promise.
36263626 */
3627- all < T > ( values : Iterable < T | IPromise < T > > ) : Promise < T [ ] > ;
3627+ all < T > ( values : Iterable < T | PromiseLike < T > > ) : Promise < T [ ] > ;
36283628
36293629 /**
36303630 * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved
36313631 * or rejected.
36323632 * @param values An array of Promises.
36333633 * @returns A new Promise.
36343634 */
3635- race < T > ( values : Iterable < T | IPromise < T > > ) : Promise < T > ;
3635+ race < T > ( values : Iterable < T | PromiseLike < T > > ) : Promise < T > ;
36363636
36373637 /**
36383638 * Creates a new rejected promise for the provided reason.
@@ -3653,7 +3653,7 @@ interface PromiseConstructor {
36533653 * @param value A promise.
36543654 * @returns A promise whose internal state matches the provided promise.
36553655 */
3656- resolve < T > ( value : T | IPromise < T > ) : Promise < T > ;
3656+ resolve < T > ( value : T | PromiseLike < T > ) : Promise < T > ;
36573657
36583658 /**
36593659 * Creates a new resolved promise .
0 commit comments