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

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

Type Parameters

  • T

Properties

promise: Promise<T>

The promise which will resolve.

reject: ((e) => void)

Rejects the promise.

Type declaration

    • (e): void
    • Parameters

      • e: unknown

        an error

      Returns void

resolve: ((val) => void)

Call this function to full fill the promise.

Type declaration

    • (val): void
    • Parameters

      • val: T

        the result

      Returns void

Generated using TypeDoc