Why You Should Maintain Type Definitions for Your JavaScript Project
summary
Fastify ships handwritten TypeScript declarations alongside its 97.3% JavaScript code so consumers get guaranteed, up-to-date types rather than relying on DefinitelyTyped. The talk explains using advanced generics — constraints and defaults and named generic parameters — to infer request/reply types across HTTP/HTTP2, shows a test setup using the tsd-style assertion library TST to assert type errors and expectations, and flags a missing type-coverage metric while outlining docs, examples, and v3 refactor plans for 2020.
AI-written summary · about
chapters (5)
- 0:00Start
- 6:14Generic Constraints and Generic Defaults
- 10:16Named Generic Parameters
- 13:01Documentation
- 14:01Frequently Asked Questions








