Class CancelablePromiseInternal<T>
- CancelablePromiseInternal
Constructors
constructor
- new CancelablePromiseInternal<T = any>(
__namedParameters: {
executor?: (
resolve: (value: T | PromiseLike<T>) => void,
reject: (reason?: any) => void,
onCancel: (cancelHandler: () => void) => void,
) => void;
internals?: Internals;
promise?: Promise<T>;
},
): CancelablePromiseInternal<T> Parameters
- __namedParameters: {
executor?: (
resolve: (value: T | PromiseLike<T>) => void,
reject: (reason?: any) => void,
onCancel: (cancelHandler: () => void) => void,
) => void;
internals?: Internals;
promise?: Promise<T>;
}
Properties
[toStringTag]
"[toStringTag]": string
Methods
cancel
- cancel(): void
Returns void
finally
- finally(
onfinally?: null | () => void,
runWhenCanceled?: boolean,
): CancelablePromise<T> Parameters
Optional
onfinally: null | () => voidOptional
runWhenCanceled: boolean
isCanceled
- isCanceled(): boolean
Returns boolean