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

Function getRelationKey

test/fixtures/snapshot/typescript.js:67113–67123  ·  view source on GitHub ↗

* To improve caching, the relation key for two generic types uses the target's id plus ids of the type parameters. * For other cases, the types ids are used.

(source, target, intersectionState, relation, ignoreConstraints)

Source from the content-addressed store, hash-verified

67111 * For other cases, the types ids are used.
67112 */
67113 function getRelationKey(source, target, intersectionState, relation, ignoreConstraints) {
67114 if (relation === identityRelation && source.id > target.id) {
67115 var temp = source;
67116 source = target;
67117 target = temp;
67118 }
67119 var postFix = intersectionState ? ":" + intersectionState : "";
67120 return isTypeReferenceWithGenericArguments(source) && isTypeReferenceWithGenericArguments(target) ?
67121 getGenericTypeReferenceRelationKey(source, target, postFix, ignoreConstraints) :
67122 "".concat(source.id, ",").concat(target.id).concat(postFix);
67123 }
67124 // Invoke the callback for each underlying property symbol of the given symbol and return the first
67125 // value that isn't undefined.
67126 function forEachProperty(prop, callback) {

Callers 2

isTypeRelatedToFunction · 0.85
recursiveTypeRelatedToFunction · 0.85

Calls 3

concatMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…