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

Module NameResolution

Provides name resolution and propagates type information.

Import path

import semmle.javascript.internal.NameResolution

Predicates

append

Appends a name onto a qualified name

classHasGlobalName
nodeRefersToClass

Holds if node refers to the given class.

nodeRefersToModule

Holds if node is a reference to the given module, or a qualified name rooted in that module.

readStep

Holds if there is a read from node1 to node2 that accesses the member name.

Classes

LocalVariableLike

A local variable, or a top-level variable that acts as a global variable due to an ambient declaration.

Node

A node in a graph which we use to perform name and type resolution.

Aliases

TypeFlow

Associates nodes with information about types.

ValueFlow

Associates information about values, such as references to a class, module, or namespace.

trackClassValue

Gets the set of nodes reachable from source.

trackFunctionValue

Gets the set of nodes reachable from source.

trackModule

Gets a node to which the given module flows.