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

Class NameResolution::LocalVariableLike

A local variable, or a top-level variable that acts as a global variable due to an ambient declaration.

Import path

import semmle.javascript.internal.NameResolution

Direct supertypes

Indirect supertypes

Known direct subtypes

    Predicates

    Inherited predicates

    declaredIn

    Holds if there is a declaration of this variable in tl.

    from Variable
    getADeclaration

    Gets a declaration declaring this variable, if any.

    from Variable
    getADeclarationStatement

    Gets a declaration statement declaring this variable, if any.

    from Variable
    getADefinition

    Gets a definition for this variable.

    from Variable
    getAReference

    Gets a reference to this variable.

    from Variable
    getAnAccess

    Gets an access to this variable.

    from Variable
    getAnAssignedExpr

    Gets an expression that is directly stored in this variable.

    from Variable
    getDeclarationSpace

    Gets the declaration space this name belongs to.

    from Variable
    getName

    Gets the name of this variable.

    from Variable
    getScope

    Gets the scope this variable is declared in.

    from Variable
    isCaptured

    Holds if this variable is captured in the closure of a nested function.

    from Variable
    isGlobal

    Holds if this is a global variable.

    from Variable
    isLocal

    Holds if this is a local variable.

    from Variable
    isNamespaceExport

    Holds if this is a variable exported from a TypeScript namespace.

    from Variable
    isParameter

    Holds if this variable is a parameter.

    from Variable
    isTopLevelWithAmbientDeclaration

    Holds if this variable is declared in the top-level of a module using a declare statement.

    from Variable
    toString

    Gets a textual representation of this element.

    from Variable

    Charpred