Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Deferred<T>

Simple implementation of the deferred pattern. An object that exposes a promise and functions to resolve and reject it.

Type parameters

  • T

Hierarchy

  • Deferred

Index

Properties

Properties

promise

promise: Promise<T> = new Promise<T>((resolve, reject) => {this.resolve = resolve;this.reject = reject;})

reject

reject: (err?: any) => void

Type declaration

    • (err?: any): void
    • Parameters

      • Optional err: any

      Returns void

resolve

resolve: (value?: T) => void

Type declaration

    • (value?: T): void
    • Parameters

      • Optional value: T

      Returns void