fix(types): infer response type from last handler in app.on 9- and 10-handler overloads (#4865)
Before adoption: this commit came in with the history the project adopted, so no landing records it.
The 9- and 10-handler `app.on` overloads declared `R` on the last handler position but discarded it, hardcoding `MergeTypedResponse<HandlerResponse<any>>` in the schema instead. This caused the inferred `output` to collapse to `{} | Promise<void>` regardless of what the response handler returned. Affected overloads: - app.on(method, path, handler x10) - app.on(method[], path, handler x9) - app.on(method[], path, handler x10) The 8-handler variants were already using `MergeTypedResponse<R>` correctly.
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
2 files+50 added−3 removed
- tests:+47 added−0 removed
- other:+3 added−3 removed