Module

x/ts_morph/ts_morph.d.ts>ClassDeclaration

TypeScript Compiler API wrapper for static analysis and programmatic code changes.
Very Popular
Go to Latest
class ClassDeclaration
extends ClassDeclarationBase<ts.ClassDeclaration>
import { ClassDeclaration } from "https://dotland.deno.dev/x/ts_morph@18.0.0/ts_morph.d.ts";

Methods

extractInterface(name?: string): InterfaceDeclarationStructure

Extracts an interface declaration structure from the class.

extractStaticInterface(name: string): InterfaceDeclarationStructure

Extracts an interface declaration structure from the static part of the class.

getParent(): NodeParentType<ts.ClassDeclaration>
getParentOrThrow(message?: string | (() => string)): NonNullable<NodeParentType<ts.ClassDeclaration>>
getStructure(): ClassDeclarationStructure

Gets the structure equivalent to this node.

set(structure: Partial<ClassDeclarationStructure>): this

Sets the node from a structure.