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 global access path.

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

For example, the class nodes below are all assignments to = class {};
foo = { bar: class {} };
(function(f) { = class {}
 })(foo = foo || {});

Import path

import javascript
Node getAnAssignmentTo(string path)