You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now I have to manually specify if its Async or not, but it would be nice to just have the type system infer this for me rather than having to explicitly mark it, is there a preferred way of typing preHandlers that are passed into routes?
Your Environment
defined in project source
The text was updated successfully, but these errors were encountered:
💬 I'm wondering how I should type my application code to use a Fastify preHandler outside of the route (extracted to a constant)
I've got this code here: https://github.com/lifeiscontent/fastify-example/pull/1/files
and I have created Application Types for the PreHandlers, but I'm wondering if there's a preferred way to do this.
Right now I have to manually specify if its Async or not, but it would be nice to just have the type system infer this for me rather than having to explicitly mark it, is there a preferred way of typing preHandlers that are passed into routes?
Your Environment
The text was updated successfully, but these errors were encountered: