Optional
context?: TContextYou can provide addtional context that can be used in the middleware.
Optional
name?: stringThe name of the function which can be used for logging inside the middleware. By default, it takes the function or method name. If an anonymous function is provided, the name defaults to "func".
Optional
signalBinder?: AbortSignalBinder<TParameters>If the input function accepts an AbortSignal | AbortSignal
, you can bind it to the middleware by providing an AbortSignalBinder
.
This enables two-way abortion control: you can either abort the function from within the middleware, or abort the middleware from the function itself.
IMPORT_PATH:
"@daiso-tech/core/utilities"