Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Deferred<T>

Enables a Promise to be resolved or rejected at a future time, outside of the context of the Promise construction. Also exposes the pending, fulfilled, or rejected state of the promise.

Type parameters

  • T

Hierarchy

  • Deferred

Index

Constructors

Properties

Accessors

Methods

Constructors

constructor

Properties

promise

promise: Promise<T>

Accessors

fulfilled

  • get fulfilled(): boolean
  • Returns boolean

    true iff resolve has been invoked.

pending

  • get pending(): boolean
  • Returns boolean

    true iff resolve has been invoked.

rejected

  • get rejected(): boolean
  • Returns boolean

    true iff resolve has been invoked.

Methods

reject

  • reject(reason?: any): boolean
  • Parameters

    • Optional reason: any

    Returns boolean

resolve

  • resolve(value?: T): boolean

Generated using TypeDoc