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

Function typesDefinitelyUnrelated

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

Source from the content-addressed store, hash-verified

68303 !target.target.hasRestElement && (source.target.hasRestElement || target.target.fixedLength < source.target.fixedLength);
68304 }
68305 function typesDefinitelyUnrelated(source, target) {
68306 // Two tuple types with incompatible arities are definitely unrelated.
68307 // Two object types that each have a property that is unmatched in the other are definitely unrelated.
68308 return isTupleType(source) && isTupleType(target) ? tupleTypesDefinitelyUnrelated(source, target) :
68309 !!getUnmatchedProperty(source, target, /*requireOptionalProperties*/ false, /*matchDiscriminantProperties*/ true) &&
68310 !!getUnmatchedProperty(target, source, /*requireOptionalProperties*/ false, /*matchDiscriminantProperties*/ false);
68311 }
68312 function getTypeFromInference(inference) {
68313 return inference.candidates ? getUnionType(inference.candidates, 2 /* UnionReduction.Subtype */) :
68314 inference.contraCandidates ? getIntersectionType(inference.contraCandidates) :

Callers 1

inferFromObjectTypesFunction · 0.85

Calls 3

isTupleTypeFunction · 0.85
getUnmatchedPropertyFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…