ts-morph icon indicating copy to clipboard operation
ts-morph copied to clipboard

ts-morph and Go based native tsc

Open rvo-fstock opened this issue 9 months ago • 5 comments

ts-morph is an incredible project!
Thank you to @dsherret as well as all the other contributors for this work.

Is your feature request related to a problem? Please describe.

With MS preparing to release a Go based native tsc, I would really like to hear your thoughts on this. As you probably know, esbuild and babel would just punt when they got into less commonly used TypeScript features, which was a nightmare to debug.

  • Do you have any insight into how closely this new tsc will follow the language spec?
  • What impacts (if any) do you foresee on ts-morph?

Describe the solution you'd like

I'd like to hear that ts-morph would be fully compatible with the new tsc, but... 😄

rvo-fstock avatar Mar 11 '25 16:03 rvo-fstock

I've known about it for a couple weeks now. I don't think ts-morph will continue to exist because the API sounds like it will be limited and require IPC. Maybe if someone were able to get it working in Wasm there is a chance an API could be built around it, but it would be a massive task that I don't have the bandwidth to take on (well, based on what I know today... maybe it will turn out to be ok and not too bad, but it's not looking like it will be easy).

dsherret avatar Mar 11 '25 16:03 dsherret

What do we make of this? https://x.com/brooooook_lyn/status/1899681933866811705?s=46

Keen to see how Deno will take a swing at the Go bindings.

itsdouges avatar Mar 12 '25 23:03 itsdouges

In Deno we're going to do something similar and it shouldn't be an issue because we can batch stuff together across the boundary, but for ts-morph I think it will be too much effort to make something like it continue to work, be slow, and also it will no longer work in the browser, which is a shame.

dsherret avatar Mar 13 '25 14:03 dsherret

I think we are safe for now. They are not going to release it till TS 7.0 (currently, it's 5.8)

See: https://github.com/microsoft/typescript-go/discussions/454

rosko avatar Mar 13 '25 19:03 rosko

There is some talk about the api that typescript will offer here: https://devblogs.microsoft.com/typescript/announcing-typescript-native-previews/#api-progress

Some more info: https://github.com/microsoft/typescript-go/discussions/455

bertyhell avatar May 25 '25 07:05 bertyhell