A helper function that creates a typed HttpMiddleware definition. Use this function to get full type inference for request data, files, and cookie data when defining inline middleware registrations.
The middleware registration configuration object.
The same middleware registration configuration object with inferred types.
defineHttpMiddleware(async ({ req, next }) => { ... }); Copy
defineHttpMiddleware(async ({ req, next }) => { ... });
IMPORT_PATH: "@daiso-tech/core/http-router/contracts"
"@daiso-tech/core/http-router/contracts"
A helper function that creates a typed HttpMiddleware definition. Use this function to get full type inference for request data, files, and cookie data when defining inline middleware registrations.