From 266a92b1f348005260e7770c06af65b72b3b63dc Mon Sep 17 00:00:00 2001 From: Kanchalai Tanglertsampan Date: Wed, 16 Mar 2016 15:29:13 -0700 Subject: [PATCH] Address PR --- src/compiler/commandLineParser.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index 67176e05980..221ef5b87a8 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -386,9 +386,8 @@ namespace ts { /* @internal */ export function createCompilerDiagnosticForInvalidCustomType(opt: CommandLineOptionOfCustomType): Diagnostic { - const namesOfType: string[] = []; - ts.forEachKey(opt.type, key => { + forEachKey(opt.type, key => { namesOfType.push(` '${key}'`); }); @@ -487,7 +486,7 @@ namespace ts { case "string": return ts.map(values, v => v || ""); default: - return ts.filter(ts.map(values, v => parseCustomTypeOption(opt.element, v)), v => !!v); + return filter(map(values, v => parseCustomTypeOption(opt.element, v)), v => !!v); } } } @@ -743,6 +742,6 @@ namespace ts { } function convertJsonOptionOfListType(option: CommandLineOptionOfListType, values: any[], basePath: string, errors: Diagnostic[]): any[] { - return ts.filter(ts.map(values, v => convertJsonOption(option.element, v, basePath, errors)), v => !!v); + return filter(map(values, v => convertJsonOption(option.element, v, basePath, errors)), v => !!v); } }