Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/windmill/windmill-api/index.ts>CancelablePromise

Windmill deno client (separated from the main repo because most of the code is auto-generated from the openapi and not worth committing)
Go to Latest
class CancelablePromise
implements Promise<T>
import { CancelablePromise } from "https://deno.land/x/windmill@v1.146.1/windmill-api/index.ts";

Constructors

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

Properties

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

Methods

cancel(): void
catch<TResult = never>(onRejected?: ((reason: any) => 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: any) => TResult2 | PromiseLike<TResult2>) | null): Promise<TResult1 | TResult2>