microsoft / dts-gen

dts-gen creates starter TypeScript definition files for any module or library.
MIT License
2.44k stars 102 forks source link

Support operating on individual files #15

Open DanielRosenwasser opened 8 years ago

DanielRosenwasser commented 8 years ago

Maybe related to #14, but as people migrate their JavaScript to TypeScript and are looking for an easier process when --allowJs isn't picking up the slack, I think dts-gen can come in handy here.

CC @bowdenk7

M-Zuber commented 7 years ago

I would love this even for typescript files. Currently I am working on a small app that is one file, but trying to keep track of all the methods is not proving so easy, so a definitions file would be very helpful - and a way to generate it even more.

bowdenk7 commented 7 years ago

@M-Zuber - if you had an existing TS file that already has types, you should be able to add -d to cmd line args or add:

"declaration": true

to your tsconfig.json.

M-Zuber commented 7 years ago

😑 I should not be programming while taking cold medicine... Thank you for reminding me about that flag 😀

DanielRosenwasser commented 7 years ago

Well it's a balancing act. image

Feel better!