mskelton / ratchet

Codemod to convert React PropTypes to TypeScript types.
https://mskelton.dev/ratchet
ISC License
138 stars 14 forks source link

Output types to .d.ts file #74

Open krishnaglick opened 1 year ago

krishnaglick commented 1 year ago

Currently the transform function puts the types directly into the modified file. How feasible would it be to emit them to a named .d.ts file next to the altered file? I'm working w/ jsx files that I cannot convert to typescript files at the moment and would love to just have the types living next to them!

mskelton commented 1 year ago

This project is very tied to jscodeshift, which I don't think supports that type of thing. Honestly I would recommend ts-migrate instead of ratchet as it's built on better principles IMO.