compeller icon indicating copy to clipboard operation
compeller copied to clipboard

feat: a response builder that returns the type of the response body as an object

Open simonireilly opened this issue 4 years ago • 0 comments

Currently, the responder interface is passive and returns an any type.

In order to allow a typed response, we should infer the type in the actual responder.

This might be a simple case of saying that the return type of a responder should extend any and allowing typescript to narrow the type once the function is actually called.

simonireilly avatar Jan 29 '22 11:01 simonireilly