Skip to content

Commit 73e5ad2

Browse files
authored
avoid using string and boolean as variable name (#163550)
1 parent 0dd2dc8 commit 73e5ad2

File tree

1 file changed

+7
-7
lines changed
  • src/vs/platform/environment/node

1 file changed

+7
-7
lines changed

src/vs/platform/environment/node/argv.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,8 @@ export function parseArgs<T>(args: string[], options: OptionDescriptions<T>, err
209209
const firstArg = args.find(a => a.length > 0 && a[0] !== '-');
210210

211211
const alias: { [key: string]: string } = {};
212-
const string: string[] = ['_'];
213-
const boolean: string[] = [];
212+
const stringOptions: string[] = ['_'];
213+
const booleanOptions: string[] = [];
214214
const globalOptions: OptionDescriptions<any> = {};
215215
let command: Subcommand<any> | undefined = undefined;
216216
for (const optionId in options) {
@@ -225,14 +225,14 @@ export function parseArgs<T>(args: string[], options: OptionDescriptions<T>, err
225225
}
226226

227227
if (o.type === 'string' || o.type === 'string[]') {
228-
string.push(optionId);
228+
stringOptions.push(optionId);
229229
if (o.deprecates) {
230-
string.push(...o.deprecates);
230+
stringOptions.push(...o.deprecates);
231231
}
232232
} else if (o.type === 'boolean') {
233-
boolean.push(optionId);
233+
booleanOptions.push(optionId);
234234
if (o.deprecates) {
235-
boolean.push(...o.deprecates);
235+
booleanOptions.push(...o.deprecates);
236236
}
237237
}
238238
if (o.global) {
@@ -255,7 +255,7 @@ export function parseArgs<T>(args: string[], options: OptionDescriptions<T>, err
255255

256256

257257
// remove aliases to avoid confusion
258-
const parsedArgs = minimist(args, { string, boolean, alias });
258+
const parsedArgs = minimist(args, { string: stringOptions, boolean: booleanOptions, alias });
259259

260260
const cleanedArgs: any = {};
261261
const remainingArgs: any = parsedArgs;

0 commit comments

Comments
 (0)