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

Function checkCollisionsForDeclarationName

test/fixtures/snapshot/typescript.js:82409–82425  ·  view source on GitHub ↗
(node, name)

Source from the content-addressed store, hash-verified

82407 }
82408 }
82409 function checkCollisionsForDeclarationName(node, name) {
82410 if (!name)
82411 return;
82412 checkCollisionWithRequireExportsInGeneratedCode(node, name);
82413 checkCollisionWithGlobalPromiseInGeneratedCode(node, name);
82414 recordPotentialCollisionWithWeakMapSetInGeneratedCode(node, name);
82415 recordPotentialCollisionWithReflectInGeneratedCode(node, name);
82416 if (ts.isClassLike(node)) {
82417 checkTypeNameIsReserved(name, ts.Diagnostics.Class_name_cannot_be_0);
82418 if (!(node.flags & 16777216 /* NodeFlags.Ambient */)) {
82419 checkClassNameCollisionWithObject(name);
82420 }
82421 }
82422 else if (ts.isEnumDeclaration(node)) {
82423 checkTypeNameIsReserved(name, ts.Diagnostics.Enum_name_cannot_be_0);
82424 }
82425 }
82426 function checkVarDeclaredNamesNotShadowed(node) {
82427 // - ScriptBody : StatementList
82428 // It is a Syntax Error if any element of the LexicallyDeclaredNames of StatementList

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…