@@ -209,8 +209,8 @@ export function parseArgs<T>(args: string[], options: OptionDescriptions<T>, err
209
209
const firstArg = args . find ( a => a . length > 0 && a [ 0 ] !== '-' ) ;
210
210
211
211
const alias : { [ key : string ] : string } = { } ;
212
- const string : string [ ] = [ '_' ] ;
213
- const boolean : string [ ] = [ ] ;
212
+ const stringOptions : string [ ] = [ '_' ] ;
213
+ const booleanOptions : string [ ] = [ ] ;
214
214
const globalOptions : OptionDescriptions < any > = { } ;
215
215
let command : Subcommand < any > | undefined = undefined ;
216
216
for ( const optionId in options ) {
@@ -225,14 +225,14 @@ export function parseArgs<T>(args: string[], options: OptionDescriptions<T>, err
225
225
}
226
226
227
227
if ( o . type === 'string' || o . type === 'string[]' ) {
228
- string . push ( optionId ) ;
228
+ stringOptions . push ( optionId ) ;
229
229
if ( o . deprecates ) {
230
- string . push ( ...o . deprecates ) ;
230
+ stringOptions . push ( ...o . deprecates ) ;
231
231
}
232
232
} else if ( o . type === 'boolean' ) {
233
- boolean . push ( optionId ) ;
233
+ booleanOptions . push ( optionId ) ;
234
234
if ( o . deprecates ) {
235
- boolean . push ( ...o . deprecates ) ;
235
+ booleanOptions . push ( ...o . deprecates ) ;
236
236
}
237
237
}
238
238
if ( o . global ) {
@@ -255,7 +255,7 @@ export function parseArgs<T>(args: string[], options: OptionDescriptions<T>, err
255
255
256
256
257
257
// remove aliases to avoid confusion
258
- const parsedArgs = minimist ( args , { string, boolean, alias } ) ;
258
+ const parsedArgs = minimist ( args , { string : stringOptions , boolean : booleanOptions , alias } ) ;
259
259
260
260
const cleanedArgs : any = { } ;
261
261
const remainingArgs : any = parsedArgs ;
0 commit comments