yargs: add conflicts()

This commit is contained in:
Jeff Kenney
2017-01-26 16:01:19 -08:00
parent 975b1a6839
commit bb4107dc40
2 changed files with 12 additions and 0 deletions

3
yargs/index.d.ts vendored
View File

@@ -109,6 +109,9 @@ declare namespace yargs {
config(key: string, parseFn: (configPath: string) => Object): Argv;
config(keys: string[], parseFn: (configPath: string) => Object): Argv;
conflicts(key: string, value: string): Argv;
conflicts(conflicts: { [key: string]: string }): Argv;
wrap(columns: number): Argv;
strict(): Argv;

View File

@@ -599,3 +599,12 @@ function Argv$demandOption() {
.demandOption(['a', 'b'], true)
.argv;
}
function Argv$conflicts() {
var ya = yargs
.conflicts('a', 'b')
.conflicts({
a: 'b'
})
.argv;
}