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

Class TypeNameBindingNode

Interface for accessing name-resolution info about type names.

Import path

import semmle.javascript.internal.BindingInfo

Direct supertypes

Indirect supertypes

Predicates

getAnUnderlyingClass

Gets a class that this type refers to, after unfolding unions and intersections (but not subtyping).

getTypeDefinition

Gets the declaration of the type being referenced by this name.

hasQualifiedName

Holds if type refers to, or is an alias for, the given type name relative to the global scope.

hasQualifiedName

Holds if this refers to a value exported by the given module, with the given qualified name. If the qualifiedName is empty, this refers to the module itself.

hasUnderlyingStringOrAnyType

Holds if this type contains string or any, possibly wrapped in a promise.

hasUnderlyingType

Holds if this type refers to the given type from the global scope, after unfolding unions and intersections, and following subtype relations.

hasUnderlyingType

Holds if this type refers to the given type exported from the given module, after unfolding unions and intersections, and following subtype relations.

isPromiseType

Holds if the given type is a Promise object. Does not hold for unions unless all parts of the union are promises.

isSanitizingPrimitiveType

Holds if this refers to a type that is considered untaintable (if actually enforced at runtime).

Inherited predicates

getLocation

Gets the location of this node.

from Node
toString

Gets a string representation of this node.

from Node