From efa8c4171b93a8bdf8674ad63db2b9c447d7606f Mon Sep 17 00:00:00 2001 From: Andy Hanson Date: Wed, 7 Dec 2016 08:19:47 -0800 Subject: [PATCH] Reuse code from convertJsonOptionOfCustomType --- src/compiler/commandLineParser.ts | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index e9f9ff210a9a0..025218e62fdbb 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -549,14 +549,7 @@ namespace ts { /* @internal */ export function parseCustomTypeOption(opt: CommandLineOptionOfCustomType, value: string, errors: Diagnostic[]) { - const key = trimString((value || "")).toLowerCase(); - const map = opt.type; - if (key in map) { - return map[key]; - } - else { - errors.push(createCompilerDiagnosticForInvalidCustomType(opt)); - } + return convertJsonOptionOfCustomType(opt, trimString(value || ""), errors); } /* @internal */