diff --git a/yargs/index.d.ts b/yargs/index.d.ts index 7fda2c8320..df84b8dc3d 100644 --- a/yargs/index.d.ts +++ b/yargs/index.d.ts @@ -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; diff --git a/yargs/yargs-tests.ts b/yargs/yargs-tests.ts index c31ce4b997..e2fedd7b66 100644 --- a/yargs/yargs-tests.ts +++ b/yargs/yargs-tests.ts @@ -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')