Config-only — mw(config) (or mw() for config-less) returns an
Entry for use in a pipeline array.
Handler — mw(config, handler) (or mw(handler)) returns the produced
fetch handler directly, with Base inferred from the handler's ctx type.
Base is constrained to In & BaseContext & NoConflict<Key, Base> so both
prerequisite enforcement and collision detection surface at the call site.
The shape of a middleware produced by defineMiddleware.
Two call signatures:
mw(config)(ormw()for config-less) returns an Entry for use in a pipeline array.mw(config, handler)(ormw(handler)) returns the produced fetch handler directly, withBaseinferred from the handler'sctxtype.Baseis constrained toIn & BaseContext & NoConflict<Key, Base>so both prerequisite enforcement and collision detection surface at the call site.