Lessons Learned Converting Snyk Codebase to TypeScript
summary
Snyk spends 18 months migrating a 300‑repo codebase to TypeScript and reports concrete wins and costs: a one‑day prototype, 300 repos tracked by a script, a necessary forked tap to run tests with ts‑node, 10–14s incremental compile slowdowns until removed allowJs, and a switch from tap to jest. The migration yields immediate bug finds (unused params, wrong shapes), easier refactors via shared types, and a gradual convert‑as‑you‑touch strategy with measurable progress.
AI-written summary · about
chapters (17)
- 0:00Start
- 3:09Union Type
- 4:38Intersection Type
- 5:20Interface inside an interface
- 6:04Enums
- 6:59Type checking
- 7:28Unused code
- 7:39Type inference
- 8:10Signature hints
- 9:12tsconfig.json
- 10:26Custom Tap script
- 15:32Example conversion js = ts
- 20:39Random extra parameters
- 22:30Cat type
- 22:49Animal type
- 23:00Cat API body type
- 24:01Cat Service
related talks
31mJavaScript That Scales
24mTypeScript and how I've learned to love the compiler
26mAdopting Typescript at Scale
38mPorting 100K lines of code to TypeScript
28mThe Secret To Fast TypeScript
30mTypeScript: Seeing Past the Hype
35mTypeScript at Google
40mTypeScript and Your Codebase: They Deserve Each Other!
