From 1be288e7e16a232a4dfd38700c4ab46000e9c503 Mon Sep 17 00:00:00 2001 From: mgroenhoff Date: Thu, 6 Oct 2016 19:03:03 +0200 Subject: [PATCH] Add missing terminalWidth method to yargs. (#11779) --- yargs/index.d.ts | 2 ++ yargs/yargs-tests.ts | 8 ++++++++ 2 files changed, 10 insertions(+) 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')