Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IPiece

A generic middleware pipeline function that can either continue the pipeline or interrupt it. Can return a promise to wait on before next piece executed.

The next function should be called to continue on to the next piece in the stack. It can be called with a single, optional argument: either the provided done function or a new function that eventually calls done, to execute logic after the stack completes. If the argument is not given, the provided done will be assumed.

Hierarchy

  • IPiece

Callable

  • __call(state: State, next: function, done: IPieceDone): Promise<any> | any
  • A generic middleware pipeline function that can either continue the pipeline or interrupt it. Can return a promise to wait on before next piece executed.

    The next function should be called to continue on to the next piece in the stack. It can be called with a single, optional argument: either the provided done function or a new function that eventually calls done, to execute logic after the stack completes. If the argument is not given, the provided done will be assumed.

    Parameters

    Returns Promise<any> | any

Generated using TypeDoc