Options
All
  • Public
  • Public/Protected
  • All
Menu

Class LazyPromise<T>

A Promise whose executor will not execute until the first time it is awaited.

Type parameters

  • T

Hierarchy

Index

Constructors

constructor

Accessors

[toStringTag]

  • get [toStringTag](): string

Methods

catch

  • catch<TF>(onrejected?: null | UnaryFn<unknown, TF | PromiseLike<TF>>): Promise<T | TF>

finally

  • finally(onfinally?: null | NullaryFn<void>): Promise<T>

then

  • then<TS, TF>(onfulfilled?: null | UnaryFn<T, TS | PromiseLike<TS>>, onrejected?: null | UnaryFn<unknown, TF | PromiseLike<TF>>): Promise<TS | TF>
  • Type parameters

    • TS = T

    • TF = never

    Parameters

    • Optional onfulfilled: null | UnaryFn<T, TS | PromiseLike<TS>>
    • Optional onrejected: null | UnaryFn<unknown, TF | PromiseLike<TF>>

    Returns Promise<TS | TF>

Static from

  • from<T>(create: NullaryFn<T | PromiseLike<T>>): LazyPromise<T>

Generated using TypeDoc