Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Staging repo for development of native port of TypeScript

License

NotificationsYou must be signed in to change notification settings

microsoft/typescript-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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-previewnpx tsgo# Use this as you would tsc.

A preview VS Code extension isavailable on the VS Code marketplace.

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

{"typescript.experimental.useTsgo":true}

How to Build and Run

This repo usesGo 1.24 or higher,Rust 1.85 or higher,Node.js with npm, andhereby.

For tests and code generation, this repo contains a git submodule to the main TypeScript repo pointing to the commit being ported.When cloning, you'll want to clone with submodules:

git clone --recurse-submodules https://github.com/microsoft/typescript-go.git

If you have already cloned the repo, you can initialize the submodule with:

git submodule update --init --recursive

With the submodule in place andnpm ci, you can run tasks viahereby, similar to the TypeScript repo:

hereby build# Verify that the project buildsherebytest# Run all testshereby install-tools# Install additional tools such as lintershereby lint# Run all lintershereby format# Format all codehereby generate# Generate all Go code (e.g. diagnostics, committed to repo)

Additional tasks are a work in progress.

hereby is not required to work on the repo; the regulargo tooling (e.g.,go build,go test ./...) will work as expected.hereby tasks are provided as a convenience for those familiar with the TypeScript repo.

Runningtsgo

After runninghereby build, you can runbuilt/local/tsgo, which behaves mostly the same astsc.

Running LSP Prototype

To debug and run the VS Code extension without installing it globally:

  • Run VS Code in the repo workspace (code .)
  • Copy.vscode/launch.template.json to.vscode/launch.json
  • F5 (orDebug: Start Debugging from the command palette)

This will launch a new VS Code instance which uses the Corsa LS as the backend. If correctly set up, you should see "tsgo" in the status bar when a TypeScript or JavaScript file is open:

LSP Prototype Screenshot

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.

FeatureStatusNotes
Program creationdoneSame files and module resolution as TS5.8. Not all resolution modes supported yet.
Parsing/scanningdoneExact same syntax errors as TS5.8
Commandline andtsconfig.json parsingmostly doneEntry point slightly different for now
Type resolutiondoneSame types as TS5.8
Type checkingdoneSame errors, locations, and messages as TS5.8. Types printback in errors may display differently (in progress)
JavaScript-specific inference and JS Docnot ready-
JSXdone-
Declaration emitin progressMost common features are in place, but some edge cases and feature flags are still unhandled
Emit (JS output)in progresstarget: esnext well-supported, other targets may have gaps
Watch modeprototypeWatches files and rebuilds, but no incremental rechecking
Build mode / project referencesnot ready-
Incremental buildnot ready-
Language service (LSP)prototypeMinimal functionality (errors, hover, go to def). More features coming soon
APInot ready-

Definitions:

  • done aka "believed done": We're not currently aware of any deficits or major left work 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 intomicrosoft/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 5.7, see CHANGES.md.

Contributing

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

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

This project has adopted theMicrosoft Open Source Code of Conduct.For more information see theCode of Conduct FAQ orcontactopencode@microsoft.com with any additional questions or comments.

Trademarks

This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsofttrademarks or logos is subject to and must followMicrosoft'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.

About

Staging repo for development of native port of TypeScript

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks


[8]ページ先頭

©2009-2025 Movatter.jp