fix(types): infer response type from last handler in app.on 9- and 10-handler overloads (#4865)
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. T
tako._.v committed
1aa32fb91e7bc1366811d80ebcce61ec0d0c68cb
Parent: c37ba26
Committed by GitHub <noreply@github.com>
on 4/8/2026, 10:18:15 AM