CodeQL library for JavaScript/TypeScript
codeql/javascript-all 1.0.1 (changelog, source)

Class LocalTypeName

The local name for a type in a particular scope.

It is possible for two distinct local type names to refer to the same underlying type through imports or type aliases. For example:

namespace A {
  export class C {}
namespace B {
  import C = A.C;

In the above example, two distinct local type names exist for the type C: one in A and one in B. Since a local type name is always specific to one scope, it is not possible for the two namespaces to share a single local type name for C.

There may be multiple declarations of a given local type name, for example:

interface Point { x: number; }
interface Point { y: number; }

In the above example, the two declarations of Point refer to the same local type name.

Import path

import javascript

Direct supertypes

Indirect supertypes



Gets a declaration of this type name.


Gets a use of this type name in a type annotation.


Gets an identifier that refers to this type name.


Gets a use of this type name in an export.


Gets the declaration space this name belongs to.


Gets the first declaration of this type name.


Gets the local name of this type.


Gets the scope this type name is declared in.


Gets a textual representation of this element.