Module

x/wmill/gen/core/CancelablePromise.ts>CancelablePromise

Open-source developer platform to power your entire infra and turn scripts into webhooks, workflows and UIs. Fastest workflow engine (13x vs Airflow). Open-source alternative to Retool and Temporal.
Latest
class CancelablePromise
implements Promise<T>
import { CancelablePromise } from "https://dotland.deno.dev/x/wmill@v1.418.0/gen/core/CancelablePromise.ts";

Constructors

new
CancelablePromise(executor: (
resolve: (value: T | PromiseLike<T>) => void,
reject: (reason?: unknown) => void,
onCancel: OnCancel,
) => void
)

Properties

private
_isCancelled: boolean
private
_isRejected: boolean
private
_isResolved: boolean
private
optional
_reject: (reason?: unknown) => void
private
optional
_resolve: (value: T | PromiseLike<T>) => void
readonly
cancelHandlers: (() => void)[]
readonly
isCancelled: boolean
readonly
promise: Promise<T>
readonly
[Symbol.toStringTag]

Methods

cancel(): void
catch<TResult = never>(onRejected?: ((reason: unknown) => TResult | PromiseLike<TResult>) | null): Promise<T | TResult>
finally(onFinally?: (() => void) | null): Promise<T>
then<TResult1 = T, TResult2 = never>(onFulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | null, onRejected?: ((reason: unknown) => TResult2 | PromiseLike<TResult2>) | null): Promise<TResult1 | TResult2>