Options
All
  • Public
  • Public/Protected
  • All
Menu

A composite handler that returns true if any of its handlers can handle the input and return true. Handler errors are interpreted as false results.

Type parameters

  • TIn

Hierarchy

Index

Constructors

Properties

handlers: AsyncHandler<TIn, boolean>[]
logger: Logger = ...

Methods

  • canHandle(input: TIn): Promise<void>
  • Checks if the input can be handled by this class. If it cannot handle the input, rejects with an error explaining why.

    Parameters

    • input: TIn

    Returns Promise<void>

    A promise resolving if the input can be handled, rejecting with an Error if not.

  • handle(input: TIn): Promise<boolean>
  • handleSafe(input: TIn): Promise<boolean>