MCPcopy Index your code
hub / github.com/nodejs/node / shouldReportUnmatchedPropertyError

Function shouldReportUnmatchedPropertyError

test/fixtures/snapshot/typescript.js:66701–66713  ·  view source on GitHub ↗
(source, target)

Source from the content-addressed store, hash-verified

66699 return result;
66700 }
66701 function shouldReportUnmatchedPropertyError(source, target) {
66702 var typeCallSignatures = getSignaturesOfStructuredType(source, 0 /* SignatureKind.Call */);
66703 var typeConstructSignatures = getSignaturesOfStructuredType(source, 1 /* SignatureKind.Construct */);
66704 var typeProperties = getPropertiesOfObjectType(source);
66705 if ((typeCallSignatures.length || typeConstructSignatures.length) && !typeProperties.length) {
66706 if ((getSignaturesOfType(target, 0 /* SignatureKind.Call */).length && typeCallSignatures.length) ||
66707 (getSignaturesOfType(target, 1 /* SignatureKind.Construct */).length && typeConstructSignatures.length)) {
66708 return true; // target has similar signature kinds to source, still focus on the unmatched property
66709 }
66710 return false;
66711 }
66712 return true;
66713 }
66714 function reportIncompatibleCallSignatureReturn(siga, sigb) {
66715 if (siga.parameters.length === 0 && sigb.parameters.length === 0) {
66716 return function (source, target) { return reportIncompatibleError(ts.Diagnostics.Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1, typeToString(source), typeToString(target)); };

Callers 1

propertiesRelatedToFunction · 0.85

Calls 3

getSignaturesOfTypeFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…