typescript-go is Microsoft's staging repository for TypeScript 7, a native port of the TypeScript compiler and language service written in Go instead of TypeScript itself. It's aimed at TypeScript maintainers, tooling authors, and early adopters who want to try a faster compiler and language server before it merges into the main microsoft/TypeScript repo.
The project reimplements parsing, type checking, emit, and the language service in Go, matching the behavior of TypeScript 6.0 as closely as possible. It's not a new language or a fork with different semantics, it's meant to produce the same errors, types, and output as the existing JS-based compiler, just running natively.
tsgo CLI: a drop-in preview command line tool distributed via npm that works like tsc for compiling and checking projects.This repo fits developers who want to test the performance of a native TypeScript compiler on real projects and report bugs, or teams curious about early compile-time speedups on large codebases. It also suits contributors interested in compiler internals who want to help port remaining pieces, like the full API surface or watch mode.
It is not a good fit if you need a production-ready compiler today: the public API is marked "not ready," watch mode is only a prototype, and some tsconfig.json error messages are less helpful than in the JS compiler. Teams relying on advanced or edge-case module resolution modes may also hit gaps, since not all resolution modes are supported yet. If your workflow depends on programmatic use of the TypeScript API (plugins, custom build tools using the compiler API), stick with the standard typescript package until this API surface matures.
Install the preview package from npm and run it in place of tsc:
npm install @typescript/native-preview
npx tsgo # Use this as you would tsc.
Note that for TypeScript 7.0 RC and later releases, the command is renamed to tsc.
For editor integration, install the preview VS Code extension from the marketplace (TypeScriptTeam.native-preview), then enable it by adding this to your VS Code settings:
{
"js/ts.experimental.useTsgo": true
}
Before filing issues, check the feature status table in the README: items marked "done" are safe to report bugs against, items marked "in progress" only warrant panic reports, and items marked "prototype" or "not ready" shouldn't be relied on or reported against yet. See CHANGES.md in the repo for a list of intentional behavior differences from TypeScript 6.0.