@@ -1184,6 +1184,19 @@ declare type ClassDecorator = <TFunction extends Function>(target: TFunction) =>
11841184declare type PropertyDecorator = ( target : Object , propertyKey : string | symbol ) => void ;
11851185declare type MethodDecorator = < T > ( target : Object , propertyKey : string | symbol , descriptor : TypedPropertyDescriptor < T > ) => TypedPropertyDescriptor < T > | void ;
11861186declare type ParameterDecorator = ( target : Object , propertyKey : string | symbol , parameterIndex : number ) => void ;
1187+
1188+ declare type PromiseConstructorLike = new < T > ( executor : ( resolve : ( value ?: T | PromiseLike < T > ) => void , reject : ( reason ?: any ) => void ) => void ) => PromiseLike < T > ;
1189+
1190+ interface PromiseLike < T > {
1191+ /**
1192+ * Attaches callbacks for the resolution and/or rejection of the Promise.
1193+ * @param onfulfilled The callback to execute when the Promise is resolved.
1194+ * @param onrejected The callback to execute when the Promise is rejected.
1195+ * @returns A Promise for the completion of which ever callback is executed.
1196+ */
1197+ then < TResult > ( onfulfilled ?: ( value : T ) => TResult | PromiseLike < TResult > , onrejected ?: ( reason : any ) => TResult | PromiseLike < TResult > ) : PromiseLike < TResult > ;
1198+ then < TResult > ( onfulfilled ?: ( value : T ) => TResult | PromiseLike < TResult > , onrejected ?: ( reason : any ) => void ) : PromiseLike < TResult > ;
1199+ }
11871200declare type PropertyKey = string | number | symbol ;
11881201
11891202interface Symbol {
@@ -4759,17 +4772,6 @@ declare module Reflect {
47594772 function setPrototypeOf ( target : any , proto : any ) : boolean ;
47604773}
47614774
4762- interface PromiseLike < T > {
4763- /**
4764- * Attaches callbacks for the resolution and/or rejection of the Promise.
4765- * @param onfulfilled The callback to execute when the Promise is resolved.
4766- * @param onrejected The callback to execute when the Promise is rejected.
4767- * @returns A Promise for the completion of which ever callback is executed.
4768- */
4769- then < TResult > ( onfulfilled ?: ( value : T ) => TResult | PromiseLike < TResult > , onrejected ?: ( reason : any ) => TResult | PromiseLike < TResult > ) : PromiseLike < TResult > ;
4770- then < TResult > ( onfulfilled ?: ( value : T ) => TResult | PromiseLike < TResult > , onrejected ?: ( reason : any ) => void ) : PromiseLike < TResult > ;
4771- }
4772-
47734775/**
47744776 * Represents the completion of an asynchronous operation
47754777 */
@@ -4789,6 +4791,7 @@ interface Promise<T> {
47894791 * @returns A Promise for the completion of the callback.
47904792 */
47914793 catch ( onrejected ?: ( reason : any ) => T | PromiseLike < T > ) : Promise < T > ;
4794+ catch ( onrejected ?: ( reason : any ) => void ) : Promise < T > ;
47924795
47934796 [ Symbol . toStringTag ] : string ;
47944797}
0 commit comments