Skip to content
Malik Hamza Shabbir
Web Developmenttypescripttsgomonorepobuild-performance

TypeScript 7 Beta (tsgo): What Broke in My Real Monorepo

HSMalik Hamza Shabbir7 min read

In short

Five things broke when I pointed the TypeScript 7 beta at my production monorepo, and none of them were the compiler itself. The full type check dropped from 71 seconds to 9.2 seconds across roughly 161,000 lines of TypeScript, a 7.7x improvement that holds up to Microsoft's 10x claim once you account for my smaller project graph. Every failure came from tooling that stands next to the compiler: an editor plugin, a custom transformer, api-extractor, stale build caches, and ts-node. Here are my exact numbers, the exact failures, and whether you should switch before stable lands in a few weeks.

TypeScript 7 Beta (tsgo): What Broke in My Real Monorepo - branded cover card by Hamza Shabbir
On this page

What is TypeScript 7, and what exactly is tsgo?

TypeScript 7 is the existing TypeScript compiler ported from TypeScript to Go, shipped under the working name tsgo. The Beta was announced on April 21, 2026, and as of June 2026 the stable release is expected in late June or early July 2026. It is roughly 10x faster than tsc and it checks your code identically.

The single most important fact for migration planning: tsgo was ported, not rewritten. Its type-checking logic is structurally identical to TypeScript 6.0, so it accepts the same code and produces the same diagnostics. Microsoft moved the codebase function by function rather than redesigning it, which is why the beta is unusually trustworthy for a major version.

The headline benchmark is Microsoft's own: VS Code's 1.5 million-line codebase type-checks in 7.5 seconds with tsgo versus 78 seconds with tsc, with memory usage roughly halved. The beta is already default-enabled in Visual Studio 2026 18.6 Insiders as of June 2026, which tells you how confident the team is.

Trying it takes two minutes:

BASH
npm i -D @typescript/native-preview@beta
npx tsgo -p tsconfig.json --noEmit

You run tsgo wherever you ran tsc. Same flags, same tsconfig, same error codes.

How fast is tsgo on my real monorepo?

7.7x on a cold full check. My test bench is the pnpm monorepo behind my client web development work : a Next.js 16 app at about 96k lines of TS/TSX, a Node and Express API at about 38k lines built the way I structure all my API development projects , and four shared packages (types, UI, config, queue client) totaling about 27k lines. It is the same repo I documented in my Next.js 16 migration guide , so the numbers are comparable across posts.

I measured everything three times on the same machine and took the median:







Bar chart comparing TypeScript full type-check times, tsc at 71 seconds versus tsgo at 9.2 seconds, on a 161k-line production monorepo
Bar chart comparing TypeScript full type-check times, tsc at 71 seconds versus tsgo at 9.2 seconds, on a 161k-line production monorepo

Two notes on honesty. The CI number is diluted by checkout and dependency install, which tsgo cannot help with, so the job-level win is 3.4x rather than 7.7x. And the editor number changed how I work more than any other row: at 0.6 seconds in watch mode, type-checking moved out of CI and back into my inner loop. I had stopped running the checker locally because 71 seconds was long enough to context-switch away from. Now it runs on every save.

What actually broke when I switched?

Five things broke: a language-service plugin, a ts-patch transformer, api-extractor, mixed incremental caches, and ts-node. Zero type errors changed. Across 161k lines, tsgo produced the identical diagnostic set to tsc, byte for byte after sorting. The compiler kept its promise. The ecosystem around it did not.

The CSS modules language-service plugin stopped loading

I use typescript-plugin-css-modules for class-name completions in .module.css imports. The beta's language server does not load classic tsserver plugins, so the "plugins" entry in tsconfig is ignored and completions silently disappear. Workaround: I added a typed-css-modules codegen step that emits committed .d.ts files, which works under both compilers.

My ts-patch transformer was silently skipped

The Express API used a ts-patch transformer to generate route metadata at compile time. tsgo has no JavaScript transformer hook, so the build succeeded but the metadata object was missing, and the first request crashed with TypeError: Cannot read properties of undefined (reading 'routes'). Workaround: I moved the generation into a standalone codegen script that runs before the build. tsgo now checks with --noEmit and esbuild handles emit.

Compiler-API tools still need tsc installed

api-extractor and typedoc import the typescript package's JavaScript API. tsgo is a native binary with no compatible API surface, so pointing them at the preview package fails immediately with errors like TypeError: ts.createProgram is not a function. Workaround: keep typescript@6 installed as a devDependency purely for those tools. They run on tsc while every check runs on tsgo. Same answer applies to ts-morph if you use it.

Mixed .tsbuildinfo caches broke incremental --build

tsgo writes its own incremental state format. When my CI cache restored .tsbuildinfo files written by tsc, tsgo discarded them and re-checked the entire graph every run, which quietly erased most of the CI win for a week before I noticed. Workaround: set a distinct tsBuildInfoFile path per compiler, or bump your CI cache key when you switch.

ts-node drifted from the checker

Maintenance scripts ran under ts-node, which type-checks at runtime using whatever typescript package it resolves. After I removed TypeScript 6 from one workspace, those scripts crashed on startup. Workaround: I moved the scripts to tsx, which transpiles without checking. tsgo already checks everything in CI, so runtime checking was redundant anyway.

The compiler was the safest part of this migration. Everything that bit me was a tool standing next to the compiler, not the compiler itself.

How do I audit my own repo before switching?

Run a fifteen-minute audit before installing anything: inventory tsserver plugins, transformers, compiler-API tools, and runtime TypeScript execution, then diff diagnostics between both compilers. Here is the table I now run against every repo I touch:







Then roll out in this order:

  1. Install the preview alongside tsc, never as a replacement: npm i -D @typescript/native-preview@beta.

  2. Diff the diagnostics. Run both compilers with --noEmit and compare sorted output. Mine matched exactly.

  3. Add tsgo as a parallel, non-blocking CI job and let it run for a week of real commits.

  4. Flip the required gate to tsgo, and keep a nightly tsc run as a fallback gate until stable ships.

  5. Switch your editor last. The language server is the least mature surface in the beta.


How much money does tsgo actually save in CI?

About $11 a month for my repo, which is honestly not the point. The math: the type-check job dropped from 3m 40s to 1m 5s, saving roughly 2.6 minutes per run. I average 25 CI runs a day across pushes and PR matrices, so that is about 65 minutes a day, around 1,430 runner minutes a month, and at GitHub Actions' $0.008 per Linux minute, about $11.40.

Scale it and it stays modest: a ten-engineer team at 150 runs a day saves around $69 a month. The real return is the 65 minutes of human waiting removed from my day, because slow feedback compounds into context switches. When I take on app rescue and optimization work , CI latency is usually a symptom I find next to the actual disease, and tsgo is now the cheapest fix on that list.

Should you switch now or wait for stable?

App codebases should run tsgo in CI today with tsc as a fallback gate. Library authors and plugin-dependent repos should wait for stable and ecosystem support. That is the whole verdict, and it splits cleanly by what your repo depends on:





Measurementtsc 6.0tsgo 7.0 betaSpeedup
Cold full check (--build, all projects)71s9.2s7.7x
Watch mode, edit in shared types package4.1s0.6s6.8x
Editor, project-wide diagnostics refresh3 to 5sunder 1s~5x
CI type-check job, end to end3m 40s1m 5s3.4x
Peak memory, full check3.1 GB1.4 GB~2.2x less
What to checkCommandIt is a blocker if...
tsserver pluginsgrep -r '"plugins"' --include=tsconfig.json .you rely on a language-service plugin daily
Custom transformersgrep -r "ts-patch\ttypescript" package.jsontransformers run in your emit path
Compiler-API toolsgrep -E "ts-morph\typedoc\api-extractor" package.jsonthe tool has no TS7 support yet
Runtime TS executiongrep -r "ts-node" package.json .github/scripts depend on ts-node's checking
Diagnostics parityrun tsc --noEmit and tsgo --noEmit, diffthe error sets differ at all
Repo typeVerdictWhy
App codebase, you control the depsRun tsgo in CI now, keep a tsc fallback gateChecking is identical; the risk is tooling, and the fallback catches it
Library author shipping .d.tsWait for stableDeclaration-emit consumers and compiler-API tooling downstream of you are not ready
Plugin or transformer-dependentBlocked; track your specific tool's TS7 issueNo language-service plugin or transformer hooks in the beta

With stable expected weeks from now, "wait" is a short wait. My personal take: this is the second time in twelve months that a tool deleted an entire category of work from my hands. React Compiler 1.0 did it to manual memoization , and tsgo just did it to the habit of treating type-checking as a CI-only ceremony. The speedup is real and it changes behavior, not just numbers.

Key takeaways

  • TypeScript 7.0 Beta shipped April 21, 2026, with stable expected late June or early July 2026; it is the compiler ported to Go, not a rewrite, so it accepts the same code as 6.0.

  • On my 161k-line monorepo, the full check went from 71s to 9.2s and watch mode from 4.1s to 0.6s, consistent with Microsoft's 7.5s-versus-78s VS Code benchmark.

  • Nothing broke in type-checking itself. Everything that broke was adjacent tooling: tsserver plugins, transformers, compiler-API tools, mixed caches, and ts-node.

  • The CI dollar savings are small (about $11 a month for me); the real win is type-checking returning to the inner loop.

  • Verdict: app repos switch CI now with a tsc fallback; library authors and plugin-dependent repos wait for stable plus ecosystem support.

FAQ

Is TypeScript 7 a breaking change for existing code?

Not for the code itself. tsgo was ported function by function from the TypeScript 6.0 codebase, so its type-checking logic is structurally identical and my 161k-line repo produced zero new diagnostics. The breaking changes live in the tooling around the compiler: tsserver plugins, custom transformers, and anything built on the JavaScript compiler API.

How do I try tsgo in my project today?

Install the preview package alongside your existing TypeScript with `npm i -D @typescript/native-preview@beta`, then run `npx tsgo -p tsconfig.json --noEmit` exactly where you would run tsc. Same flags, same tsconfig. Diff its output against tsc's, add it as a non-blocking CI job for a week, then promote it to the required gate.

Why is tsgo 10x faster than tsc?

Two structural reasons: Go compiles to native code with no JavaScript startup or JIT warmup cost, and the port adds shared-memory parallelism so project graphs check across cores instead of mostly single-threaded. Memory drops roughly in half too. The algorithms are unchanged; the runtime underneath them is simply far better suited to a compiler workload.

Working on something like this?

I build web apps, AI features, and mobile products for clients. If this article matches a problem you have, tell me about it.

Start a conversation
HS

Malik Hamza Shabbir · Full-Stack & AI Engineer

I build full-stack and AI products solo: a reputation SaaS in production, RAG pipelines, and React Native apps. I write from what I ship, not from documentation summaries.

Related articles