fastify
Version:
Fast and low overhead web framework, for Node.js
19 lines (15 loc) • 352 B
text/typescript
import fastify from '../../fastify'
import { expectType } from 'tsd'
type TestType = void
declare module '../../fastify' {
interface FastifyRequest {
testProp: TestType;
}
interface FastifyReply {
testProp: TestType;
}
}
fastify().get('/', (req, res) => {
expectType<TestType>(req.testProp)
expectType<TestType>(res.testProp)
})