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

Member predicate LocalVariable :: getDeclaringContainer

Gets the function or toplevel in which this variable is declared; arguments variables are taken to be implicitly declared in the function to which they belong.

Note that for a function expression function f() { ... } the variable f is declared in the function itself, while for a function statement it is declared in the enclosing container.

StmtContainer getDeclaringContainer ( )