-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Closed
Labels
Description
Prerequisites
- I have written a descriptive issue title
- I have searched existing issues to ensure the bug has not already been reported
Fastify version
4.24.0
Plugin version
No response
Node.js version
18
Operating system
Linux
Operating system version (i.e. 20.04, 11.3, 10)
22
Description
Fastify docs mentioned that you can get the registered handler in onRequest hook by request.routeOptions.hndler, but there handler doesn't exist in the typeof routerOptions
app.addHook('onRequest', (req, res, done) => {
// Property 'handler' does not exist on type 'Readonly<RequestRouteOptions<unknown, FastifySchema>>'
console.log( req.routeOptions.handler);
done();
});
};
Steps to Reproduce
.
Expected Behavior
No response
Reactions are currently unavailable