Type alias Deferred<T>

Deferred<T>: {
    reject: ((reason?: any) => void);
    resolve: ((value: T | PromiseLike<T>) => void);
    value: Promise<T>;
}

A deffered value that can be resolved at a later time outside of its closure.

Generic

T - value of the deffered

Type Parameters

  • T

Type declaration

  • reject: ((reason?: any) => void)
      • (reason?: any): void
      • Parameters

        • Optional reason: any

        Returns void

  • resolve: ((value: T | PromiseLike<T>) => void)
      • (value: T | PromiseLike<T>): void
      • Parameters

        • value: T | PromiseLike<T>

        Returns void

  • value: Promise<T>

Generated using TypeDoc