Developing TypeScript's Isolated Declarations
summary
A new flag in TypeScript 5.5 called --isolatedDeclarations enforces emissionable types so declaration files can be generated without full type checking, enabling parallel builds across projects. Bloomberg with Google and Microsoft prototype a standalone declaration emitter, an IDE quick fix to insert inferred types, and a per-worker AST cache. On a 23-project sample build isolated declarations drops a 33s run to 22s, competes with tsc -b at 27.9s, and with caching yields ~40% faster builds and up to 3x speedups on large CI machines.
AI-written summary · about
chapters (27)
- 0:00in this talk…
- 0:43Titian, TypeScript, and the talk
- 1:17what is Isolated Declarations?
- 2:10motivation for Isolated Declarations
- 3:01building in parallel
- 4:04what does TypeScript do?
- 6:10parallel for monorepos with --isolatedDeclarations
- 6:56the more (companies who need isolated declarations) the merrier
- 7:20how it started
- 8:15FAQ: “do I have to add type annotations to everything?”
- 9:16level 0: no inference
- 10:10level 1: trivial inference
- 11:43level 2: optimistic inference
- 12:40optimistic inference: typeof variable
- 13:57optimistic inference: constructor name
- 14:53optimistic inference: computed properties
- 16:42optimistic inference conclusion: out of scope (mostly)
- 17:42making this easier with a quick fix
- 18:48how fast can we get?
- 20:04how is tsc --b so fast ?!?
- 21:00adding an AST cache
- 21:56monorepo parallelization results
- 22:39what’s in TypeScript 5.5?
- 23:18what we still want to do
- 24:33what can you do?
- 25:25thank you to everyone involved
- 25:53audience questions and answers
related talks
28mTypescript Performance: Going Beyond The Surface
28mThe Secret To Fast TypeScript
23mJSDocs: It's like TypeScript but without all that TypeScript
36mStarting TypeScript Leaving JavaScript as JS
40mTypeScript: State of the Union
01h 02mExploring TypeScript
23mTypescript Is SO SLOW...Or Is It?
36mNavigating TypeScript Performance for Better Dev Experience
