mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
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:
Vendored
+17
@@ -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[];
|
||||
|
||||
Reference in New Issue
Block a user