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

Class API::Definition

A node corresponding to a definition of an API component.

Import path

import javascript

Direct supertypes

Indirect supertypes

Predicates

toString

Gets a textual representation of this node.

Inherited predicates

asSink

Get a data-flow node where this value leaves the current codebase and flows into an external library (or in general, any external codebase).

from Node
asSource

Get a data-flow node where this value enters the current codebase.

from Node
getACall

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

from Node
getADecoratedClass

Gets any class that has this value as a decorator.

from Node
getADecoratedMember

Gets any method, field, or accessor that has this value as a decorator.

from Node
getADecoratedParameter

Gets any parameter that has this value as a decorator.

from Node
getAMember

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

from Node
getAParameter

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

from Node
getAPredecessor

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

from 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

from Node
getASuccessor

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

from 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.

from Node
getAValueReachableFromSource

Get a data-flow node where this value may flow after entering the current codebase.

from Node
getAValueReachingSink

Get a data-flow node that transitively flows to an external library (or in general, any external codebase).

from Node
getAnInstantiation

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

from Node
getAnInvocation

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

from Node
getDepth

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

from Node
getForwardingFunction

Gets a node representing a function that is a wrapper around the function represented by this node.

from Node
getInducingNode

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

from Node
getInstance

Gets a node representing an instance of the class represented by this node. This includes instances of subclasses.

from Node
getLastParameter

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

from Node
getLocation

Gets the location of this API node, if it corresponds to a program element with a source location.

from Node
getMaybePromisifiedCall

Gets a call to the function represented by this API component, or a promisified version of the function.

from Node
getMember

Gets a node representing member m of this API component.

from Node
getNumParameter

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

from Node
getParameter

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

from Node
getPath

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

from Node
getPromised

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

from Node
getPromisedError

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

from Node
getReceiver

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

from Node
getReturn

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

from Node
getUnknownMember

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

from Node
hasLocationInfo

DEPRECATED: Use getLocation().hasLocationInfo() instead.

from Node
refersTo

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

from Node