nanovazquez / yargs-interactive

Interactive support for yargs
MIT License
46 stars 9 forks source link

Support for Typescript typings #12

Closed stevenzeck closed 6 years ago

stevenzeck commented 6 years ago

@nanovazquez I don't know how familiar you are with Typescript, but I opened a PR at DefinitelyTyped to have typings for yargs-interactive. I need to update it now that options is choices. But I'm thinking the interfaces should probably extend from inquirer at some point. I'm just not sure what all is passed from yargs-interactive to inquirer here. Any input on that PR would be helpful.

nanovazquez commented 6 years ago

Hey @szeck87. I'm familiar with TypeScript, although I've never worked with DefinitelyTyped. How can I help?

stevenzeck commented 6 years ago

It's basically a giant repository of typings for projects that aren't written in Typescript or don't provide their own typings. I had to create my own for https://github.com/Unibeautify/create-unibeautify-beautifier/blob/master/src/create-unibeautify-beautifier.ts so I had typings and didn't have to use require().

Since choices is in inquirer, the OptionData interface I have should probably extend inquirer's Question interface. I'm not an expert on .d.ts files, but that's a the gist of it.

nanovazquez commented 6 years ago

Closing this issues as the typings are already present in DefintelyTyped. Thanks @stevenzeck!