DefinitelyTyped/types/yargs-interactive/yargs-interactive-tests.ts
Steven Zeck 8ba2ecb239 New package: yargs-interactive (#27155)
* Add typings for yargs-interactive

* Use require to import yargs-interactive in test
2018-07-12 11:12:45 -07:00

20 lines
392 B
TypeScript

/// <reference types="node" />
import yargsInteractive = require("yargs-interactive");
const options: yargsInteractive.Option = {
color: {
describe: "What is your favorite color?",
prompt: "always",
type: "input",
default: "Blue",
}
};
yargsInteractive()
.usage("$0 <command> [args]")
.interactive(options)
.then((result: any) => {
console.log(result);
});