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

Module Declarations

Provides predicates for finding variable references and declarations in a given function or toplevel.

Import path

import Declarations.Declarations

Imports

javascript

Provides classes for working with JavaScript programs, as well as JSON, YAML and HTML.

Predicates

firstRefInContainer

Gets the textually first reference to var (if kind is Ref()) or declaration of var (if kind is Decl()) in sc.

firstRefInTopLevel

Gets the textually first reference to var (if kind is Ref()) or declaration of var (if kind is Decl()) in tl.

refInContainer

Gets a reference to var (if kind is Ref()) or declaration of var (if kind is Decl()) in sc.

refInTopLevel

Gets a reference to var (if kind is Ref()) or declaration of var (if kind is Decl()) in tl.

Datatypes

RefKind

Classification of variable references; all references have kind Ref, but only declarations have kind Decl.