What is the method to integrate a property into an interface via declarations, while avoiding full object overwriting?
declare module 'fastify' {
interface FastifyRequest {
user: User;
}
}
//auth.ts
...
const user = jwt.verify(
req.headers.authorization ?? '', // Error: Property 'headers' does not exist on type 'FastifyRequest'
...