CancelablePromise<T>
Type parameters
Name |
---|
T |
Implements
Promise
<T
>
Table of contents
Constructors
Properties
Accessors
Methods
Constructors
constructor
• new CancelablePromise<T
>(executor
)
Type parameters
Name |
---|
T |
Parameters
Name | Type |
---|---|
executor | (resolve : (value : T | PromiseLike <T >) => void , reject : (reason? : any ) => void , onCancel : OnCancel ) => void |
Defined in
src/client/core/CancelablePromise.ts:31
Properties
[toStringTag]
• Readonly
[toStringTag]: string
Implementation of
Promise.__@toStringTag@26
Defined in
src/client/core/CancelablePromise.ts:21
_cancelHandlers
• Private
Readonly
_cancelHandlers: () => void
[]
Defined in
src/client/core/CancelablePromise.ts:26
_isCancelled
• Private
_isCancelled: boolean
Defined in
src/client/core/CancelablePromise.ts:25
_isRejected
• Private
_isRejected: boolean
Defined in
src/client/core/CancelablePromise.ts:24
_isResolved
• Private
_isResolved: boolean
Defined in
src/client/core/CancelablePromise.ts:23
_promise
• Private
Readonly
_promise: Promise
<T
>
Defined in
src/client/core/CancelablePromise.ts:27
_reject
• Private
Optional
_reject: (reason?
: any
) => void
Type declaration
▸ (reason?
): void
Parameters
Name | Type |
---|---|
reason? | any |
Returns
void
Defined in
src/client/core/CancelablePromise.ts:29
_resolve
• Private
Optional
_resolve: (value
: T
| PromiseLike
<T
>) => void
Type declaration
▸ (value
): void
Parameters
Name | Type |
---|---|
value | T | PromiseLike <T > |
Returns
void
Defined in
src/client/core/CancelablePromise.ts:28
Accessors
isCancelled
• get
isCancelled(): boolean
Returns
boolean
Defined in
src/client/core/CancelablePromise.ts:121
Methods
cancel
▸ cancel(): void
Returns
void
Defined in
src/client/core/CancelablePromise.ts:102
catch
▸ catch<TResult
>(onRejected?
): Promise
<T
| TResult
>
Type parameters
Name | Type |
---|---|
TResult | never |
Parameters
Name | Type |
---|---|
onRejected? | null | (reason : any ) => TResult | PromiseLike <TResult > |
Returns
Promise
<T
| TResult
>
Implementation of
Promise.catch
Defined in
src/client/core/CancelablePromise.ts:92
finally
▸ finally(onFinally?
): Promise
<T
>
Parameters
Name | Type |
---|---|
onFinally? | null | () => void |
Returns
Promise
<T
>
Implementation of
Promise.finally
Defined in
src/client/core/CancelablePromise.ts:98
then
▸ then<TResult1
, TResult2
>(onFulfilled?
, onRejected?
): Promise
<TResult1
| TResult2
>
Type parameters
Name | Type |
---|---|
TResult1 | T |
TResult2 | never |
Parameters
Name | Type |
---|---|
onFulfilled? | null | (value : T ) => TResult1 | PromiseLike <TResult1 > |
onRejected? | null | (reason : any ) => TResult2 | PromiseLike <TResult2 > |
Returns
Promise
<TResult1
| TResult2
>
Implementation of
Promise.then