CancelablePromise <T>
Implements
- Promise<T>
Index
Constructors
constructor
Type parameters
- T
Parameters
executor: (resolve: (value: T | PromiseLike<T>) => void, reject: (reason?: any) => void, onCancel: OnCancel) => void
Returns CancelablePromise<T>
Accessors
[toStringTag]
Returns string
publicisCancelled
Returns boolean
Methods
publiccancel
Returns void
publiccatch
Type parameters
- TResult = never
Parameters
optionalonRejected: (reason: any) => TResult | PromiseLike<TResult>
Returns Promise<T | TResult>
publicfinally
Parameters
optionalonFinally: () => void
Returns Promise<T>
publicthen
Type parameters
- TResult1 = T
- TResult2 = never
Parameters
optionalonFulfilled: (value: T) => TResult1 | PromiseLike<TResult1>
optionalonRejected: (reason: any) => TResult2 | PromiseLike<TResult2>
Returns Promise<TResult1 | TResult2>