Skip to content

Commit 7b1fc21

Browse files
author
Andy
authored
Merge pull request #12708 from Microsoft/convert_json_option
Reuse code from convertJsonOptionOfCustomType
2 parents c1ec7ef + efa8c41 commit 7b1fc21

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

src/compiler/commandLineParser.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -549,14 +549,7 @@ namespace ts {
549549

550550
/* @internal */
551551
export function parseCustomTypeOption(opt: CommandLineOptionOfCustomType, value: string, errors: Diagnostic[]) {
552-
const key = trimString((value || "")).toLowerCase();
553-
const map = opt.type;
554-
if (key in map) {
555-
return map[key];
556-
}
557-
else {
558-
errors.push(createCompilerDiagnosticForInvalidCustomType(opt));
559-
}
552+
return convertJsonOptionOfCustomType(opt, trimString(value || ""), errors);
560553
}
561554

562555
/* @internal */

0 commit comments

Comments
 (0)