Skip to content

Commit

Permalink
Run typings autogeneration for the first time
Browse files Browse the repository at this point in the history
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
aweebit committed Aug 17, 2023
1 parent 57f8e3a commit 7bb970b
Show file tree
Hide file tree
Showing 16 changed files with 1,694 additions and 0 deletions.
68 changes: 68 additions & 0 deletions typings/argument.d.ts
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
1 change: 1 addition & 0 deletions typings/argument.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 7bb970b

Please sign in to comment.