- Notifications
You must be signed in to change notification settings - Fork664
Does this project mean I can emit native code from my TypeScript code?#537
-
No. This repo is a change in theimplementation language of TypeScript itself, and isn't a tool that would allow a TypeScript input file to be converted to Go or any other native/native-like target. Such a transform (if even possible?) is outside the scope of the project. |
BetaWas this translation helpful?Give feedback.
All reactions
👍 76😄 33
Replies: 4 comments 1 reply
-
Since there are still a lot of concerns about this, I’d like to confirm that the existing TypeScript (TS) code will still be transpiled to JavaScript (JS) as usual — only the TS compiler and tooling are being ported to Golang. Is that correct? |
BetaWas this translation helpful?Give feedback.
All reactions
👍 3
-
yes, if you're looking for TS to native look atporffor instead which does JS/TS -> C but note it's unreliable |
BetaWas this translation helpful?Give feedback.
All reactions
👍 4
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
If you're looking for typescript -> native compiler, take a look at this:https://github.com/ASDAlexander77/TypeScriptCompiler This is not something that transforms TS into the C code, it works almost like C++/C compiler It lacks of many built-in library functions, but improvements so far seems very promising |
BetaWas this translation helpful?Give feedback.
All reactions
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
The "Corsa" project, Microsoft's native implementation of the TypeScript compiler, does not enable emitting native machine code directly from TypeScript code. Instead, it compiles TypeScript into JavaScript, similar to the existing TypeScript compiler. The primary goal of "Corsa" is to enhance the performance of the compilation process, making it faster and more efficient. It will be beneficial to slow dev frameworks like Next.js |
BetaWas this translation helpful?Give feedback.
All reactions
👍 7👎 2
-
Someone should try to train an LLM on both the original TypeScript code and the Go port. Maybe that's enough data for it to figure out how to convert other TypeScript projects into Go? |
BetaWas this translation helpful?Give feedback.