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