Skip to content

Latest commit

 

History

History
115 lines (88 loc) · 6.09 KB

File metadata and controls

115 lines (88 loc) · 6.09 KB

Important

This is an experimental open-source derivative of microsoft/typescript-go, not an official Microsoft or TypeScript project. The experiment explores a small, stable interface for attaching TypeScript semantic facts to source code. See RFC 0001 for the accepted direction and its current migration boundary.

The accepted semantic-facts boundary is exposed by the experimental tsfacts JSON Lines command. It currently provides annotation, inference, contextual, widening, narrowing, and constraint views plus response-local symbol, alias, and declaration provenance. An isolated Rust/OXC consumer exercises that contract as a reference and migration harness; TypeScript 7's Go checker remains the semantic oracle.

The current migration decision and controlled rollout evidence approve no Rust semantic replacement. An independent Rust/OXC primitive/literal producer now runs under exact differential comparison while Go remains the production fallback and semantic authority. The compatibility boundary and current exclusions are tracked in the migration contract, and durable implementation choices are recorded in ADRs.

Current migration status

The occurrence-to-OXC attachment path and the independent Rust primitive/literal producer are implemented and exercised by deterministic Go-versus-Rust shadow gates. The controlled rollout evidence records exact agreement for the current supported corpus, but Rust is not a production semantic authority: the Go checker remains the serving implementation and fallback. See ADR-0020 for the remaining blockers and the rollout evidence for the measured boundary.

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:

  • done aka "believed done": We're not currently aware of any deficits or major work left to do. OK to log bugs
  • in progress: currently being worked on; some features may work and some might not. OK to log panics, but nothing else please
  • prototype: proof-of-concept only; do not log bugs
  • not ready: either haven't even started yet, or far enough from ready that you shouldn't bother messing with it yet

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 opencode@microsoft.com 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.