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:
Michael Ferris
2018-07-10 16:20:25 -07:00
committed by Andy
parent 375fd64a08
commit 981fcd2f64
2 changed files with 19 additions and 1 deletions
+6 -1
View File
@@ -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;
+13
View File
@@ -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');
}