From 9006b44ddf0d36eeb6020e4365100d9e2f12b4b2 Mon Sep 17 00:00:00 2001 From: Ryan Cavanaugh Date: Tue, 10 Nov 2015 17:17:30 -0800 Subject: [PATCH] CR feedback --- src/compiler/checker.ts | 2 +- src/harness/harness.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 8422e42c175..2ad9334676d 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -7888,7 +7888,7 @@ namespace ts { // assignable to the JSX Element Type const callSignature = getSingleCallSignature(getTypeOfSymbol(sym)); const callReturnType = callSignature && getReturnTypeOfSignature(callSignature); - let paramType = callReturnType && callSignature && (callSignature.parameters.length === 0 ? emptyObjectType : getTypeOfSymbol(callSignature.parameters[0])); + let paramType = callReturnType && (callSignature.parameters.length === 0 ? emptyObjectType : getTypeOfSymbol(callSignature.parameters[0])); if (callReturnType && isTypeAssignableTo(callReturnType, jsxElementType) && (paramType.flags & TypeFlags.ObjectType)) { // Intersect in JSX.IntrinsicAttributes if it exists const intrinsicAttributes = getJsxType(JsxNames.IntrinsicAttributes); diff --git a/src/harness/harness.ts b/src/harness/harness.ts index d4d6c89a20f..fafe4257d74 100644 --- a/src/harness/harness.ts +++ b/src/harness/harness.ts @@ -1119,10 +1119,10 @@ namespace Harness { // Files from tests\lib that are requested by "@libFiles" if (options.libFiles) { - ts.forEach(options.libFiles.split(","), filename => { - const libFileName = "tests/lib/" + filename; + for (const fileName of options.libFiles.split(",")) { + const libFileName = "tests/lib/" + fileName; includeBuiltFiles.push({ unitName: libFileName, content: normalizeLineEndings(IO.readFile(libFileName), newLine) }); - }); + } }