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-public-latest';Signature:
export interface PromiseWithResolvers<T>Properties
| Property | Type | Description | |
|---|---|---|---|
| promise | Promise<T> | The pending promise. |
Methods
| Method | Returns | Description | |
|---|---|---|---|
| reject(reason?) | void | Rejects PromiseWithResolvers.promise. | |
| resolve(value) | void | Resolves PromiseWithResolvers.promise. |
Links to this page: