@ue-too/board / index / createHandlerChain
関数: createHandlerChain()
createHandlerChain<
T,Args>(...handlers):Handler<T,Args>
定義: packages/board/src/utils/handler-pipeline.ts:31
型パラメーター
T
T
Args
Args extends any[]
パラメータ
handlers
Array of handler functions to be chained
Handler<T, Args>[] | [Handler<T, Args>[]]
戻り値
Handler<T, Args>
A single handler function that executes all handlers in sequence
Description
Creates a handler chain from an array of handlers.
Use it like this:
typescript
const handlerChain = createHandlerChain(handler1, handler2, handler3);or like this:
typescript
const handlers = [handler1, handler2, handler3];
const handlerChain = createHandlerChain(handlers);The function signature of all the handlers must be the same. (if they're not, you need to explicitly specify the type for the handler chain)