mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-03-29 17:08:21 +08:00
yargs: add conflicts()
This commit is contained in:
3
yargs/index.d.ts
vendored
3
yargs/index.d.ts
vendored
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user