CodeQL library for JavaScript
Search

Class API::Node

An abstract representation of a definition or use of an API component such as a function exported by an npm package, a parameter of such a function, or its result.

Import path

import javascript

Direct supertypes

Known direct subtypes

Predicates

getACall

Gets a call to the function represented by this API component.

getAMember

Gets a node representing a member of this API component where the name of the member may or may not be known statically.

getAParameter

Gets a node representing a parameter or the receiver of the function represented by this node.

getAPredecessor

Gets a node such that there is an edge in the API graph between that other node and this one, and that edge is labeled with lbl

getAPredecessor

Gets a node such that there is an edge in the API graph between this node and the other one.

getARhs

Gets a data-flow node corresponding to the right-hand side of a definition of the API component represented by this node.

getASuccessor

Gets a node such that there is an edge in the API graph between this node and the other one, and that edge is labeled with lbl.

getASuccessor

Gets a node such that there is an edge in the API graph between that other node and this one.

getAUse

Gets a data-flow node corresponding to a use of the API component represented by this node.

getAValueReachingRhs

Gets a data-flow node that may interprocedurally flow to the right-hand side of a definition of the API component represented by this node.

getAnImmediateUse

Gets an immediate use of the API component represented by this node.

getAnInstantiation

Gets a new call to the function represented by this API component.

getAnInvocation

Gets an invocation (with our without new) to the function represented by this API component.

getDepth

Gets the shortest distance from the root to this node in the API graph.

getInducingNode

Gets the data-flow node that gives rise to this node, if any.

getInstance

Gets a node representing an instance of this API component, that is, an object whose constructor is the function represented by this node.

getLastParameter

Gets a node representing the last parameter of the function represented by this node.

getMember

Gets a node representing member m of this API component.

getNumParameter

Gets the number of parameters of the function represented by this node.

getParameter

Gets a node representing the ith parameter of the function represented by this node.

getPath

Gets a string representation of the lexicographically least among all shortest access paths from the root to this node.

getPromised

Gets a node representing the promised value wrapped in the Promise object represented by this node.

getReceiver

Gets a node representing the receiver of the function represented by this node.

getReturn

Gets a node representing the result of the function represented by this node.

getUnknownMember

Gets a node representing a member of this API component where the name of the member is not known statically.

hasLocationInfo

Holds if this node is located in file path between line startline, column startcol, and line endline, column endcol.

refersTo

Holds if this node may take its value from that node.

toString

Gets a textual representation of this node.