Arguments passed to middleware functions during execution.
Contains the original function arguments, a reference to the next middleware in the chain, and the execution context for accessing and modifying state.
Type of arguments passed to the function
Type of value returned from the function
The arguments passed to the original function
Execution context for state management
Function to call the next middleware or final function
const loggingMiddleware: MiddlewareFn = ({ args, next, context }) => { console.log('Before:', args); const result = next(args); console.log('After:', result); return result;}; Copy
const loggingMiddleware: MiddlewareFn = ({ args, next, context }) => { console.log('Before:', args); const result = next(args); console.log('After:', result); return result;};
NextFn
MiddlewareFn
IContext
IMPORT_PATH: @daiso-tech/core/middleware
@daiso-tech/core/middleware
Arguments passed to middleware functions during execution.
Contains the original function arguments, a reference to the next middleware in the chain, and the execution context for accessing and modifying state.