Skip to content
Prev Previous commit
Fix linting error
  • Loading branch information
Kanchalai Tanglertsampan committed Jun 24, 2016
commit d07b27efc62b6a7341aa635776fed73271ea9762
2 changes: 1 addition & 1 deletion src/compiler/checker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9843,7 +9843,7 @@ namespace ts {
if (indexSignatureType) {
return indexSignatureType;
}
error(node, Diagnostics.Property_0_does_not_exist_on_type_1, stringLiteralTypeName, "JSX." + JsxNames.IntrinsicElements)
error(node, Diagnostics.Property_0_does_not_exist_on_type_1, stringLiteralTypeName, "JSX." + JsxNames.IntrinsicElements);
}
// If we need to report an error, we already done so here. So just return any to prevent any more error downstream
return anyType;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't look like you return anyType/unknownType if you couldn't find an intrinsicElementsType for a string literal.

Why not make it

if (intrinsicElementsType === unknownType) {
    return unknownType;
}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that is actually intended that if intrinsicElementsType === unknownType then you just fall through and check for the construct/call though, arguably we should actually return unknownType instead

Expand Down