Module Classes

Provides classes for working with ECMAScript 2015 classes.

Class declarations and class expressions are modeled by (QL) classes ClassDeclaration and ClassExpression, respectively, which are both subclasses of ClassDefinition.

Import path

semmle.javascript.Classes

Imports

javascript

Provides classes for working with JavaScript programs, as well as JSON, YAML and HTML.

Classes

AccessorMethodDeclaration

An accessor method declaration in a class or interface, either a concrete definition or a signature without a body.

AccessorMethodDefinition

A concrete accessor method definition in a class, that is, an accessor method with a function body.

AccessorMethodSignature

An accessor method signature declared in a class or interface, that is, an accessor method without a function body.

CallSignature

A call signature declared in an interface, such as in: interface I { (x: number): number; new (x: string): Object; }

ClassDeclScope

A scope induced by a class declaration with type parameters.

ClassDeclStmt

A class declaration statement.

ClassDefinition

A class definition, that is, either a class declaration statement or a class expression.

ClassExpr

A class expression.

ClassExprScope

A scope induced by a named class expression or class expression with type parameters.

ClassOrInterface

A class or interface definition.

ConstructorCallSignature

A constructor call signature declared in an interface, such as in: interface I { new (x: string): Object; }

ConstructorDeclaration

A constructor declaration in a class, either a concrete definition or a signature without a body.

ConstructorDefinition

The concrete constructor definition of a class, possibly a synthetic constructor if the class did not declare any constructors.

ConstructorSignature

A constructor signature declared in a class, that is, a constructor without a function body.

FieldDeclaration

A field declaration in a class or interface, either a concrete definition or an abstract or ambient field signature.

FieldDefinition

A concrete field definition in a class.

FieldSignature

A field signature declared in a class or interface, that is, an abstract or ambient field declaration.

FunctionCallSignature

A function call signature declared in an interface, such as in: interface I { (x: number): string; }

GetterMethodDeclaration

A getter method declaration in a class or interface, either a concrete definition or a signature without a function body.

GetterMethodDefinition

A concrete getter method definition in a class, that is, a getter method with a function body.

GetterMethodSignature

A getter method signature declared in a class or interface, that is, a getter method without a function body.

IndexSignature

An index signature declared in an interface, such as in: interface I { [x: number]: number; }

MemberDeclaration

A member declaration in a class or interface, that is, either a method declaration or a field declaration.

MemberDefinition

A concrete member of a class, that is, a non-abstract, non-ambient field or method with a body.

MemberSignature

A member signature declared in a class or interface, that is, an abstract or ambient field or method without a function body.

MethodDeclaration

A method declaration in a class or interface, either a concrete definition or a signature without a body.

MethodDefinition

A concrete method definition in a class.

MethodSignature

A method signature declared in a class or interface, that is, a method without a function body.

NewTargetExpr

A new.target expression.

ParameterField

A field induced by an initializing constructor parameter, such as the field x in: class C { constructor(public x: number) {} }

SetterMethodDeclaration

A setter method declaration in a class or interface, either a concrete definition or a signature without a body.

SetterMethodDefinition

A concrete setter method definition in a class, that is, a setter method with a function body

SetterMethodSignature

A setter method signature declared in a class or interface, that is, a setter method without a function body.

SuperCall

A super(...) call.

SuperExpr

A super expression.

SuperPropAccess

A property access on super.

SyntheticConstructor

A function generated by the extractor to implement a synthetic default constructor.