Class Deferred<T>

A handle around a Promise, so it may be resolved or rejected from outside the Promise constructor.

Type Parameters

  • T = unknown

Hierarchy

  • Deferred

Constructors

Properties

Constructors

Properties

promise: Promise<T> = ...

The promise that gets resolved or rejected

reject: ((er: any) => void)

Type declaration

    • (er: any): void
    • Reject the promise

      Parameters

      • er: any

      Returns void

resolve: ((v: T) => void)

Type declaration

    • (v: T): void
    • Resolve the promise

      Parameters

      • v: T

      Returns void

Generated using TypeDoc