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

Predicate AccessPath::getAnAssignmentTo

Gets a node that is assigned to the given access path relative to the given root node.

Only gets the immediate right-hand side of an assignment or property, not nodes that transitively flow there.

For example, the class nodes below are all assignments to (x, "").

function f(x) { = class {}; = { bar: class {} };
  let alias = x; = class {};

Import path

import javascript
Node getAnAssignmentTo(Root root, string path)