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); } }