mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-03 22:37:03 +00:00
yargs (#27171)
Add `hide` method according to http://yargs.js.org/docs/#api-hidekey Add `showhidden` method according to http://yargs.js.org/docs/#api-showhidden
This commit is contained in:
Vendored
+6
-1
@@ -1,4 +1,4 @@
|
||||
// Type definitions for yargs 11.0
|
||||
// Type definitions for yargs 11.1
|
||||
// Project: https://github.com/chevex/yargs
|
||||
// Definitions by: Martin Poelstra <https://github.com/poelstra>
|
||||
// Mizunashi Mana <https://github.com/mizunashi-mana>
|
||||
@@ -116,6 +116,8 @@ declare namespace yargs {
|
||||
|
||||
group(key: string | string[], groupName: string): Argv;
|
||||
|
||||
hide(key: string): Argv;
|
||||
|
||||
help(): Argv;
|
||||
help(enableExplicit: boolean): Argv;
|
||||
help(option: string, enableExplicit: boolean): Argv;
|
||||
@@ -185,6 +187,9 @@ declare namespace yargs {
|
||||
|
||||
showCompletionScript(): Argv;
|
||||
|
||||
showhidden(option?: string | boolean): Argv;
|
||||
showhidden(option: string, description?: string): Argv;
|
||||
|
||||
showHelp(consoleLevel?: string): Argv;
|
||||
|
||||
showHelpOnFail(enable: boolean, message?: string): Argv;
|
||||
|
||||
@@ -648,3 +648,16 @@ function Argv$check() {
|
||||
.check((argv, aliases) => void 0)
|
||||
.check((argv, aliases) => void 0, false);
|
||||
}
|
||||
|
||||
function Argv$hide() {
|
||||
const ya = yargs
|
||||
.hide('a');
|
||||
}
|
||||
|
||||
function Argv$showhidden() {
|
||||
const ya = yargs
|
||||
.showhidden()
|
||||
.showhidden(true)
|
||||
.showhidden('show-hidden')
|
||||
.showhidden('show-hidden', 'Show hidden options');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user