[{"data":1,"prerenderedAt":4},["ShallowReactive",2],{"post-content-typescript-7-native-compiler-what-changes":3},"\u003Cp>Last week I ran \u003Ccode>tsc --noEmit\u003C\u002Fcode> on our main app and went to make coffee. By the time I came back, it was still running. Ninety seconds of staring at a blinking cursor, every single time I touched a shared type. That was just the check — the editor was doing its own slow dance in the background, re-indexing the whole project whenever I switched branches.\u003C\u002Fp>\n\n\u003Cp>Then I tried the native preview. The same command finished in under nine seconds.\u003C\u002Fp>\n\n\u003Cp>That's the story of TypeScript 7: the compiler is no longer written in JavaScript. It's written in Go now, and it changes more about your daily workflow than any type-system feature could. Here's what actually changes — and what doesn't, because a lot of the hype skips that part.\u003C\u002Fp>\n\n\u003Ch2>What Actually Happened\u003C\u002Fh2>\n\n\u003Cp>Microsoft didn't announce a new type system or a new language. They rewrote the compiler itself. The JavaScript-based \u003Ccode>tsc\u003C\u002Fcode> that shipped with TypeScript 5.9 was the last of its line. TypeScript 7 is the native port, built in Go, running as a real compiled binary instead of a giant JavaScript program interpreted at runtime.\u003C\u002Fp>\n\n\u003Cp>That's why the version numbers jump straight from 5.9 to 7. There was never a 6. The team decided the rewrite was significant enough to skip a number, and honestly, for anyone who's waited on a big type-check, it earns it.\u003C\u002Fp>\n\n\u003Cp>Microsoft's own benchmarks put the native compiler at roughly \u003Cstrong>10x faster type checking\u003C\u002Fstrong>. Their demo checked the entire VS Code codebase — over a million lines of TypeScript — in about 13 seconds. The JavaScript compiler took minutes. My own project went from 90 seconds to 8.6, which tracks.\u003C\u002Fp>\n\n\u003Ch2>Why the Old Compiler Was Slow in the First Place\u003C\u002Fh2>\n\n\u003Cp>The old compiler wasn't slow because TypeScript's type checking is inherently expensive. It was slow because the checker ran inside a JavaScript runtime, which brings two problems.\u003C\u002Fp>\n\n\u003Cp>First, \u003Cstrong>JIT warm-up\u003C\u002Fstrong>. V8 has to interpret and optimize the compiler code itself before it gets fast. On a cold start, you eat that cost every single time. That's why short-lived commands like \u003Ccode>tsc --noEmit\u003C\u002Fcode> in CI felt disproportionately slow — they never lived long enough to benefit from the warm-up.\u003C\u002Fp>\n\n\u003Cp>Second, \u003Cstrong>memory pressure\u003C\u002Fstrong>. A big project's type graph is huge, and JavaScript's garbage collector spends real time managing all those objects. The Go version lays out data more densely and cleans up after itself with a fraction of the overhead. Lower memory, less GC churn, faster everything.\u003C\u002Fp>\n\n\u003Cp>The core algorithm is the same. The constraint solver, the inference rules, the structural typing — all of it carried over. It's the same TypeScript you know, just no longer running on a JavaScript interpreter that was never designed to be a compiler runtime.\u003C\u002Fp>\n\n\u003Ch2>What Changes for You\u003C\u002Fh2>\n\n\u003Cp>Three things, in my experience, and they're all the ones you feel daily:\u003C\u002Fp>\n\n\u003Cul>\n\u003Cli>\u003Cstrong>Builds.\u003C\u002Fstrong> Type-checking was the last slow step in the frontend pipeline. Everything else — bundling, minifying, tree-shaking — got fast years ago. Now the type-check is fast too. CI type-check jobs that took three minutes take twenty seconds.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>The editor.\u003C\u002Fstrong> This is the sleeper win. VS Code's language server uses the same compiler, so the native speedup lands in IntelliSense, go-to-definition, and project load. Files that used to take a second to respond now snap. On a big monorepo, the editor finally feels like it's running on a local project instead of a remote one.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Watch mode.\u003C\u002Fstrong> \u003Ccode>tsc --watch\u003C\u002Fcode> was always the poor cousin of bundler watch modes. Now it's genuinely usable for incremental type-checking while you code, which pairs well with \u003Ccode>noEmit\u003C\u002Fcode> projects.\u003C\u002Fli>\n\u003C\u002Ful>\n\n\u003Cp>One more subtle change: because checking is cheap, you start running it more. I added a type-check to my pre-commit hook, something I would never have done when it cost ninety seconds each time. Cheap checks change your habits, and better habits beat better tooling every time.\u003C\u002Fp>\n\n\u003Ch2>What Doesn't Change\u003C\u002Fh2>\n\n\u003Cp>This is the part the hype posts skip, so pay attention.\u003C\u002Fp>\n\n\u003Cp>\u003Cstrong>Your TypeScript code is exactly the same.\u003C\u002Fstrong> TypeScript 7 is not TypeScript 6-with-new-syntax. There are no new type features, no changed inference rules, no \"Go-flavored\" anything. If your code compiles on 5.9, it compiles on 7 — the language semantics are identical. The rewrite was about performance, not behavior.\u003C\u002Fp>\n\n\u003Cp>\u003Cstrong>Your \u003Ccode>tsconfig.json\u003C\u002Fcode> mostly survives.\u003C\u002Fstrong> The vast majority of options carry over unchanged. The caveat: deprecated flags that had been warning for years finally got deleted. If you were living with \u003Ccode>moduleResolution: node\u003C\u002Fcode>, \u003Ccode>importsNotUsedAsValues\u003C\u002Fcode>, or old-school \u003Ccode>out\u003C\u002Fcode> flags in your config, the upgrade will tell you, loudly, and it's a ten-minute cleanup.\u003C\u002Fp>\n\n\u003Cp>\u003Cstrong>Bundlers don't care.\u003C\u002Fstrong> Vite, esbuild, and webpack never type-checked your code anyway — they strip types and move on. If your build felt \"TypeScript-y,\" it wasn't checking anything. That's been true for years. TypeScript 7 doesn't change it, which is exactly why running a real \u003Ccode>tsc --noEmit\u003C\u002Fcode> in CI matters more than ever.\u003C\u002Fp>\n\n\u003Ch2>Migrating a Real Project\u003C\u002Fh2>\n\n\u003Cp>The upgrade itself is boring, which is the best thing I can say about it:\u003C\u002Fp>\n\n\u003Cpre>\u003Ccode class=\"language-bash\">npm install -D typescript@^7\nnpx tsc --noEmit\n\u003C\u002Fcode>\u003C\u002Fpre>\n\n\u003Cp>That's the whole migration for most projects. Fix whatever the deleted flags complain about, then enjoy the speed.\u003C\u002Fp>\n\n\u003Cp>Two things to check beyond the obvious:\u003C\u002Fp>\n\n\u003Cul>\n\u003Cli>\u003Cstrong>Tooling that uses the compiler API.\u003C\u002Fstrong> Tools like \u003Ccode>ts-node\u003C\u002Fcode>, \u003Ccode>ts-jest\u003C\u002Fcode>, and \u003Ccode>typescript-eslint\u003C\u002Fcode> hook into the compiler's JavaScript API, and the native rewrite changed that surface. By now the major ones ship support, but check the version you're on before upgrading. If you use \u003Ccode>typescript-eslint\u003C\u002Fcode>, make sure you're on a release that declares TypeScript 7 support — the error messages when you get this wrong are unhelpful.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Watch for the removed flags.\u003C\u002Fstrong> Grep your config and your build scripts for \u003Ccode>moduleResolution: node\u003C\u002Fcode>, \u003Ccode>out\u003C\u002Fcode>, \u003Ccode>importsNotUsedAsValues\u003C\u002Fcode>, and \u003Ccode>charset\u003C\u002Fcode>. Replace them with modern equivalents before you switch, not after.\u003C\u002Fli>\n\u003C\u002Ful>\n\n\u003Cpre>\u003Ccode class=\"language-json\">\u002F\u002F tsconfig.json — the modern basics that just work on TS7\n{\n  \"compilerOptions\": {\n    \"module\": \"esnext\",\n    \"moduleResolution\": \"bundler\",\n    \"target\": \"es2022\",\n    \"strict\": true,\n    \"noEmit\": true\n  }\n}\n\u003C\u002Fcode>\u003C\u002Fpre>\n\n\u003Cp>One real gotcha: if you're on a monorepo with workspace tooling that shells out to \u003Ccode>tsc\u003C\u002Fcode> by name, make sure your package manager resolves the new binary everywhere. I've seen CI pipelines where one workspace picked up TypeScript 7 and another stayed on 5.9, and the type errors that surfaced were confusing until we realized the two were checking different things.\u003C\u002Fp>\n\n\u003Ch2>Should You Upgrade Today?\u003C\u002Fh2>\n\n\u003Cp>For most projects: yes, and it's a low-risk one. The language is identical, the config migration is small, and the payoff shows up in every single command you run. If you're on a large codebase or a monorepo, the editor speedup alone is worth the ten minutes.\u003C\u002Fp>\n\n\u003Cp>The main reason to wait is exotic tooling. If you depend on a plugin or a build tool that digs deep into the old compiler API, check its TypeScript 7 support first. For everyone else, there's no real reason to sit on 5.9.\u003C\u002Fp>\n\n\u003Cp>And once you're on it, put the speed to work. Add \u003Ccode>tsc --noEmit\u003C\u002Fcode> to your pre-commit hook. Run it in CI on every PR. The whole point of a fast type-checker is that you stop rationing your checks — and the project I migrated to TypeScript 7 last week has already caught two type regressions that would have shipped.\u003C\u002Fp>\n\n\u003Cp>One thing that helped me through the migration: I saved my updated \u003Ccode>tsconfig.json\u003C\u002Fcode> and the pre-commit hook script into my \u003Ca href=\"\u002Fsnippetark\u002F\">Snippet Ark\u003C\u002Fa> library, so every new project starts from the same verified baseline instead of a half-remembered config from three jobs ago. If you keep your own collection of configs and commands, you know exactly what I mean — what's the one migration command or config you keep retyping on every new project? Save it somewhere better than a random GitHub gist.\u003C\u002Fp>\n",1787133717908]