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