CodeQL library for JavaScript/TypeScript
codeql/javascript-all 1.0.3-dev (changelog, source)

Member predicate Import::getImportedModule

Gets the module this import refers to.

The result is either an externs module, or an actual source module; in cases of ambiguity, the former are preferred. This models the runtime behavior of Node.js imports, which prefer core modules such as fs over any source module of the same name.

Module getImportedModule()