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

Function handleNamespaceImportLike

test/fixtures/snapshot/typescript.js:136454–136459  ·  view source on GitHub ↗

* `import x = require("./x")` or `import * as x from "./x"`. * An `export =` may be imported by this syntax, so it may be a direct import. * If it's not a direct import, it will be in `indirectUsers`, so we don't have to do anything here.

(importName)

Source from the content-addressed store, hash-verified

136452 * If it's not a direct import, it will be in `indirectUsers`, so we don't have to do anything here.
136453 */
136454 function handleNamespaceImportLike(importName) {
136455 // Don't rename an import that already has a different name than the export.
136456 if (exportKind === 2 /* ExportKind.ExportEquals */ && (!isForRename || isNameMatch(importName.escapedText))) {
136457 addSearch(importName, checker.getSymbolAtLocation(importName));
136458 }
136459 }
136460 function searchForNamedImport(namedBindings) {
136461 if (!namedBindings) {
136462 return;

Callers 1

handleImportFunction · 0.85

Calls 2

isNameMatchFunction · 0.85
addSearchFunction · 0.85

Tested by

no test coverage detected