Comment by archibaldJ

4 years ago

That's a very tight integration with JS&TS! Are you compiling into TS and then to JS? Or is it more of a decoupled process that was set up for the type-checking (like how tsconfig and babel works together)? When I was trying out ReasonML a few years back (and being unfamiliar with OCaml) I ran into some problems with bridging across types.

I checked out https://github.com/imba/typescript-imba-plugin for a bit and I'm still quite lost. Love to learn more!

Also, what is the cross-file refactorings in the tooling? Thanks!

Yeah, the typescript-imba-plugin does quite a lot of magic and might be a little rough to get into.

We essentially do the type-checking by compiling the files to js with jsdoc annotations, and for some features we also generate `.d.ts` files (see https://dev.to/somebee/global-type-augmentations-with-automa...). There is still a lot of work to be done on the integration. There are bugs and missing featyres, and the type-checking only happens in the tooling atm. The compiler could not care less about your types.

Since it is developed as a ts language plugin, references to imba files (like goto definition etc) works from ts/js files (you can include imba files in js/ts), and renaming methods / files works across all ts/js/imba files in your project.