1414// Flowgen v1.21.0
1515
1616declare module 'commander' {
17- declare type LiteralUnion < LiteralType , BaseType : string | number > =
17+ declare type LiteralUnion < LiteralType , BaseType extends string | number > =
1818 LiteralType | { ...BaseType , ...{ [ key : empty ] : empty , ...} } ;
1919
2020 declare export class CommanderError extends Error {
@@ -77,7 +77,7 @@ declare module 'commander' {
7777 /**
7878 * Set the default value, and optionally supply the description to be displayed in the help.
7979 */
80- default ( value : mixed , description ? : string ) : this ;
80+ default ( value : unknown , description ? : string ) : this ;
8181
8282 /**
8383 * Set the custom handler for processing CLI command arguments into argument values.
@@ -87,7 +87,7 @@ declare module 'commander' {
8787 /**
8888 * Only allow argument value to be one of choices.
8989 */
90- choices ( values : $ReadOnlyArray < string > ) : this ;
90+ choices ( values : ReadonlyArray < string > ) : this ;
9191
9292 /**
9393 * Make argument required.
@@ -111,7 +111,7 @@ declare module 'commander' {
111111 negate: boolean ;
112112 defaultValue ? : any ;
113113 defaultValueDescription ? : string ;
114- presetArg ? : mixed ;
114+ presetArg ? : unknown ;
115115 envVar ? : string ;
116116 parseArg ?: < T > (value: string, previous: T) => T ;
117117 hidden: boolean ;
@@ -121,7 +121,7 @@ declare module 'commander' {
121121 /**
122122 * Set the default value, and optionally supply the description to be displayed in the help.
123123 */
124- default ( value : mixed , description ? : string ) : this ;
124+ default ( value : unknown , description ? : string ) : this ;
125125
126126 /**
127127 * Preset to use when option used without option-argument, especially optional but also boolean and negated.
@@ -131,7 +131,7 @@ declare module 'commander' {
131131 * new Option('--donate [amount]').preset('20').argParser(parseFloat);
132132 * ```
133133 */
134- preset ( arg : mixed ) : this ;
134+ preset ( arg : unknown ) : this ;
135135
136136 /**
137137 * Add option name(s) that conflict with this option.
@@ -184,7 +184,7 @@ declare module 'commander' {
184184 /**
185185 * Only allow option value to be one of choices.
186186 */
187- choices ( values : $ReadOnlyArray < string > ) : this ;
187+ choices ( values : ReadonlyArray < string > ) : this ;
188188
189189 /**
190190 * Return option name.
@@ -344,9 +344,9 @@ declare module 'commander' {
344344 declare export class Command {
345345 args : string [ ] ;
346346 processedArgs : any [ ] ;
347- readonly commands : $ReadOnlyArray < Command > ;
348- readonly options : $ReadOnlyArray < Option > ;
349- readonly registeredArguments : $ReadOnlyArray < Argument > ;
347+ readonly commands : ReadonlyArray < Command > ;
348+ readonly options : ReadonlyArray < Option > ;
349+ readonly registeredArguments : ReadonlyArray < Argument > ;
350350 parent : Command | null ;
351351 constructor ( name ?: string ) : this ;
352352
@@ -442,7 +442,7 @@ declare module 'commander' {
442442 fn : ( value : string , previous : T ) => T ,
443443 defaultValue ? : T ,
444444 ) : this ;
445- argument ( name : string , description ? : string , defaultValue ? : mixed ) : this ;
445+ argument ( name : string , description ? : string , defaultValue ? : unknown ) : this ;
446446
447447 /**
448448 * Define argument syntax for command, adding a prepared argument.
@@ -666,8 +666,8 @@ declare module 'commander' {
666666 * or store separately (specify false). In both cases the option values can be accessed using .opts().
667667 * @returns `this` command for chaining
668668 */
669- storeOptionsAsProperties < T : OptionValues > ( ) : this & T ;
670- storeOptionsAsProperties < T : OptionValues > (
669+ storeOptionsAsProperties < T extends OptionValues > ( ) : this & T ;
670+ storeOptionsAsProperties < T extends OptionValues > (
671671 storeAsProperties : true ,
672672 ) : this & T ;
673673 storeOptionsAsProperties ( storeAsProperties ? : boolean ) : this ;
@@ -680,14 +680,14 @@ declare module 'commander' {
680680 /**
681681 * Store option value.
682682 */
683- setOptionValue ( key : string , value : mixed ) : this ;
683+ setOptionValue ( key : string , value : unknown ) : this ;
684684
685685 /**
686686 * Store option value and where the value came from.
687687 */
688688 setOptionValueWithSource (
689689 key : string ,
690- value : mixed ,
690+ value : unknown ,
691691 source : OptionValueSource ,
692692 ) : this ;
693693
@@ -755,7 +755,7 @@ declare module 'commander' {
755755 * ```
756756 * @returns `this` command for chaining
757757 */
758- parse ( argv ?: $ReadOnlyArray < string > , options ?: ParseOptions ) : this ;
758+ parse ( argv ?: ReadonlyArray < string > , options ?: ParseOptions ) : this ;
759759
760760 /**
761761 * Parse `argv`, setting options and invoking commands when defined.
@@ -772,7 +772,7 @@ declare module 'commander' {
772772 * @returns Promise
773773 */
774774 parseAsync (
775- argv ?: $ReadOnlyArray < string > ,
775+ argv ?: ReadonlyArray < string > ,
776776 options ?: ParseOptions ,
777777 ) : Promise < this > ;
778778
@@ -791,12 +791,12 @@ declare module 'commander' {
791791 /**
792792 * Return an object containing local option values as key-value pairs
793793 */
794- opts < T : OptionValues > ( ) : T ;
794+ opts < T extends OptionValues > ( ) : T ;
795795
796796 /**
797797 * Return an object containing merged local and global option values as key-value pairs.
798798 */
799- optsWithGlobals < T : OptionValues > ( ) : T ;
799+ optsWithGlobals < T extends OptionValues > ( ) : T ;
800800
801801 /**
802802 * Set the description.
@@ -847,7 +847,7 @@ declare module 'commander' {
847847 * Only the first alias is shown in the auto-generated help.
848848 * @returns `this` command for chaining
849849 */
850- aliases ( aliases : $ReadOnlyArray < string > ) : this ;
850+ aliases ( aliases : ReadonlyArray < string > ) : this ;
851851
852852 /**
853853 * Get aliases for the command.
0 commit comments