Add missing terminalWidth method to yargs. (#11779)

This commit is contained in:
mgroenhoff
2016-10-06 19:03:03 +02:00
committed by Mohamed Hegazy
parent e3b20d93a9
commit 1be288e7e1
2 changed files with 10 additions and 0 deletions

2
yargs/index.d.ts vendored
View File

@@ -16,6 +16,8 @@ declare namespace yargs {
detectLocale(detect: boolean): Argv;
terminalWidth(): number;
alias(shortName: string, longName: string): Argv;
alias(aliases: { [shortName: string]: string }): Argv;
alias(aliases: { [shortName: string]: string[] }): Argv;

View File

@@ -270,6 +270,14 @@ function Argv$version() {
.version(function () { return '1.0.0'; }, '--version', 'description');
}
function Argv$wrap() {
var argv1 = yargs
.wrap(null);
var argv2 = yargs
.wrap(yargs.terminalWidth());
}
function Argv$locale() {
var argv = yargs
.usage('./$0 - follow ye instructions true')