🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket
Back

Security News

TypeScript Native Previews: 10x Faster Compiler Now on npm for Public Testing

TypeScript Native Previews offers a 10x faster Go-based compiler, now available on npm for public testing with early editor and language support.

TypeScript Native Previews: 10x Faster Compiler Now on npm for Public Testing

Sarah Gooding

May 23, 2025

Two months after announcing its bold plan to port the TypeScript compiler from JavaScript to Go, Microsoft has officially released the first public preview builds of its new native compiler. Branded as TypeScript Native Previews, the release brings the project, codenamed Corsa, into the hands of developers via npm and a preview VS Code extension.

Back in March 2025, the TypeScript team revealed that moving to Go could deliver 10x faster builds, dramatically lower memory usage, and improved editor performance by eliminating JavaScript’s runtime limitations and unlocking true concurrency. Now, developers can finally try it themselves.

10x Speed Boost Through Go and Concurrency#

Initial benchmarks on large real-world codebases are already delivering on the hype. The team reports that the Sentry codebase, which took over a minute to type-check with the existing compiler, now completes the same task in under 7 seconds using the new native binary.

Microsoft engineer Jake Bailey confirmed on Bluesky that the gains are widespread: “The embarrassingly parallel stuff is more than 10x. Checking is about 10x. We do it concurrently by spawning multiple checkers.”

This performance leap is powered by the move to Go, which supports native execution and shared memory concurrency, something JavaScript fundamentally lacks.

Available Now via npm and as a VS Code Extension#

The preview compiler can now be installed with:

npm install -D @typescript/native-preview

Thep package supports an executable tsgo that mirrors the behavior of tsc but runs the new Go-based compiler. Eventually, it will replace tsc, but for now it lives in its own package to allow side-by-side testing.

npx tsgo --project ./src/tsconfig.json

Developers using VS Code can also install the "TypeScript (Native Preview)" extension from the marketplace. Editor features like hover and completions are available today, though advanced capabilities like rename, find-all-references, and auto-imports are still in development. Extension users can expect to get automatic updates as development progresses.

JSX and JavaScript Type-Checking Now Supported#

Since the initial native preview work began, the team has added full support for JSX and JavaScript with JSDoc annotations, closing a major feature gap. JSX support enables real-world React projects to benefit from the speed gains without sacrificing type safety.

Meanwhile, JavaScript checking has been rewritten from scratch for the native compiler, discarding legacy heuristics in favor of simpler, more maintainable rules.

Known Gaps and Compatibility Changes

While powerful, the current preview lacks some features from the stable compiler:

  • --build mode is not yet supported
  • Declaration emit (--declaration) is unavailable
  • Downlevel targets like ES5 are unsupported
  • Settings like baseUrl are deprecated in favor of nodenext or bundler resolution

On Bluesky, some developers have already shared migration pain points, like having to drop baseUrl. Microsoft recommends switching to modern module settings and using generated .d.ts files where needed.

Runtime panics can occur on large repos, and preview builds currently lack debug symbols. Jake Bailey recommends building the compiler from source to troubleshoot, or filing an issue even if you can't provide a complete reproducible example.

Looking Ahead to TypeScript 7#

These nightly previews are the precursor to TypeScript 7.0, expected later this year. Microsoft plans to incrementally restore missing functionality while expanding support for language service features and project builds.

The current JavaScript-based compiler (nicknamed Strada) will continue to be supported throughout the TypeScript 6.x series. However, development focus is shifting toward the new Go-based implementation, with the goal of eventual full adoption.

Subscribe to our newsletter

Get notified when we publish new security blog posts!

Try it now

Ready to block malicious and vulnerable dependencies?

Install GitHub AppBook a demo

Related posts

Back to all posts