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

Member predicate TypeNameBindingNode::getTypeDefinition

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

For example:

class Foo {}

type T = Foo;
var x: T; // getTypeDefinition() maps T to the class Foo above

Note that this has no result for function-style classes referenced from a JSDoc comment.

TypeDefinition getTypeDefinition()