Options
All
  • Public
  • Public/Protected
  • All
Menu

An AsyncValue provides a promise and as soon as the promise resolves or rejects, also exposes the returned value or error. It is useful for accessing a promise value in a synchronous context.

Type parameters

  • TValue

Hierarchy

  • AsyncValue

Index

Constructors

Properties

Constructors

constructor

  • new AsyncValue(promise: Promise<TValue>, value?: TValue, error?: Error): AsyncValue

Properties

Optional error

error: Error

Readonly promise

promise: Promise<TValue>

Optional value

value: TValue

Legend

  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Type alias
  • Type alias with type parameter
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Interface
  • Interface with type parameter

Generated using TypeDoc