File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 4
4
// Definitions: https://github.com/borisyankov/DefinitelyTyped
5
5
6
6
interface Thenable < R > {
7
- then < U > ( onFulfilled ?: ( value : R ) => U | Thenable < U > , onRejected ?: ( error : any ) => U | Thenable < U > ) : Thenable < U > ;
7
+ then < U > ( onFulfilled ?: ( value : R ) => U | Thenable < U > , onRejected ?: ( error : any ) => U | Thenable < U > ) : Thenable < U > ;
8
+ then < U > ( onFulfilled ?: ( value : R ) => U | Thenable < U > , onRejected ?: ( error : any ) => void ) : Thenable < U > ;
8
9
}
9
10
10
11
declare class Promise < R > implements Thenable < R > {
@@ -27,7 +28,8 @@ declare class Promise<R> implements Thenable<R> {
27
28
* @param onFulfilled called when/if "promise" resolves
28
29
* @param onRejected called when/if "promise" rejects
29
30
*/
30
- then < U > ( onFulfilled ?: ( value : R ) => U | Thenable < U > , onRejected ?: ( error : any ) => U | Thenable < U > ) : Promise < U > ;
31
+ then < U > ( onFulfilled ?: ( value : R ) => U | Thenable < U > , onRejected ?: ( error : any ) => U | Thenable < U > ) : Promise < U > ;
32
+ then < U > ( onFulfilled ?: ( value : R ) => U | Thenable < U > , onRejected ?: ( error : any ) => void ) : Promise < U > ;
31
33
32
34
/**
33
35
* Sugar for promise.then(undefined, onRejected)
You can’t perform that action at this time.
0 commit comments