-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Enhancement: Use TypeScript's Go port (tsgo / typescript-go) for type information #10940
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
FWIW we are working on a number of prototypes which still allow a synchronous API (and hopefully in the browser too). |
Note that WASM loading in Node.js will soon not need to be async anymore. You'll be able to just |
If you're looking for a hacky fix, |
Some updates/details on how the API for interacting with tsgo will work, in microsoft/typescript-go#711 |
@nicolo-ribaudo is there an open issue? If so could you link it please? |
nodejs/node#56919, I think released in 24.0.0. |
The tsgo JavaScript API will be synchronous, and will not use WebAssembly: ![]() There’s a test("getTypeOfSymbol", () => {
const api = spawnAPI();
const project = api.loadProject("/tsconfig.json");
const symbol = project.getSymbolAtPosition("/src/index.ts", 9);
assert.ok(symbol);
const type = project.getTypeOfSymbol(symbol);
assert.ok(type);
assert.ok(type.flags & TypeFlags.NumberLiteral);
}); |
Uh oh! @controversial, at least one image you shared is missing helpful alt text. Check #10940 (comment) to fix the following violations:
Alt text is an invisible description that helps screen readers describe images to blind or low-vision users. If you are using markdown to display images, add your alt text inside the brackets of the markdown image. Learn more about alt text at Basic writing and formatting syntax: images on GitHub Docs.
|
But.. That was actually controversial! The bot should allow certain usernames to have more liberties, or? (Sorry about off-topic.) |
Uh oh!
There was an error while loading. Please reload this page.
Before You File a Proposal Please Confirm You Have Done The Following...
Relevant Package
typescript-estree
My proposal is suitable for this project
Description
TypeScript is getting ported to Go! It's going to be 10x faster! Blazing fast! Speed! 🔥 ⚡
https://devblogs.microsoft.com/typescript/typescript-native-port/
If we could use this to power typed linting, that'd be great for users. Type checking performance is the bottleneck for the vast majority of correctly configured lint rules that use typescript-eslint.
We believe there are currently at least three major difficulties with typescript-eslint using tsgo in 2025:
It's very likely that tsgo will be consumed via native binding APIs (WASM), and so will almost certainly be asynchronoustypescript-eslint could in theory use something likesynckit
but that presents data serialization difficultiesSo, although we'd very much like to be 10x faster (!!), it will take a lot of design exploration and work.
If you'd like to work on this, please go ahead. Seeing your experimentation will help inform how typescript-eslint can adopt faster typed linting in the future. 🚀
Additional Info
If you're coming here because your typed linting is slow, please go through our typed linting performance troubleshooting guide: https://typescript-eslint.io/troubleshooting/typed-linting/performance. Properly configured linting should not be significantly slower than type checking.
💖
The text was updated successfully, but these errors were encountered: