Skip to content

PromiseWithResolvers<T>

Unofficial

A promise bundled with its resolve and reject callbacks, as returned by Promise.withResolvers().

Mirrors the ES2024 PromiseWithResolvers global so the typings stay consumable when the consumer’s lib only targets ES2022 (e.g. the minimum supported Obsidian installer, which runs on Node 16).

Import:

import type { PromiseWithResolvers } from '@obsidian-typings/obsidian-catalyst-latest';

Signature:

export interface PromiseWithResolvers<T>

Properties

PropertyTypeDescription
promisePromise<T>The pending promise.

Methods

MethodReturnsDescription
reject(reason?)voidRejects PromiseWithResolvers.promise.
resolve(value)voidResolves PromiseWithResolvers.promise.

Links to this page: