CodeQL library for JavaScript/TypeScript
codeql/javascript-all 2.6.16 (changelog, source)
Search

Member predicate ImportDeclaration::getAmbiguousDefaultImportNode

Gets the data flow node corresponding to the foo in import foo from "somewhere".

This refers to the default import, but some non-standard compilers will treat it as a namespace import. In order to support both interpretations, it is considered an “ambiguous default import”.

Note that renamed default imports, such as import { default as foo } from "somewhere", are not considered ambiguous, and will not be reported by this predicate.

Node getAmbiguousDefaultImportNode()