diff --git a/types/yargs/index.d.ts b/types/yargs/index.d.ts index fe8f4ea6c2..d99529a0d0 100644 --- a/types/yargs/index.d.ts +++ b/types/yargs/index.d.ts @@ -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; diff --git a/types/yargs/yargs-tests.ts b/types/yargs/yargs-tests.ts index 3773d03ea5..8ea38c0a2b 100644 --- a/types/yargs/yargs-tests.ts +++ b/types/yargs/yargs-tests.ts @@ -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); +}