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

Member predicate ImportDeclaration::getImportAttributes

Gets the object literal passed as part of the with (or assert) clause in this import declaration.

For example, this gets the { type: "json" } object literal in the following:

import foo from "foo" with { type: "json" };
import foo from "foo" assert { type: "json" };
ObjectExpr getImportAttributes()