From c458f90930bdea33e75223de7a36cee790304f01 Mon Sep 17 00:00:00 2001 From: Drew Hays Date: Mon, 14 Mar 2016 20:43:38 -0700 Subject: [PATCH] Add some missing methods and options to yargs.d.ts Added some missing methods and options from the documentation of yargs --- yargs/yargs.d.ts | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/yargs/yargs.d.ts b/yargs/yargs.d.ts index ff0132cf4..02f6a43ae 100644 --- a/yargs/yargs.d.ts +++ b/yargs/yargs.d.ts @@ -21,6 +21,8 @@ declare module "yargs" { alias(shortName: string, longName: string): Argv; alias(aliases: { [shortName: string]: string }): Argv; alias(aliases: { [shortName: string]: string[] }): Argv; + + array(key: string): Argv; default(key: string, value: any): Argv; default(defaults: { [key: string]: any}): Argv; @@ -90,6 +92,8 @@ declare module "yargs" { help(): string; help(option: string, description?: string): Argv; + + env(prefix?: string): Argv; epilog(msg: string): Argv; epilogue(msg: string): Argv; @@ -102,6 +106,14 @@ declare module "yargs" { showHelp(func?: (message: string) => any): Argv; exitProcess(enabled:boolean): Argv; + + global(key: string): Argv; + global(keys: string[]): Argv; + + group(key: string, groupName: string): Argv; + group(keys: string[], groupName: string): Argv; + + nargs(key: string, count: number): Argv; /* Undocumented */ @@ -119,11 +131,13 @@ declare module "yargs" { interface Options { type?: string; + group?: string; alias?: any; demand?: any; required?: any; require?: any; default?: any; + defaultDescription?: string; boolean?: any; string?: any; count?: any; @@ -132,6 +146,15 @@ declare module "yargs" { desc?: any; requiresArg?: any; choices?:string[]; + global?: boolean; + array?: boolean; + boolean?: boolean; + config?: boolean; + count?: boolean; + string?: boolean; + number?: boolean; + normalize?: boolean; + nargs?: number; } type SyncCompletionFunction = (current: string, argv: any) => string[];