Options
All
  • Public
  • Public/Protected
  • All
Menu

Class FutureBase<T>

Future base properties/methods.

Type parameters

  • T

Hierarchy

  • FutureBase

Index

Constructors

constructor

  • Returns FutureBase

Properties

Private _exception

_exception: Exception
internal

Private _result

_result: T
internal

Private _state

_state: FutureState
internal

Methods

getException

  • getException(): Exception
  • Gets the exception if rejected.

    Returns Exception

getResult

  • getResult(): T
  • Gets the result if resolved.

    Returns T

getState

  • getState(): FutureState
  • Gets the current state.

    Returns FutureState

getTypeString

  • getTypeString(): string
  • Returns string

Protected setException

  • setException(value: Exception): void
  • Sets the exception if rejected.

    Parameters

    • value: Exception

    Returns void

Protected setResult

  • setResult(value: T): void
  • Sets the result if resolved.

    Parameters

    • value: T

    Returns void

Protected setState

  • setState(value: FutureState): void
  • Sets the current state.

    Parameters

    • value: FutureState

    Returns void