typescript-go README

The project's README from github.com/microsoft/typescript-go. As one markdown file: README.md.

This Repo Is Closed

This was the staging repo for the TypeScript 7.0 release during the native port process, which is now completed!

Please continue development and discussion in the original repo

This repo will be permanently archived in September 2026.

TypeScript 7

Not sure what this is? Read the announcement post!

Preview

A preview build is available on npm as @typescript/native-preview.

npm install @typescript/native-preview
npx tsgo # Use this as you would tsc.

For TypeScript 7.0 RC and later, the command name is tsc.

A preview VS Code extension is available on the VS Code marketplace.

To use this, set this in your VS Code settings:

{
    "js/ts.experimental.useTsgo": true
}

What Works So Far?

This is still a work in progress and is not yet at full feature parity with TypeScript. Bugs may exist. Please check this list carefully before logging a new issue or assuming an intentional change.

Feature Status Notes
Program creation done Same files and module resolution as TS 6.0. Not all resolution modes supported yet.
Parsing/scanning done Exact same syntax errors as TS 6.0
Commandline and tsconfig.json parsing done Done, though tsconfig errors may not be as helpful.
Type resolution done Same types as TS 6.0.
Type checking done Same errors, locations, and messages as TS 6.0. Types printback in errors may display differently.
JavaScript-specific inference and JSDoc done Complete, but intentionally lacking some features. Declaration emit differs greatly, intentionally, to be closer to TS declarations.
JSX done -
Declaration emit done -
Emit (JS output) done -
Watch mode done -
Build mode / project references done -
Incremental build done -
Language service (LSP) in progress Nearly all features implemented.
API not ready -

Definitions:

Other Notes

Long-term, we expect that this repo and its contents will be merged into microsoft/TypeScript. As a result, the repo and issue tracker for typescript-go will eventually be closed, so treat discussions/issues accordingly.

For a list of intentional changes with respect to TypeScript 6.0, see CHANGES.md.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit Contributor License Agreements.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

Trademarks

This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.

typescript-go (microsoft/typescript-go)

Searching Database…

26.1K ·GitHub
archived
Что это такое?Это был промежуточный репозиторий для TypeScript 7.0 — нативного порта компилятора TypeScript, написанного на Go. Портирование завершено, поэтому репозиторий закрыт, а разработка вернулась в исходный репозиторий microsoft/TypeScript.
Это форк TypeScript или полная переработка?Переработка: весь компилятор — разбор, проверка типов, генерация кода, режимы watch и build — переписан на Go вместо исходной кодовой базы на JavaScript. Долгосрочный план всегда состоял в том, чтобы влить всё обратно в microsoft/TypeScript, что теперь и произошло.
Как это запустить?Превью выходило на npm как @typescript/native-preview — установите его и запускайте tsc (так называется команда начиная с TypeScript 7.0 RC и позже). В маркетплейсе также было превью-расширение для VS Code. После завершения порта текущие релизы выходят в microsoft/TypeScript.
Нужен ли установленный Node, чтобы этим пользоваться?Нет — компилятор это нативный бинарник на Go, поэтому для работы достаточно установить npm-пакет. Иначе обстоит дело со сборкой этого репозитория из исходников: это npm workspace, требующий Node 20.19+ и таск-раннера hereby.
Стоит ли пользоваться именно этим репозиторием сейчас?Нет — он закрыт и в сентябре 2026 года будет окончательно заархивирован. Разработка и обсуждения, включая issues, идут в исходном репозитории microsoft/TypeScript.
Насколько Go-компилятор близок к TypeScript 6, которым мы пользуемся сегодня?По таблице статусов репозитория завершены: создание программы, разбор, обработка tsconfig, разрешение типов, проверка типов, JSX, генерация кода, режим watch, project references и инкрементальные сборки — проверка типов выдаёт те же ошибки, места и сообщения, что и TS 6.0. Языковой сервис ещё был в разработке, а compiler API был не готов.
Есть ли для него расширение VS Code?Да — превью-расширение было опубликовано в маркетплейсе VS Code, включается настройкой в конфигурации VS Code. Оно работает в паре с компилятором @typescript/native-preview.
Он работает с обычным JavaScript и JSX?Да. JSX готов, а специфичные для JavaScript вывод типов и JSDoc полностью реализованы — хотя некоторые JS-возможности сознательно отсутствуют, а генерация деклараций для JS намеренно отличается, чтобы быть ближе к стилю TS-деклараций.
Вообще зачем переписывать компилятор на Go?В README мотивация не расписана — там отсылают к анонс-посту о TypeScript 7. Этот репозиторий был просто площадкой для нативного порта, пока тот находился в разработке.
Creator
microsoft
Size
77.7 MB
Stars
26.1K
Age
2y
Commits · 90 Days