UNPKG

352 BPlain TextView Raw
1import fastify from '../../fastify'
2import { expectType } from 'tsd'
3
4type TestType = void
5
6declare module '../../fastify' {
7 interface FastifyRequest {
8 testProp: TestType;
9 }
10 interface FastifyReply {
11 testProp: TestType;
12 }
13}
14
15fastify().get('/', (req, res) => {
16 expectType<TestType>(req.testProp)
17 expectType<TestType>(res.testProp)
18})