Added missing functions from version 3.31

- reset
- epilog/epilogue
- locale
- detectLocale
- choices
- exitProcess

Added an extra prototype for version, accepting a function argument
This commit is contained in:
Olivier CHEVET
2016-01-17 17:38:52 +01:00
parent 70bf7e2bfe
commit 6a287502da
2 changed files with 81 additions and 0 deletions
+17
View File
@@ -11,6 +11,13 @@ declare module "yargs" {
(...args: any[]): any;
parse(...args: any[]): any;
reset(): Argv;
locale(): string;
locale(loc:string): Argv;
detectLocale(detect:boolean): Argv;
alias(shortName: string, longName: string): Argv;
alias(aliases: { [shortName: string]: string }): Argv;
alias(aliases: { [shortName: string]: string[] }): Argv;
@@ -71,6 +78,9 @@ declare module "yargs" {
string(key: string): Argv;
string(keys: string[]): Argv;
choices(choices: Object): Argv;
choices(key: string, values:any[]): Argv;
config(key: string): Argv;
config(keys: string[]): Argv;
@@ -81,12 +91,18 @@ declare module "yargs" {
help(): string;
help(option: string, description?: string): Argv;
epilog(msg: string): Argv;
epilogue(msg: string): Argv;
version(version: string, option?: string, description?: string): Argv;
version(version: () => string, option?: string, description?: string): Argv;
showHelpOnFail(enable: boolean, message?: string): Argv;
showHelp(func?: (message: string) => any): Argv;
exitProcess(enabled:boolean): Argv;
/* Undocumented */
normalize(key: string): Argv;
@@ -115,6 +131,7 @@ declare module "yargs" {
description?: any;
desc?: any;
requiresArg?: any;
choices?:string[];
}
type SyncCompletionFunction = (current: string, argv: any) => string[];