Last active
May 14, 2020 08:12
-
-
Save iampeterbanjo/b9c965e3fbd38f6ae52da5db5a160691 to your computer and use it in GitHub Desktop.
fastify declaration merging for requests
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://github.com/fastify/help/issues/122 | |
import fastify from 'fastify' | |
declare module 'fastify' { | |
interface FastifyRequest< | |
HttpRequest, | |
Query = fastify.DefaultQuery, | |
Params = fastify.DefaultParams, | |
Headers = fastify.DefaultHeaders, | |
Body = any | |
> { | |
user: string | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment