Promise import { Promise } from "destack:async"; Value produced by asynchronous execution. A promise never rejects in Destack: recoverable failure remains an explicit Result value, and panic remains the Worker fault boundary. Every observer receives the same copyable value. export class Promise { constructor(executor: ((T) => void) => void); then(onFulfilled: (T) => Promise): Promise; then(onFulfilled: (T) => U): Promise; finally(onFinally: () => Promise): Promise; finally(onFinally: () => void): Promise; static resolve(value: Promise): Promise; static resolve(value: T): Promise; static all(values: Iterable>): Promise; static race(values: Iterable>): Promise; static withResolvers(): PromiseResolvers; static block(promise: Promise): T; } language/library/src/async/promise.ds:15:307 Members constructor(executor: ((T) => void) => void) Create a promise from an eager executor. then(onFulfilled: (T) => Promise): Promise Continue when the promise fulfills, adopting the returned promise. then(onFulfilled: (T) => U): Promise Continue when the promise fulfills. finally(onFinally: () => Promise): Promise Continue after the promise fulfills, adopting the returned promise. finally(onFinally: () => void): Promise Continue after the promise fulfills, keeping the value. static resolve(value: Promise): Promise Return an existing promise. static resolve(value: T): Promise Create a fulfilled promise. static all(values: Iterable>): Promise Wait for all promises. static race(values: Iterable>): Promise Wait for the first fulfilled promise. static withResolvers(): PromiseResolvers Create a promise with an exposed resolving function. static block(promise: Promise): T Block the current fiber until a promise fulfills.