Skip to main content

DeferredPromise

Home > @backstage/types > DeferredPromise

A deferred promise that can be resolved or rejected later.

Signature:

export type DeferredPromise<TResolved = void, TRejected = Error> = Promise<TResolved> & {
resolve(value: TResolved | PromiseLike<TResolved>): void;
reject(reason?: TRejected): void;
};