Type Alias AsyncHooksSettings<TParameters, TContext>

AsyncHooksSettings: {
    context?: TContext;
    name?: string;
    signalBinder?: AbortSignalBinder<TParameters>;
}

IMPORT_PATH: "@daiso-tech/core/utilities"

Type Parameters

Type declaration

  • Optionalcontext?: TContext

    You can provide addtional context that can be used in the middleware.

  • Optionalname?: string

    The 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".

  • OptionalsignalBinder?: 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.