Defines a WinterTC middleware function with type inference.
A convenience helper that ensures the provided handler conforms to the
WinterTcMiddlewareFn signature while preserving exact parameter
and return types. This allows TypeScript to infer narrower types in the
handler body without needing explicit annotations.
Use this when defining middleware functions to get accurate type checking
and IntelliSense without sacrificing type safety.
Defines a WinterTC middleware function with type inference.
A convenience helper that ensures the provided handler conforms to the WinterTcMiddlewareFn signature while preserving exact parameter and return types. This allows TypeScript to infer narrower types in the handler body without needing explicit annotations.
Use this when defining middleware functions to get accurate type checking and IntelliSense without sacrificing type safety.