Closed FirstWhack closed 3 years ago
I see that this API is for static typing. It does not support dynamic inference, we must assert middleware or other directly as there is no simple way for NextApiRequest
to return a generic based on handler
s.
This is of course the best you can expect from a project written in JS but with types defined separately. I will close the issue
This code obviously runs fine and is written according to the example in the readme. I did take note that the readme suggests asserting as
NextApiResponse
. I'm here to argue that should be the default implementation (or the documentation updated to show the default)