@types/command-line-args
Advanced tools
Comparing version 4.0.5 to 4.0.6
@@ -1,7 +0,1 @@ | ||
// Type definitions for command-line-args 4.0 | ||
// Project: https://github.com/75lb/command-line-args | ||
// Definitions by: CzBuCHi <https://github.com/CzBuCHi>, Lloyd Brookes <https://github.com/75lb> | ||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | ||
// TypeScript Version: 2.2 | ||
/** | ||
@@ -8,0 +2,0 @@ * Returns an object containing option values parsed from the command line. By default it parses the global `process.argv` array. |
{ | ||
"name": "@types/command-line-args", | ||
"version": "4.0.5", | ||
"version": "4.0.6", | ||
"description": "TypeScript definitions for command-line-args", | ||
@@ -10,9 +10,9 @@ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/command-line-args", | ||
"name": "CzBuCHi", | ||
"url": "https://github.com/CzBuCHi", | ||
"githubUsername": "CzBuCHi" | ||
"githubUsername": "CzBuCHi", | ||
"url": "https://github.com/CzBuCHi" | ||
}, | ||
{ | ||
"name": "Lloyd Brookes", | ||
"url": "https://github.com/75lb", | ||
"githubUsername": "75lb" | ||
"githubUsername": "75lb", | ||
"url": "https://github.com/75lb" | ||
} | ||
@@ -29,4 +29,4 @@ ], | ||
"dependencies": {}, | ||
"typesPublisherContentHash": "17de6ef456c17a65b9b540f7ef2b302a3db9773ab4d8fa678648c1d95d2c5627", | ||
"typeScriptVersion": "4.3" | ||
"typesPublisherContentHash": "386f9b44173ac3c517f6fd729e575184dcbf3d37db6e11dec2beb128d006213e", | ||
"typeScriptVersion": "4.5" | ||
} |
@@ -9,9 +9,82 @@ # Installation | ||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/command-line-args/v4. | ||
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/command-line-args/v4/index.d.ts) | ||
````ts | ||
/** | ||
* Returns an object containing option values parsed from the command line. By default it parses the global `process.argv` array. | ||
*/ | ||
declare function commandLineArgs( | ||
optionDefinitions: commandLineArgs.OptionDefinition[], | ||
options?: commandLineArgs.ParseOptions, | ||
): commandLineArgs.CommandLineOptions; | ||
declare namespace commandLineArgs { | ||
interface CommandLineOptions { | ||
/** | ||
* Command-line arguments not parsed by `commandLineArgs`. | ||
*/ | ||
_unknown?: string[] | undefined; | ||
[propName: string]: any; | ||
} | ||
interface ParseOptions { | ||
/** | ||
* An array of strings which if present will be parsed instead of `process.argv`. | ||
*/ | ||
argv?: string[] | undefined; | ||
/** | ||
* If `true`, `commandLineArgs` will not throw on unknown options or values, instead returning them in the `_unknown` property of the output. | ||
*/ | ||
partial?: boolean | undefined; | ||
} | ||
interface OptionDefinition { | ||
/** | ||
* The long option name. | ||
*/ | ||
name: string; | ||
/** | ||
* A setter function (you receive the output from this) enabling you to be specific about the type and value received. Typical values | ||
* are `String` (the default), `Number` and `Boolean` but you can use a custom function. If no option value was set you will receive `null`. | ||
*/ | ||
type?: ((input: string) => any) | undefined; | ||
/** | ||
* A getopt-style short option name. Can be any single character except a digit or hyphen. | ||
*/ | ||
alias?: string | undefined; | ||
/** | ||
* Set this flag if the option accepts multiple values. In the output, you will receive an array of values each passed through the `type` function. | ||
*/ | ||
multiple?: boolean | undefined; | ||
/** | ||
* Any values unaccounted for by an option definition will be set on the `defaultOption`. This flag is typically set | ||
* on the most commonly-used option to enable more concise usage. | ||
*/ | ||
defaultOption?: boolean | undefined; | ||
/** | ||
* An initial value for the option. | ||
*/ | ||
defaultValue?: any; | ||
/** | ||
* One or more group names the option belongs to. | ||
*/ | ||
group?: string | string[] | undefined; | ||
} | ||
} | ||
export = commandLineArgs; | ||
```` | ||
### Additional Details | ||
* Last updated: Mon, 04 Sep 2023 15:41:02 GMT | ||
* Last updated: Wed, 18 Oct 2023 00:05:18 GMT | ||
* Dependencies: none | ||
* Global values: none | ||
# Credits | ||
These definitions were written by [CzBuCHi](https://github.com/CzBuCHi), and [Lloyd Brookes](https://github.com/75lb). |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7485
90
59