Skip to main content

Future <T>

Future is a wrapper around a native browser Promise to allow resolving/rejecting at any time

Index

Constructors

Properties

Accessors

Methods

Constructors

constructor

  • Type parameters

    • T

    Returns Future<T>

Properties

publicreadonlypromise

promise: Promise<T>

Accessors

publicisCompleted

  • get isCompleted(): boolean
  • Returns boolean

Methods

publicreject

  • reject(error: Error): void
  • Parameters

    • error: Error

    Returns void

publicresolve

  • resolve(value: T): void
  • Parameters

    • value: T

    Returns void