airbnb / ts-migrate

A tool to help migrate JavaScript code quickly and conveniently to TypeScript
MIT License
5.39k stars 220 forks source link

JSDoc plugin features #128

Open cspotcode opened 3 years ago

cspotcode commented 3 years ago

With --plugin jsdoc is there a way to:

Is this the right place to ask? I can open 2x separate tickets if that would be better.

edsrzf commented 3 years ago

Thanks for the suggestions! This is definitely the right place to ask. Two separate issues might be better since, even though these are both JSDoc-related, they're pretty distinct requests that would likely be implemented separately.

Removing JSDoc annotations seems like it could be doable, although it may be hard to get the whitespace perfect. This is something that I've wished for myself, too, but haven't gotten around to implementing.

Converting inline type assertions also seems like it could be doable. I didn't consider it when I wrote the plugin as the code I've converted hasn't used these. It might be helpful if we can find a source of good examples, as I'm not quite sure how these are typically used in the wild.