Type Alias ControllablePromise<T>

ControllablePromise<T>: Promise<T> & {
    reject: ((err?: unknown) => void);
    resolve: ((val: T) => void);
}

A promise that can be resolved or rejected from outside.

Type Parameters

  • T = unknown