-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Run typings autogeneration for the first time
The original, manually written typings are kept in the repo for now because they still have to be moved to JSDoc which currently differs from them in a lot of places.
- Loading branch information
Showing
16 changed files
with
1,694 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
export class Argument { | ||
/** | ||
* Initialize a new command argument with the given name and description. | ||
* The default is that the argument is required, and you can explicitly | ||
* indicate this with <> around the name. Put [] around the name for an optional argument. | ||
* | ||
* @param {string} name | ||
* @param {string} [description] | ||
*/ | ||
constructor(name: string, description?: string | undefined); | ||
description: string; | ||
variadic: boolean; | ||
parseArg: Function | ((arg: any, previous: any) => any) | undefined; | ||
defaultValue: any; | ||
defaultValueDescription: string | undefined; | ||
argChoices: string[] | undefined; | ||
required: boolean; | ||
_name: string; | ||
/** | ||
* Return argument name. | ||
* | ||
* @return {string} | ||
*/ | ||
name(): string; | ||
/** | ||
* @package | ||
*/ | ||
_concatValue(value: any, previous: any): any[]; | ||
/** | ||
* Set the default value, and optionally supply the description to be displayed in the help. | ||
* | ||
* @param {any} value | ||
* @param {string} [description] | ||
* @return {Argument} | ||
*/ | ||
default(value: any, description?: string | undefined): Argument; | ||
/** | ||
* Set the custom handler for processing CLI command arguments into argument values. | ||
* | ||
* @param {Function} [fn] | ||
* @return {Argument} | ||
*/ | ||
argParser(fn?: Function | undefined): Argument; | ||
/** | ||
* Only allow argument value to be one of choices. | ||
* | ||
* @param {string[]} values | ||
* @return {Argument} | ||
*/ | ||
choices(values: string[]): Argument; | ||
/** | ||
* Make argument required. | ||
*/ | ||
argRequired(): Argument; | ||
/** | ||
* Make argument optional. | ||
*/ | ||
argOptional(): Argument; | ||
} | ||
/** | ||
* Takes an argument and returns its human readable equivalent for help usage. | ||
* | ||
* @param {Argument} arg | ||
* @return {string} | ||
* @package | ||
*/ | ||
export function humanReadableArgName(arg: Argument): string; | ||
//# sourceMappingURL=argument.d.ts.map |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.