Function createHandlerChain

  • Creates a handler chain from an array of handlers.

    Use it like this:

    const handlerChain = createHandlerChain(handler1, handler2, handler3);
    

    or like this:

    const handlers = [handler1, handler2, handler3];
    const handlerChain = createHandlerChain(handlers);

    The function signature of all the handlers must be the same.

    Type Parameters

    • T
    • Args extends any[]

    Parameters

    Returns Handler<T, Args>

    A single handler function that executes all handlers in sequence