Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface PromiseStack<K, T>

Abstraction to represent a class that performs chain functions and waits for each promise that the functions return.

Type parameters

  • K

  • T

Hierarchy

  • PromiseStack

Implemented by

Index

Properties

Methods

Properties

Readonly promises

promises: PromiseItemStack<K, T>[]

Get promises objects. Returns the functions that are still in the stack.

Methods

addPromise

  • Add promise in stack. The function is not called the moment it is added to the stack, but when it is your turn on the stack

    Parameters

    • key: K

      Key of promise array, to identify a function.

    • promiseFunction: FunctionPromise<T>

      function to generate the promise

    Returns Promise<T>

    A promise that resolves with the function's response.

flush

  • flush(): void

Generated using TypeDoc