Transports a promise which can be resolved or rejected using the given functions. Created by createManualPromise.

interface ManualPromise<T> {
    promise: Promise<T>;
    reject: (e: unknown) => void;
    resolve: (val: T) => void;
}

Type Parameters

  • T

Properties

promise: Promise<T>

The promise which will resolve.

reject: (e: unknown) => void

Rejects the promise.

Type declaration

    • (e: unknown): void
    • Parameters

      • e: unknown

        an error

      Returns void

resolve: (val: T) => void

Call this function to full fill the promise.

Type declaration

    • (val: T): void
    • Parameters

      • val: T

        the result

      Returns void