diff --git a/yargs/index.d.ts b/yargs/index.d.ts index bd512a7773..1cd96e68e1 100644 --- a/yargs/index.d.ts +++ b/yargs/index.d.ts @@ -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; diff --git a/yargs/yargs-tests.ts b/yargs/yargs-tests.ts index 90448bce77..f68c1113e9 100644 --- a/yargs/yargs-tests.ts +++ b/yargs/yargs-tests.ts @@ -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; +}