[yargs] Add the optional global parameter to yargs.check() (#18523)

This commit is contained in:
Jed Fox
2017-08-01 12:39:21 -07:00
committed by Sheetal Nandi
parent 29ed1be834
commit c657e49477
2 changed files with 7 additions and 1 deletions
+1 -1
View File
@@ -105,7 +105,7 @@ declare namespace yargs {
example(command: string, description: string): Argv;
check(func: (argv: Arguments, aliases: { [alias: string]: string }) => any): Argv;
check(func: (argv: Arguments, aliases: { [alias: string]: string }) => any, global?: boolean): Argv;
boolean(key: string): Argv;
boolean(keys: string[]): Argv;
+6
View File
@@ -626,3 +626,9 @@ function Argv$commandArray() {
.command(['commandName', 'commandAlias'], 'command description')
.argv;
}
function Argv$check() {
let ya = yargs
.check((argv, aliases) => {})
.check((argv, aliases) => {}, false);
}