@@ -13169,20 +13169,14 @@ namespace ts {
13169
13169
const paramType = getTypeAtPosition(signature, 0);
13170
13170
const argType = checkExpressionWithContextualType(node.attributes, paramType, /*contextualMapper*/ undefined);
13171
13171
const argProperties = getPropertiesOfType(argType);
13172
- const paramProperties = getPropertiesOfType(paramType);
13173
- if (argProperties.length === paramProperties.length && checkTypeRelatedTo(argType, paramType, relation, /*errorNode*/ undefined, headMessage)) {
13174
- return true;
13175
- }
13176
- else {
13177
- for (const arg of argProperties) {
13178
- if (!getPropertyOfType(paramType, arg.name) && isUnhyphenatedJsxName(arg.name)) {
13179
- return false;
13180
- }
13181
- }
13182
- if (checkTypeRelatedTo(argType, paramType, relation, /*errorNode*/ undefined, headMessage)) {
13183
- return true;
13172
+ for (const arg of argProperties) {
13173
+ if (!getPropertyOfType(paramType, arg.name) && isUnhyphenatedJsxName(arg.name)) {
13174
+ return false;
13184
13175
}
13185
13176
}
13177
+ if (checkTypeRelatedTo(argType, paramType, relation, /*errorNode*/ undefined, headMessage)) {
13178
+ return true;
13179
+ }
13186
13180
return false;
13187
13181
}
13188
13182
@@ -13723,9 +13717,6 @@ namespace ts {
13723
13717
return resolveErrorCall(node);
13724
13718
13725
13719
function reportError(message: DiagnosticMessage, arg0?: string, arg1?: string, arg2?: string): void {
13726
- if (isJsxOpeningOrSelfClosingElement) {
13727
- return;
13728
- }
13729
13720
let errorInfo: DiagnosticMessageChain;
13730
13721
errorInfo = chainDiagnosticMessages(errorInfo, message, arg0, arg1, arg2);
13731
13722
if (headMessage) {
@@ -14125,7 +14116,7 @@ namespace ts {
14125
14116
let result: Signature;
14126
14117
for (const type of types) {
14127
14118
// This is mainly to fill in all the candidates if there is one.
14128
- result = result || resolveStatelessJsxOpeningLikeElement(openingLikeElement, type, candidatesOutArray);
14119
+ result = result && resolveStatelessJsxOpeningLikeElement(openingLikeElement, type, candidatesOutArray);
14129
14120
}
14130
14121
14131
14122
return result;
0 commit comments