/** TYPES */ /** A promise that exploits a single, memory-safe upstream subscription * to a single re-used Unpromise that persists for the VM lifetime of a * Promise. * * Calling unsubscribe() removes the subscription, eliminating * all references to the SubscribedPromise. */ export interface SubscribedPromise extends Promise { unsubscribe: () => void; } /** Duplicate of Promise interface, except each call returns SubscribedPromise */ export interface ProxyPromise extends Promise { subscribe: () => SubscribedPromise; then: (onfulfilled?: ((value: T) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => SubscribedPromise; catch: (onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined) => SubscribedPromise; finally: (onfinally?: (() => void) | null | undefined) => SubscribedPromise; } export type PromiseExecutor = (resolve: (value: T | PromiseLike) => void, reject: (reason?: any) => void) => void; /** A standard pattern for a resolvable, rejectable Promise, based * on the emerging ES2023 standard. Type ported from * https://github.com/microsoft/TypeScript/pull/56593 */ export interface PromiseWithResolvers { promise: Promise; resolve: (value: T | PromiseLike) => void; reject: (reason?: any) => void; } /** Given an array, this is the union of its members' types. */ export type MemberOf = Arr[number]; //# sourceMappingURL=types.d.ts.map