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

Member predicate ImportSpecifier::getImportedName

Gets the name of the imported symbol.

For example, consider these four imports:

import { x } from 'a'
import { y as z } from 'b'
import f from 'c'
import * as g from 'd'

The names of the imported symbols for the first three of them are, respectively, x, y and default, while the last one does not import an individual symbol.

string getImportedName()