-
-
Notifications
You must be signed in to change notification settings - Fork 2.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
Wrong typings for hooks on route options #4376
Comments
likely so! |
It's a union between a onRequestHookHandler<...> (single value ) and a onRequestHookHandler<..>[] (array of values ) |
Given my understanding, yes, we should update this. Would you like to send a PR?
We probably didn't know there was a standard. Could you link? |
@mcollina i don't if google style guide is followed here, according to https://google.github.io/styleguide/tsguide.html#identifiers class / interface / type / enum / decorator / type parameters should use UpperCamelCase |
Hey, I have created a PR for above issue. 🙏 please review |
Based on PR fastify#4628 with signature fixed Closes fastify#4376
Based on PR fastify#4628 with signature fixed Closes fastify#4376
The in the snippet below, the hook types are a union of two identical types like
onRequestHookHandler<...> | onRequestHookHandler<...>
etc, and this excludes the async hook type, which should be valid to use here, right?Are these supposed to be
onRequestHookHandler<...> | onRequestAsyncHookHandler<...>
, etc?fastify/types/route.d.ts
Lines 48 to 56 in 5c75f49
The text was updated successfully, but these errors were encountered: