Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "HandlerResult"

Index

Variables

Const FailurePromise

FailurePromise: Promise<HandlerResult> = Promise.resolve(Failure)

Default failure result wrapped in a promise.

Const SuccessPromise

SuccessPromise: Promise<HandlerResult> = Promise.resolve(Success)

Default success result wrapped in a promise.

Functions

failure

reduceResults

  • Combine an array of HandlerResults into a single HandlerResult. Each HandlerResult.code is summed into the final, single value and messages are concatenated, separated by a semicolon (;). Useful to combine the return value from calling Promise.all on the array of events sent to an event handler.

    Parameters

    Returns HandlerResult

    single, combined result

success

Object literals

Const Failure

Failure: object

Default failure result.

code

code: number = 1

Const Success

Success: object

Default success result.

code

code: number = 0

Generated using TypeDoc