Function findHandler

  • Finds a handler that can handle the given input data. Otherwise an error gets thrown.

    Type Parameters

    • TIn

    • TOut


    • handlers: AsyncHandler<TIn, TOut>[]

      List of handlers to search in.

    • input: TIn

      The input data.

    Returns Promise<AsyncHandler<TIn, TOut>>

    A promise resolving to a handler that supports the data or otherwise rejecting.