MCPcopy Create free account
hub / github.com/nodejs/node / isNameOfDeclarationWithCollidingName

Function isNameOfDeclarationWithCollidingName

test/fixtures/snapshot/typescript.js:101541–101551  ·  view source on GitHub ↗

* Determines whether a name is the name of a declaration with a colliding name. * NOTE: This function expects to be called with an original source tree node. * * @param node An original source tree node.

(node)

Source from the content-addressed store, hash-verified

101539 * @param node An original source tree node.
101540 */
101541 function isNameOfDeclarationWithCollidingName(node) {
101542 switch (node.parent.kind) {
101543 case 203 /* SyntaxKind.BindingElement */:
101544 case 257 /* SyntaxKind.ClassDeclaration */:
101545 case 260 /* SyntaxKind.EnumDeclaration */:
101546 case 254 /* SyntaxKind.VariableDeclaration */:
101547 return node.parent.name === node
101548 && resolver.isDeclarationWithCollidingName(node.parent);
101549 }
101550 return false;
101551 }
101552 /**
101553 * Substitutes an expression.
101554 *

Callers 1

substituteIdentifierFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected