From 9fa268a44a527560fd2f096ab9e043e1375435e6 Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Mon, 19 Oct 2015 10:15:59 -0700 Subject: [PATCH] addressed PR feedback --- src/compiler/commandLineParser.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index 95583a1903..0c561ab06d 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -460,16 +460,13 @@ namespace ts { export function convertCompilerOptionsFromJson(jsonOptions: any, basePath: string): { options: CompilerOptions, errors: Diagnostic[] } { let options: CompilerOptions = {}; - let optionNameMap: Map = {}; let errors: Diagnostic[] = []; if (!jsonOptions) { return { options, errors }; } - forEach(optionDeclarations, option => { - optionNameMap[option.name] = option; - }); + let optionNameMap = arrayToMap(optionDeclarations, opt => opt.name); for (let id in jsonOptions) { if (hasProperty(optionNameMap, id)) {