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

Member predicate TypeNameBindingNode::getAnUnderlyingClass

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

For example, the type of x maps to the class C in each example below:

class C {}

var x: C;
var x: C | null;
var x: C & { prop: string };
ClassNode getAnUnderlyingClass()