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

Function propertiesIdenticalTo

test/fixtures/snapshot/typescript.js:66584–66607  ·  view source on GitHub ↗
(source, target, excludedProperties)

Source from the content-addressed store, hash-verified

66582 return result;
66583 }
66584 function propertiesIdenticalTo(source, target, excludedProperties) {
66585 if (!(source.flags & 524288 /* TypeFlags.Object */ && target.flags & 524288 /* TypeFlags.Object */)) {
66586 return 0 /* Ternary.False */;
66587 }
66588 var sourceProperties = excludeProperties(getPropertiesOfObjectType(source), excludedProperties);
66589 var targetProperties = excludeProperties(getPropertiesOfObjectType(target), excludedProperties);
66590 if (sourceProperties.length !== targetProperties.length) {
66591 return 0 /* Ternary.False */;
66592 }
66593 var result = -1 /* Ternary.True */;
66594 for (var _i = 0, sourceProperties_1 = sourceProperties; _i < sourceProperties_1.length; _i++) {
66595 var sourceProp = sourceProperties_1[_i];
66596 var targetProp = getPropertyOfObjectType(target, sourceProp.escapedName);
66597 if (!targetProp) {
66598 return 0 /* Ternary.False */;
66599 }
66600 var related = compareProperties(sourceProp, targetProp, isRelatedTo);
66601 if (!related) {
66602 return 0 /* Ternary.False */;
66603 }
66604 result &= related;
66605 }
66606 return result;
66607 }
66608 function signaturesRelatedTo(source, target, kind, reportErrors) {
66609 var _a, _b;
66610 if (relation === identityRelation) {

Callers 1

propertiesRelatedToFunction · 0.85

Calls 4

excludePropertiesFunction · 0.85
getPropertyOfObjectTypeFunction · 0.85
comparePropertiesFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…