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

Function containsReference

test/fixtures/snapshot/typescript.js:63470–63487  ·  view source on GitHub ↗
(node)

Source from the content-addressed store, hash-verified

63468 }
63469 return true;
63470 function containsReference(node) {
63471 switch (node.kind) {
63472 case 192 /* SyntaxKind.ThisType */:
63473 return !!tp.isThisType;
63474 case 79 /* SyntaxKind.Identifier */:
63475 return !tp.isThisType && ts.isPartOfTypeNode(node) && maybeTypeParameterReference(node) &&
63476 getTypeFromTypeNodeWorker(node) === tp; // use worker because we're looking for === equality
63477 case 181 /* SyntaxKind.TypeQuery */:
63478 return true;
63479 case 169 /* SyntaxKind.MethodDeclaration */:
63480 case 168 /* SyntaxKind.MethodSignature */:
63481 return !node.type && !!node.body ||
63482 ts.some(node.typeParameters, containsReference) ||
63483 ts.some(node.parameters, containsReference) ||
63484 !!node.type && containsReference(node.type);
63485 }
63486 return !!ts.forEachChild(node, containsReference);
63487 }
63488 }
63489 function getHomomorphicTypeVariable(type) {
63490 var constraintType = getConstraintTypeFromMappedType(type);

Callers 1

Calls 4

someMethod · 0.80
forEachChildMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…