Last active
October 11, 2018 10:02
-
-
Save Gerhut/8ed8cb7e832775ec9266b8a3a02553ba to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export interface IThennable<Value, Reason> { | |
| then< | |
| FulfilledValue = never, FulfilledReason = never, | |
| RejectedValue = never, RejectedReason = never, | |
| >( | |
| onFulfilled?: (value: Value) => FulfilledValue | IThennable<FulfilledValue, FulfilledReason>, | |
| onRejected?: (reason: Reason) => RejectedValue | IThennable<RejectedValue, RejectedReason>, | |
| ): IThennable<FulfilledValue | RejectedValue, FulfilledReason | RejectedReason>; | |
| } | |
| export default interface IPromise<Value, Reason> extends IThennable<Value, Reason> { | |
| catch<RejectedValue = never, RejectedReason = never>( | |
| onRejected?: (reason: Reason) => RejectedValue | IThennable<RejectedValue, RejectedReason>, | |
| ): IThennable<RejectedValue, RejectedReason>; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment