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

Function transformImportEqualsDeclaration

test/fixtures/snapshot/typescript.js:108635–108651  ·  view source on GitHub ↗
(decl)

Source from the content-addressed store, hash-verified

108633 return input;
108634 }
108635 function transformImportEqualsDeclaration(decl) {
108636 if (!resolver.isDeclarationVisible(decl))
108637 return;
108638 if (decl.moduleReference.kind === 277 /* SyntaxKind.ExternalModuleReference */) {
108639 // Rewrite external module names if necessary
108640 var specifier = ts.getExternalModuleImportEqualsDeclarationExpression(decl);
108641 return factory.updateImportEqualsDeclaration(decl,
108642 /*decorators*/ undefined, decl.modifiers, decl.isTypeOnly, decl.name, factory.updateExternalModuleReference(decl.moduleReference, rewriteModuleSpecifier(decl, specifier)));
108643 }
108644 else {
108645 var oldDiag = getSymbolAccessibilityDiagnostic;
108646 getSymbolAccessibilityDiagnostic = ts.createGetSymbolAccessibilityDiagnosticForNode(decl);
108647 checkEntityNameVisibility(decl.moduleReference, enclosingDeclaration);
108648 getSymbolAccessibilityDiagnostic = oldDiag;
108649 return decl;
108650 }
108651 }
108652 function transformImportDeclaration(decl) {
108653 if (!decl.importClause) {
108654 // import "mod" - possibly needed for side effects? (global interface patches, module augmentations, etc)

Callers 1

Calls 2

rewriteModuleSpecifierFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…