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

Member predicate ImportDeclaration::getImportAssertion

DEPRECATED: use getImportAttributes instead. 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 getImportAssertion()