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
{{ message }}
Repository navigation
Using a different decorator name with TypeScript #344
How can I make TypeScript understand that I have a new property jwtUser?
I have tried the following but it doesn't seem to work:
// fastify-jwt.d.tsimport'@fastify/jwt';importtype{ObjectId}from'mongodb';typeUserPayload={id: ObjectId};typeDecodedUser=UserPayload;declare module '@fastify/jwt'{interfaceFastifyJWT{// payload type is used for signing and verifyingpayload: UserPayload;// user type is return type of `request.user` objectjwtUser: DecodedUser;}interfaceFastifyRequest{jwtUser: DecodedUser;}}declare module 'fastify'{interfaceFastifyInstance{authenticate: FastifyMiddleware;}}
Link to code that reproduces the bug
No response
Expected Behavior
No response
### Tasks
Reacted by Timo Santi, Logan Luo, Sebastian Drozd, Dan Gee, Dyesse YUMBA, Dennis Daume and Abdugani Toshmukhamedov
Activity