Skip to content

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/tsc contain, and which package holds the executable it starts on Linux x64 and on macOS arm64?
  • How long does tsc take over this library's examples compared with TypeScript 6's tsc6 from @typescript/typescript6, measured on one machine?
  • What do --checkers, --builders and --singleThreaded change, 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 es5 report?

Examples it will need

  • typescript_7_native_binary_sh.sh — the two-line Node shim in bin/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 the typescript package 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, --baseUrl and --outFile

See also

Sources to start from