TypeScript 7 — the compiler ported to Go¶
Level: 101 · for anyone who installs TypeScript today
Stub — an outline, not a lesson. There is no runnable example behind this page yet, so nothing on it has been through the check that backs every other claim in this library. The questions below are what the finished page has to answer.
One line: TypeScript 7 is the compiler ported to Go: bin/tsc in the npm package is a two-line Node script that starts a native executable which go version -m reports as built by go1.26.4 from microsoft/typescript-go, and require("typescript") now returns only a version.
Keywords: TypeScript 7, typescript-go, --checkers, --singleThreaded
What the finished page will answer¶
- What does
node_modules/typescript/bin/tsccontain, and which package holds the executable it starts on Linux x64 and on macOS arm64? - How long does
tsctake over this library's examples compared with TypeScript 6'stsc6from@typescript/typescript6, measured on one machine? - What do
--checkers,--buildersand--singleThreadedchange, and can the number of checkers change a result? - Why does
require("typescript")return only{ version, versionMajorMinor }, and what do tools that need the compiler API, such as typescript-eslint, install instead? - Which TypeScript 6 deprecations are errors in 7.0, and what does
--target es5report?
Examples it will need¶
-
typescript_7_native_binary_sh.sh— the two-line Node shim inbin/tsc,tsc --version, and a check that the executable it starts sits in the@typescript/typescript-<platform>-<arch>package for the current machine -
typescript_7_no_api_js.js— the keys of thetypescriptpackage when imported in 7.0: only the version fields -
typescript_7_removed_options_sh.sh— the TS5108 and TS5102 errors tsc 7.0.2 gives for--target es5,--moduleResolution node,--baseUrland--outFile
See also¶
tscandtsconfig.json— the defaults TypeScript 6 changed and 7 kept- Editor setup — the TypeScript 7 language server in VS Code and Zed
- ESLint — typescript-eslint, which still needs the TypeScript 6 API
- Documentation — where the announcements and the handbook live
- Rust: rustup: the
rustcyou run is not the compiler ↗ — another command on PATH that only stands in for the compiler - Rust: Pinning the toolchain: which compiler verified the answer keys? ↗ — pinning the compiler that verified the answer keys, in Rust