⬅️ Back to Table of Contents
📄 ClassBase
📊 Analysis Summary
| Metric |
Count |
| 📦 Imports |
8 |
| 📐 Interfaces |
1 |
📚 Table of Contents
🛠️ File Location:
📂 packages/ast-spec/src/base/ClassBase.ts
📦 Imports
| Name |
Source |
Identifier |
../expression/Identifier/spec |
ClassBody |
../special/ClassBody/spec |
Decorator |
../special/Decorator/spec |
TSClassImplements |
../special/TSClassImplements/spec |
TSTypeParameterDeclaration |
../special/TSTypeParameterDeclaration/spec |
TSTypeParameterInstantiation |
../special/TSTypeParameterInstantiation/spec |
LeftHandSideExpression |
../unions/LeftHandSideExpression |
BaseNode |
./BaseNode |
Interfaces
ClassBase
Interface Code
export interface ClassBase extends BaseNode {
/**
* Whether the class is an abstract class.
* @example
* ```ts
* abstract class Foo {}
* ```
*/
abstract: boolean;
/**
* The class body.
*/
body: ClassBody;
/**
* Whether the class has been `declare`d:
* @example
* ```ts
* declare class Foo {}
* ```
*/
declare: boolean;
/**
* The decorators declared for the class.
* @example
* ```ts
* @deco
* class Foo {}
* ```
*/
decorators: Decorator[];
/**
* The class's name.
* - For a `ClassExpression` this may be `null` if the name is omitted.
* - For a `ClassDeclaration` this may be `null` if and only if the parent is
* an `ExportDefaultDeclaration`.
*/
id: Identifier | null;
/**
* The implemented interfaces for the class.
*/
implements: TSClassImplements[];
/**
* The super class this class extends.
*/
superClass: LeftHandSideExpression | null;
/**
* The generic type parameters passed to the superClass.
*/
superTypeArguments: TSTypeParameterInstantiation | undefined;
/**
* The generic type parameters declared for the class.
*/
typeParameters: TSTypeParameterDeclaration | undefined;
}
Properties
| Name |
Type |
Optional |
Description |
abstract |
boolean |
✗ |
not shown |
body |
ClassBody |
✗ |
not shown |
declare |
boolean |
✗ |
not shown |
decorators |
Decorator[] |
✗ |
not shown |
id |
Identifier \| null |
✗ |
not shown |
implements |
TSClassImplements[] |
✗ |
not shown |
superClass |
LeftHandSideExpression \| null |
✗ |
not shown |
superTypeArguments |
TSTypeParameterInstantiation \| undefined |
✗ |
not shown |
typeParameters |
TSTypeParameterDeclaration \| undefined |
✗ |
not shown |
Generated by Syntax Scribe