tusharmath/ts-codemod

Codemod for explicit extension

Closed this issue · 2 comments

Hi!

With TS 5 coming soon with explicit extentions (microsoft/TypeScript#51669), I will need to do this on a lot of project and I would love to have a command to give to people to migrate.

Explicit extension is a great opportunity to speed up the ecosystem, more information here:
https://marvinh.dev/blog/speeding-up-javascript-ecosystem-part-2/

I tried running this with a custom codemod, but I ran into problems (TypeError: o.transformationCtor is not a constructor).
Also using ts-node is quite painful, you need to ignore type errors to get things running, that not ideal for one off scripts, I would advice using tsx or directly esbuild.

Can you put the reproduction steps.

Didn't want to dive too much into this ts-node issues, I wrote a custom script instead