mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-12 04:50:18 +00:00
Changed uses of any in yargs to object
This commit is contained in:
Vendored
+7
-6
@@ -5,6 +5,7 @@
|
||||
// Jeffery Grajkowski <https://github.com/pushplay>
|
||||
// Jeff Kenney <https://github.com/jeffkenney>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
|
||||
// unified-signatures: Because there is useful information in the argument names of the overloaded signatures
|
||||
// prefer-method-signature: Because it makes more sense for optional functions provided in options objects
|
||||
@@ -119,11 +120,11 @@ declare namespace yargs {
|
||||
choices(key: string, values: Choices): Argv;
|
||||
|
||||
config(): Argv;
|
||||
config(explicitConfigurationObject: any): Argv;
|
||||
config(key: string, description?: string, parseFn?: (configPath: string) => any): Argv;
|
||||
config(keys: string[], description?: string, parseFn?: (configPath: string) => any): Argv;
|
||||
config(key: string, parseFn: (configPath: string) => any): Argv;
|
||||
config(keys: string[], parseFn: (configPath: string) => any): Argv;
|
||||
config(explicitConfigurationObject: object): Argv;
|
||||
config(key: string, description?: string, parseFn?: (configPath: string) => object): Argv;
|
||||
config(keys: string[], description?: string, parseFn?: (configPath: string) => object): Argv;
|
||||
config(key: string, parseFn: (configPath: string) => object): Argv;
|
||||
config(keys: string[], parseFn: (configPath: string) => object): Argv;
|
||||
|
||||
conflicts(key: string, value: string): Argv;
|
||||
conflicts(conflicts: { [key: string]: string }): Argv;
|
||||
@@ -207,7 +208,7 @@ declare namespace yargs {
|
||||
choices?: Choices;
|
||||
coerce?: (arg: any) => any;
|
||||
config?: boolean;
|
||||
configParser?: (configPath: string) => any;
|
||||
configParser?: (configPath: string) => object;
|
||||
count?: boolean;
|
||||
default?: any;
|
||||
defaultDescription?: string;
|
||||
|
||||
@@ -561,7 +561,7 @@ function Argv$commandObject() {
|
||||
choices: ["a", "b", "c"],
|
||||
coerce: f => JSON.stringify(f),
|
||||
config: true,
|
||||
configParser: t => t,
|
||||
configParser: t => JSON.parse(fs.readFileSync(t, "utf8")),
|
||||
count: true,
|
||||
default: "myvalue",
|
||||
defaultDescription: "description",
|
||||
|
||||
Reference in New Issue
Block a user