-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Export endpoint request type #664
Comments
Yeah, this makes sense. I'd suggest we keep it simple and just have |
Shouldn't this be resolved already, as |
kit/packages/kit/types/endpoint.d.ts Lines 21 to 27 in aed1bd0
Which is exposed publicly as kit/packages/kit/types/index.d.ts Lines 7 to 15 in aed1bd0
|
Is your feature request related to a problem? Please describe.
I'd like for an endpoint request object to be typed equal to
RequestHandlerResponse
.Describe the solution you'd like
It's pretty straightforward, though I'm not sure about naming. For reference, Next.js has named their equivalent types
NextApiRequest
andNextApiResponse
.Describe alternatives you've considered
As of now, I'm declaring the type myself.
How important is this feature to you?
For direct usage of the
RequestHandler
function, you inherit typings from the function type, but constructing a standalone request object requires custom type declaration which is a pain in comparison with how small of a change it is to export the type.Additional context
An alternative declaration (following current naming):
The text was updated successfully, but these errors were encountered: