@@ -9642,29 +9642,29 @@ namespace ts {
9642
9642
break;
9643
9643
}
9644
9644
case "ts-strict":
9645
- case "ts-noImplicitAny ":
9646
- case "ts-strictNullChecks ":
9647
- case "ts-strictFunctionTypes ":
9648
- case "ts-strictBindCallApply ":
9649
- case "ts-noImplicitThis ":
9650
- case "ts-strictPropertyInitialization ":
9651
- case "ts-useUnknownInCatchVariables ":
9652
- case "ts-alwaysStrict ":
9653
- case "ts-noUnusedLocals ":
9654
- case "ts-noUnusedParameters ":
9655
- case "ts-exactOptionalPropertyTypes ":
9656
- case "ts-noPropertyAccessFromIndexSignature ":
9657
- case "ts-noImplicitReturns ":
9658
- case "ts-noFallthroughCasesInSwitch ":
9659
- case "ts-noUncheckedIndexedAccess ":
9660
- case "ts-noImplicitOverride ": {
9645
+ case "ts-noimplicitany ":
9646
+ case "ts-strictnullchecks ":
9647
+ case "ts-strictfunctiontypes ":
9648
+ case "ts-strictbindcallapply ":
9649
+ case "ts-noimplicitthis ":
9650
+ case "ts-strictpropertyinitialization ":
9651
+ case "ts-useunknownincatchvariables ":
9652
+ case "ts-alwaysstrict ":
9653
+ case "ts-nounusedlocals ":
9654
+ case "ts-nounusedparameters ":
9655
+ case "ts-exactoptionalpropertytypes ":
9656
+ case "ts-nopropertyaccessfromindexsignature ":
9657
+ case "ts-noimplicitreturns ":
9658
+ case "ts-nofallthroughcasesinswitch ":
9659
+ case "ts-nouncheckedindexedaccess ":
9660
+ case "ts-noimplicitoverride ": {
9661
9661
const optName = key.slice(3);
9662
- const opt = find(optionsAllowedAsPragmaOption, o => o.name === optName)!;
9662
+ const opt = find(optionsAllowedAsPragmaOption, o => o.name.toLowerCase() === optName)!;
9663
9663
const entry = (isArray(entryOrList) ? last(entryOrList) : entryOrList);
9664
- const unparsedValue = (entry.arguments as PragmaArgumentType<`ts-${FileLocalOptionName}`>).value;
9664
+ const unparsedValue = (entry.arguments as PragmaArgumentType<`ts-${Lowercase< FileLocalOptionName> }`>).value;
9665
9665
const optContainer: OptionsBase = {};
9666
9666
const errors: Diagnostic[] = []
9667
- const parsedValue = unparsedValue === undefined ? true : (parseOptionValue([unparsedValue], 0, /*diagnostics*/ undefined, opt, optContainer, errors), optContainer[unparsedValue ]);
9667
+ const parsedValue = unparsedValue === undefined ? true : (parseOptionValue([unparsedValue], 0, /*diagnostics*/ undefined, opt, optContainer, errors), optContainer[opt.name ]);
9668
9668
if (unparsedValue === undefined && opt.type !== "boolean") {
9669
9669
errors.push(createCompilerDiagnostic(Diagnostics.Compiler_option_0_expects_an_argument, optName));
9670
9670
}
@@ -9679,7 +9679,7 @@ namespace ts {
9679
9679
});
9680
9680
}
9681
9681
if (!length(errors)) {
9682
- (context.localOptions ??= {})[optName ] = parsedValue;
9682
+ (context.localOptions ??= {})[opt.name as string ] = parsedValue;
9683
9683
}
9684
9684
}
9685
9685
case "jsx":
0 commit comments