@servicenow/sdk - v4.4.1
    Preparing search index...

    Interface ClassLikeDeclarationBase

    interface ClassLikeDeclarationBase {
        addConstructor(
            structure?: OptionalKind<ConstructorDeclarationStructure>,
        ): ConstructorDeclaration;
        addConstructors(
            structures: readonly OptionalKind<ConstructorDeclarationStructure>[],
        ): ConstructorDeclaration[];
        addDecorator(structure: OptionalKind<DecoratorStructure>): Decorator;
        addDecorators(
            structures: readonly OptionalKind<DecoratorStructure>[],
        ): Decorator[];
        addGetAccessor(
            structure: OptionalKind<GetAccessorDeclarationStructure>,
        ): GetAccessorDeclaration;
        addGetAccessors(
            structures: readonly OptionalKind<GetAccessorDeclarationStructure>[],
        ): GetAccessorDeclaration[];
        addImplements(text: string): ExpressionWithTypeArguments;
        addImplements(
            text: WriterFunction | readonly (string | WriterFunction)[],
        ): ExpressionWithTypeArguments[];
        addJsDoc(
            structure: string | WriterFunction | OptionalKind<JSDocStructure>,
        ): JSDoc;
        addJsDocs(
            structures: readonly (
                string
                | WriterFunction
                | OptionalKind<JSDocStructure>
            )[],
        ): JSDoc[];
        addMember(
            member: string | WriterFunction | ClassMemberStructures,
        ): ClassMemberTypes | CommentClassElement;
        addMembers(
            members:
                | string
                | WriterFunction
                | readonly (string | WriterFunction | ClassMemberStructures)[],
        ): (ClassMemberTypes | CommentClassElement)[];
        addMethod(
            structure: OptionalKind<MethodDeclarationStructure>,
        ): MethodDeclaration;
        addMethods(
            structures: readonly OptionalKind<MethodDeclarationStructure>[],
        ): MethodDeclaration[];
        addProperties(
            structures: readonly OptionalKind<PropertyDeclarationStructure>[],
        ): PropertyDeclaration[];
        addProperty(
            structure: OptionalKind<PropertyDeclarationStructure>,
        ): PropertyDeclaration;
        addSetAccessor(
            structure: OptionalKind<SetAccessorDeclarationStructure>,
        ): SetAccessorDeclaration;
        addSetAccessors(
            structures: readonly OptionalKind<SetAccessorDeclarationStructure>[],
        ): SetAccessorDeclaration[];
        addStaticBlock(
            structure?: OptionalKind<ClassStaticBlockDeclarationStructure>,
        ): ClassStaticBlockDeclaration;
        addStaticBlocks(
            structures: readonly OptionalKind<ClassStaticBlockDeclarationStructure>[],
        ): ClassStaticBlockDeclaration[];
        addTypeParameter(
            structure: string | OptionalKind<TypeParameterDeclarationStructure>,
        ): TypeParameterDeclaration;
        addTypeParameters(
            structures: readonly (
                string
                | OptionalKind<TypeParameterDeclarationStructure>
            )[],
        ): TypeParameterDeclaration[];
        findReferences(): ReferencedSymbol[];
        findReferencesAsNodes(): Node<tsc.Node>[];
        getAbstractKeyword(): Node<tsc.Node> | undefined;
        getAbstractKeywordOrThrow(message?: string | (() => string)): Node;
        getBaseClass(): ClassDeclaration | undefined;
        getBaseClassOrThrow(message?: string | (() => string)): ClassDeclaration;
        getBaseTypes(): Type<tsc.Type>[];
        getConstructors(): ConstructorDeclaration[];
        getDecorator(name: string): Decorator | undefined;
        getDecorator(
            findFunction: (declaration: Decorator) => boolean,
        ): Decorator | undefined;
        getDecoratorOrThrow(name: string): Decorator;
        getDecoratorOrThrow(
            findFunction: (declaration: Decorator) => boolean,
        ): Decorator;
        getDecorators(): Decorator[];
        getDerivedClasses(): ClassDeclaration[];
        getExtends(): ExpressionWithTypeArguments | undefined;
        getExtendsOrThrow(
            message?: string | (() => string),
        ): ExpressionWithTypeArguments;
        getFirstModifierByKind<TKind extends tsc.SyntaxKind>(
            kind: TKind,
        ): KindToNodeMappings[TKind] | undefined;
        getFirstModifierByKindOrThrow<TKind extends tsc.SyntaxKind>(
            kind: TKind,
        ): KindToNodeMappings[TKind];
        getGetAccessor(name: string): GetAccessorDeclaration | undefined;
        getGetAccessor(
            findFunction: (getAccessor: GetAccessorDeclaration) => boolean,
        ): GetAccessorDeclaration | undefined;
        getGetAccessorOrThrow(name: string): GetAccessorDeclaration;
        getGetAccessorOrThrow(
            findFunction: (getAccessor: GetAccessorDeclaration) => boolean,
        ): GetAccessorDeclaration;
        getGetAccessors(): GetAccessorDeclaration[];
        getHeritageClauseByKind(
            kind: ExtendsKeyword | ImplementsKeyword,
        ): HeritageClause | undefined;
        getHeritageClauseByKindOrThrow(
            kind: ExtendsKeyword | ImplementsKeyword,
        ): HeritageClause;
        getHeritageClauses(): HeritageClause[];
        getImplements(): ExpressionWithTypeArguments[];
        getInstanceMember(name: string): ClassInstanceMemberTypes | undefined;
        getInstanceMember(
            findFunction: (member: ClassInstanceMemberTypes) => boolean,
        ): ClassInstanceMemberTypes | undefined;
        getInstanceMemberOrThrow(name: string): ClassInstanceMemberTypes;
        getInstanceMemberOrThrow(
            findFunction: (member: ClassInstanceMemberTypes) => boolean,
        ): ClassInstanceMemberTypes;
        getInstanceMembers(): ClassInstanceMemberTypes[];
        getInstanceMethod(name: string): MethodDeclaration | undefined;
        getInstanceMethod(
            findFunction: (method: MethodDeclaration) => boolean,
        ): MethodDeclaration | undefined;
        getInstanceMethodOrThrow(name: string): MethodDeclaration;
        getInstanceMethodOrThrow(
            findFunction: (method: MethodDeclaration) => boolean,
        ): MethodDeclaration;
        getInstanceMethods(): MethodDeclaration[];
        getInstanceProperties(): ClassInstancePropertyTypes[];
        getInstanceProperty(name: string): ClassInstancePropertyTypes | undefined;
        getInstanceProperty(
            findFunction: (prop: ClassInstancePropertyTypes) => boolean,
        ): ClassInstancePropertyTypes | undefined;
        getInstancePropertyOrThrow(name: string): ClassInstancePropertyTypes;
        getInstancePropertyOrThrow(
            findFunction: (prop: ClassInstancePropertyTypes) => boolean,
        ): ClassInstancePropertyTypes;
        getJsDocs(): JSDoc[];
        getMember(name: string): ClassMemberTypes | undefined;
        getMember(
            findFunction: (member: ClassMemberTypes) => boolean,
        ): ClassMemberTypes | undefined;
        getMemberOrThrow(name: string): ClassMemberTypes;
        getMemberOrThrow(
            findFunction: (member: ClassMemberTypes) => boolean,
        ): ClassMemberTypes;
        getMembers(): ClassMemberTypes[];
        getMembersWithComments(): (ClassMemberTypes | CommentClassElement)[];
        getMethod(name: string): MethodDeclaration | undefined;
        getMethod(
            findFunction: (method: MethodDeclaration) => boolean,
        ): MethodDeclaration | undefined;
        getMethodOrThrow(name: string): MethodDeclaration;
        getMethodOrThrow(
            findFunction: (method: MethodDeclaration) => boolean,
        ): MethodDeclaration;
        getMethods(): MethodDeclaration[];
        getModifiers(): Node<Modifier>[];
        getName(): string | undefined;
        getNameNode(): Identifier | undefined;
        getNameNodeOrThrow(message?: string | (() => string)): Identifier;
        getNameOrThrow(message?: string | (() => string)): string;
        getProperties(): PropertyDeclaration[];
        getProperty(name: string): PropertyDeclaration | undefined;
        getProperty(
            findFunction: (property: PropertyDeclaration) => boolean,
        ): PropertyDeclaration | undefined;
        getPropertyOrThrow(name: string): PropertyDeclaration;
        getPropertyOrThrow(
            findFunction: (property: PropertyDeclaration) => boolean,
        ): PropertyDeclaration;
        getSetAccessor(name: string): SetAccessorDeclaration | undefined;
        getSetAccessor(
            findFunction: (setAccessor: SetAccessorDeclaration) => boolean,
        ): SetAccessorDeclaration | undefined;
        getSetAccessorOrThrow(name: string): SetAccessorDeclaration;
        getSetAccessorOrThrow(
            findFunction: (setAccessor: SetAccessorDeclaration) => boolean,
        ): SetAccessorDeclaration;
        getSetAccessors(): SetAccessorDeclaration[];
        getStaticBlocks(): ClassStaticBlockDeclaration[];
        getStaticMember(name: string): ClassStaticMemberTypes | undefined;
        getStaticMember(
            findFunction: (member: ClassStaticMemberTypes) => boolean,
        ): ClassStaticMemberTypes | undefined;
        getStaticMemberOrThrow(name: string): ClassStaticMemberTypes;
        getStaticMemberOrThrow(
            findFunction: (member: ClassStaticMemberTypes) => boolean,
        ): ClassStaticMemberTypes;
        getStaticMembers(): ClassStaticMemberTypes[];
        getStaticMethod(name: string): MethodDeclaration | undefined;
        getStaticMethod(
            findFunction: (method: MethodDeclaration) => boolean,
        ): MethodDeclaration | undefined;
        getStaticMethodOrThrow(name: string): MethodDeclaration;
        getStaticMethodOrThrow(
            findFunction: (method: MethodDeclaration) => boolean,
        ): MethodDeclaration;
        getStaticMethods(): MethodDeclaration[];
        getStaticProperties(): ClassStaticPropertyTypes[];
        getStaticProperty(name: string): ClassStaticPropertyTypes | undefined;
        getStaticProperty(
            findFunction: (prop: ClassStaticPropertyTypes) => boolean,
        ): ClassStaticPropertyTypes | undefined;
        getStaticPropertyOrThrow(name: string): ClassStaticPropertyTypes;
        getStaticPropertyOrThrow(
            findFunction: (prop: ClassStaticPropertyTypes) => boolean,
        ): ClassStaticPropertyTypes;
        getTypeParameter(name: string): TypeParameterDeclaration | undefined;
        getTypeParameter(
            findFunction: (declaration: TypeParameterDeclaration) => boolean,
        ): TypeParameterDeclaration | undefined;
        getTypeParameterOrThrow(name: string): TypeParameterDeclaration;
        getTypeParameterOrThrow(
            findFunction: (declaration: TypeParameterDeclaration) => boolean,
        ): TypeParameterDeclaration;
        getTypeParameters(): TypeParameterDeclaration[];
        hasModifier(kind: tsc.SyntaxKind): boolean;
        hasModifier(text: ModifierTexts): boolean;
        insertConstructor(
            index: number,
            structure?: OptionalKind<ConstructorDeclarationStructure>,
        ): ConstructorDeclaration;
        insertConstructors(
            index: number,
            structures: readonly OptionalKind<ConstructorDeclarationStructure>[],
        ): ConstructorDeclaration[];
        insertDecorator(
            index: number,
            structure: OptionalKind<DecoratorStructure>,
        ): Decorator;
        insertDecorators(
            index: number,
            structures: readonly OptionalKind<DecoratorStructure>[],
        ): Decorator[];
        insertGetAccessor(
            index: number,
            structure: OptionalKind<GetAccessorDeclarationStructure>,
        ): GetAccessorDeclaration;
        insertGetAccessors(
            index: number,
            structures: readonly OptionalKind<GetAccessorDeclarationStructure>[],
        ): GetAccessorDeclaration[];
        insertImplements(
            index: number,
            texts: WriterFunction | readonly (string | WriterFunction)[],
        ): ExpressionWithTypeArguments[];
        insertImplements(index: number, text: string): ExpressionWithTypeArguments;
        insertJsDoc(
            index: number,
            structure: string | WriterFunction | OptionalKind<JSDocStructure>,
        ): JSDoc;
        insertJsDocs(
            index: number,
            structures: readonly (
                string
                | WriterFunction
                | OptionalKind<JSDocStructure>
            )[],
        ): JSDoc[];
        insertMember(
            index: number,
            member: string | WriterFunction | ClassMemberStructures,
        ): ClassMemberTypes | CommentClassElement;
        insertMembers(
            index: number,
            members:
                | string
                | WriterFunction
                | readonly (string | WriterFunction | ClassMemberStructures)[],
        ): (ClassMemberTypes | CommentClassElement)[];
        insertMethod(
            index: number,
            structure: OptionalKind<MethodDeclarationStructure>,
        ): MethodDeclaration;
        insertMethods(
            index: number,
            structures: readonly OptionalKind<MethodDeclarationStructure>[],
        ): MethodDeclaration[];
        insertProperties(
            index: number,
            structures: readonly OptionalKind<PropertyDeclarationStructure>[],
        ): PropertyDeclaration[];
        insertProperty(
            index: number,
            structure: OptionalKind<PropertyDeclarationStructure>,
        ): PropertyDeclaration;
        insertSetAccessor(
            index: number,
            structure: OptionalKind<SetAccessorDeclarationStructure>,
        ): SetAccessorDeclaration;
        insertSetAccessors(
            index: number,
            structures: readonly OptionalKind<SetAccessorDeclarationStructure>[],
        ): SetAccessorDeclaration[];
        insertStaticBlock(
            index: number,
            structure?: OptionalKind<ClassStaticBlockDeclarationStructure>,
        ): ClassStaticBlockDeclaration;
        insertStaticBlocks(
            index: number,
            structures: readonly OptionalKind<ClassStaticBlockDeclarationStructure>[],
        ): ClassStaticBlockDeclaration[];
        insertText(
            pos: number,
            textOrWriterFunction: string | WriterFunction,
        ): this;
        insertTypeParameter(
            index: number,
            structure: string | OptionalKind<TypeParameterDeclarationStructure>,
        ): TypeParameterDeclaration;
        insertTypeParameters(
            index: number,
            structures: readonly (
                string
                | OptionalKind<TypeParameterDeclarationStructure>
            )[],
        ): TypeParameterDeclaration[];
        isAbstract(): boolean;
        removeExtends(): this;
        removeImplements(index: number): this;
        removeImplements(implementsNode: ExpressionWithTypeArguments): this;
        removeName(): this;
        removeText(): this;
        removeText(pos: number, end: number): this;
        rename(newName: string, options?: RenameOptions): this;
        replaceText(
            range: [number, number],
            textOrWriterFunction: string | WriterFunction,
        ): this;
        setExtends(text: string | WriterFunction): this;
        setIsAbstract(isAbstract: boolean): this;
        toggleModifier(text: ModifierTexts, value?: boolean): this;
    }

    Hierarchy (View Summary)

    Index

    Methods

    addConstructor addConstructors addDecorator addDecorators addGetAccessor addGetAccessors addImplements addJsDoc addJsDocs addMember addMembers addMethod addMethods addProperties addProperty addSetAccessor addSetAccessors addStaticBlock addStaticBlocks addTypeParameter addTypeParameters findReferences findReferencesAsNodes getAbstractKeyword getAbstractKeywordOrThrow getBaseClass getBaseClassOrThrow getBaseTypes getConstructors getDecorator getDecoratorOrThrow getDecorators getDerivedClasses getExtends getExtendsOrThrow getFirstModifierByKind getFirstModifierByKindOrThrow getGetAccessor getGetAccessorOrThrow getGetAccessors getHeritageClauseByKind getHeritageClauseByKindOrThrow getHeritageClauses getImplements getInstanceMember getInstanceMemberOrThrow getInstanceMembers getInstanceMethod getInstanceMethodOrThrow getInstanceMethods getInstanceProperties getInstanceProperty getInstancePropertyOrThrow getJsDocs getMember getMemberOrThrow getMembers getMembersWithComments getMethod getMethodOrThrow getMethods getModifiers getName getNameNode getNameNodeOrThrow getNameOrThrow getProperties getProperty getPropertyOrThrow getSetAccessor getSetAccessorOrThrow getSetAccessors getStaticBlocks getStaticMember getStaticMemberOrThrow getStaticMembers getStaticMethod getStaticMethodOrThrow getStaticMethods getStaticProperties getStaticProperty getStaticPropertyOrThrow getTypeParameter getTypeParameterOrThrow getTypeParameters hasModifier insertConstructor insertConstructors insertDecorator insertDecorators insertGetAccessor insertGetAccessors insertImplements insertJsDoc insertJsDocs insertMember insertMembers insertMethod insertMethods insertProperties insertProperty insertSetAccessor insertSetAccessors insertStaticBlock insertStaticBlocks insertText insertTypeParameter insertTypeParameters isAbstract removeExtends removeImplements removeName removeText rename replaceText setExtends setIsAbstract toggleModifier

    Methods

    • Gets the abstract keyword or undefined if it doesn't exist.

      Returns Node<tsc.Node> | undefined

    • Gets the abstract keyword or throws if it doesn't exist.

      Parameters

      • Optionalmessage: string | (() => string)

      Returns Node

    • Gets the base class.

      Note: Use getBaseTypes if you need to get the mixins.

      Returns ClassDeclaration | undefined

    • Gets the base class or throws.

      Note: Use getBaseTypes if you need to get the mixins.

      Parameters

      • Optionalmessage: string | (() => string)

      Returns ClassDeclaration

    • Gets the base types.

      This is useful to use if the base could possibly be a mixin.

      Returns Type<tsc.Type>[]

    • Gets the constructor declarations.

      Returns ConstructorDeclaration[]

    • Gets a decorator or undefined if it doesn't exist.

      Parameters

      • name: string

        Name of the parameter.

      Returns Decorator | undefined

    • Gets a decorator or undefined if it doesn't exist.

      Parameters

      • findFunction: (declaration: Decorator) => boolean

        Function to use to find the parameter.

      Returns Decorator | undefined

    • Gets a decorator or throws if it doesn't exist.

      Parameters

      • name: string

        Name of the parameter.

      Returns Decorator

    • Gets a decorator or throws if it doesn't exist.

      Parameters

      • findFunction: (declaration: Decorator) => boolean

        Function to use to find the parameter.

      Returns Decorator

    • Gets all the derived classes.

      Returns ClassDeclaration[]

    • Gets the extends expression or returns undefined if it doesn't exist.

      Returns ExpressionWithTypeArguments | undefined

    • Gets the extends expression or throws if it doesn't exist.

      Parameters

      • Optionalmessage: string | (() => string)

      Returns ExpressionWithTypeArguments

    • Gets the first get accessor declaration by name.

      Parameters

      • name: string

        Name.

      Returns GetAccessorDeclaration | undefined

    • Gets the first get accessor declaration by a find function.

      Parameters

      • findFunction: (getAccessor: GetAccessorDeclaration) => boolean

        Function to find a get accessor declaration by.

      Returns GetAccessorDeclaration | undefined

    • Gets the first get accessor declaration by name or throws if it doesn't exist.

      Parameters

      • name: string

        Name.

      Returns GetAccessorDeclaration

    • Gets the first get accessor declaration by a find function or throws if it doesn't exist.

      Parameters

      • findFunction: (getAccessor: GetAccessorDeclaration) => boolean

        Function to find a get accessor declaration by.

      Returns GetAccessorDeclaration

    • Gets the class get accessor declarations regardless of whether it's an instance of static getAccessor.

      Returns GetAccessorDeclaration[]

    • Gets the first instance member by name.

      Parameters

      • name: string

        Name.

      Returns ClassInstanceMemberTypes | undefined

    • Gets the first instance member by a find function.

      Parameters

      Returns ClassInstanceMemberTypes | undefined

    • Gets the first instance member by name or throws if not found.

      Parameters

      • name: string

        Name.

      Returns ClassInstanceMemberTypes

    • Gets the first instance member by a find function. or throws if not found.

      Parameters

      Returns ClassInstanceMemberTypes

    • Gets the instance members.

      Returns ClassInstanceMemberTypes[]

    • Gets the first instance method by name.

      Parameters

      • name: string

        Name.

      Returns MethodDeclaration | undefined

    • Gets the first instance method by a find function.

      Parameters

      • findFunction: (method: MethodDeclaration) => boolean

        Function to find an instance method by.

      Returns MethodDeclaration | undefined

    • Gets the first instance method by name or throws if not found.

      Parameters

      • name: string

        Name.

      Returns MethodDeclaration

    • Gets the first instance method by a find function. or throws if not found.

      Parameters

      • findFunction: (method: MethodDeclaration) => boolean

        Function to find an instance method by.

      Returns MethodDeclaration

    • Gets the class instance method declarations.

      Returns MethodDeclaration[]

    • Gets the class instance property declarations.

      Returns ClassInstancePropertyTypes[]

    • Gets the first instance property by name.

      Parameters

      • name: string

        Name.

      Returns ClassInstancePropertyTypes | undefined

    • Gets the first instance property by a find function.

      Parameters

      Returns ClassInstancePropertyTypes | undefined

    • Gets the first instance property by name or throws if not found.

      Parameters

      • name: string

        Name.

      Returns ClassInstancePropertyTypes

    • Gets the first instance property by a find function or throws if not found.

      Parameters

      Returns ClassInstancePropertyTypes

    • Gets the JS doc nodes.

      Returns JSDoc[]

    • Gets the first member by name.

      Parameters

      • name: string

        Name.

      Returns ClassMemberTypes | undefined

    • Gets the first member by a find function.

      Parameters

      • findFunction: (member: ClassMemberTypes) => boolean

        Function to find an method by.

      Returns ClassMemberTypes | undefined

    • Gets the first member by name or throws if not found.

      Parameters

      • name: string

        Name.

      Returns ClassMemberTypes

    • Gets the first member by a find function. or throws if not found.

      Parameters

      • findFunction: (member: ClassMemberTypes) => boolean

        Function to find an method by.

      Returns ClassMemberTypes

    • Gets the class' members regardless of whether it's an instance of static member.

      Returns ClassMemberTypes[]

    • Gets the first method declaration by name.

      Parameters

      • name: string

        Name.

      Returns MethodDeclaration | undefined

    • Gets the first method declaration by a find function.

      Parameters

      • findFunction: (method: MethodDeclaration) => boolean

        Function to find a method declaration by.

      Returns MethodDeclaration | undefined

    • Gets the first method declaration by name or throws if it doesn't exist.

      Parameters

      • name: string

        Name.

      Returns MethodDeclaration

    • Gets the first method declaration by a find function or throws if it doesn't exist.

      Parameters

      • findFunction: (method: MethodDeclaration) => boolean

        Function to find a method declaration by.

      Returns MethodDeclaration

    • Gets the class method declarations regardless of whether it's an instance of static method.

      Returns MethodDeclaration[]

    • Gets the name if it exists.

      Returns string | undefined

    • Gets the name node if it exists.

      Returns Identifier | undefined

    • Gets the name node if it exists, or throws.

      Parameters

      • Optionalmessage: string | (() => string)

      Returns Identifier

    • Gets the name if it exists, or throws.

      Parameters

      • Optionalmessage: string | (() => string)

      Returns string

    • Gets the class property declarations regardless of whether it's an instance of static property.

      Returns PropertyDeclaration[]

    • Gets the first property declaration by name.

      Parameters

      • name: string

        Name.

      Returns PropertyDeclaration | undefined

    • Gets the first property declaration by a find function.

      Parameters

      • findFunction: (property: PropertyDeclaration) => boolean

        Function to find a property declaration by.

      Returns PropertyDeclaration | undefined

    • Gets the first property declaration by name or throws if it doesn't exist.

      Parameters

      • name: string

        Name.

      Returns PropertyDeclaration

    • Gets the first property declaration by a find function or throws if it doesn't exist.

      Parameters

      • findFunction: (property: PropertyDeclaration) => boolean

        Function to find a property declaration by.

      Returns PropertyDeclaration

    • Sets the first set accessor declaration by name.

      Parameters

      • name: string

        Name.

      Returns SetAccessorDeclaration | undefined

    • Sets the first set accessor declaration by a find function.

      Parameters

      • findFunction: (setAccessor: SetAccessorDeclaration) => boolean

        Function to find a set accessor declaration by.

      Returns SetAccessorDeclaration | undefined

    • Sets the first set accessor declaration by name or throws if it doesn't exist.

      Parameters

      • name: string

        Name.

      Returns SetAccessorDeclaration

    • Sets the first set accessor declaration by a find function or throws if it doesn't exist.

      Parameters

      • findFunction: (setAccessor: SetAccessorDeclaration) => boolean

        Function to find a set accessor declaration by.

      Returns SetAccessorDeclaration

    • Sets the class set accessor declarations regardless of whether it's an instance of static setAccessor.

      Returns SetAccessorDeclaration[]

    • Gets the first static member by name.

      Parameters

      • name: string

        Name.

      Returns ClassStaticMemberTypes | undefined

    • Gets the first static member by a find function.

      Parameters

      Returns ClassStaticMemberTypes | undefined

    • Gets the first static member by name or throws if not found.

      Parameters

      • name: string

        Name.

      Returns ClassStaticMemberTypes

    • Gets the first static member by a find function. or throws if not found.

      Parameters

      Returns ClassStaticMemberTypes

    • Gets the static members.

      Returns ClassStaticMemberTypes[]

    • Gets the first static method by name.

      Parameters

      • name: string

        Name.

      Returns MethodDeclaration | undefined

    • Gets the first static method by a find function.

      Parameters

      • findFunction: (method: MethodDeclaration) => boolean

        Function to find a static method by.

      Returns MethodDeclaration | undefined

    • Gets the first static method by name or throws if not found.

      Parameters

      • name: string

        Name.

      Returns MethodDeclaration

    • Gets the first static method by a find function. or throws if not found.

      Parameters

      • findFunction: (method: MethodDeclaration) => boolean

        Function to find a static method by.

      Returns MethodDeclaration

    • Gets the class instance method declarations.

      Returns MethodDeclaration[]

    • Gets the class instance property declarations.

      Returns ClassStaticPropertyTypes[]

    • Gets the first static property by name.

      Parameters

      • name: string

        Name.

      Returns ClassStaticPropertyTypes | undefined

    • Gets the first static property by a find function.

      Parameters

      Returns ClassStaticPropertyTypes | undefined

    • Gets the first static property by name or throws if not found.

      Parameters

      • name: string

        Name.

      Returns ClassStaticPropertyTypes

    • Gets the first static property by a find function. or throws if not found.

      Parameters

      Returns ClassStaticPropertyTypes

    • Gets if it has the specified modifier.

      Parameters

      Returns boolean

    • Gets if it has the specified modifier.

      Parameters

      Returns boolean

    • Inserts text within the body of the node.

      WARNING: This will forget any previously navigated descendant nodes.

      Parameters

      • pos: number

        Position to insert at.

      • textOrWriterFunction: string | WriterFunction

        Text to insert.

      Returns this

    • Gets if the node is abstract.

      Returns boolean

    • Removes the extends expression, if it exists.

      Returns this

    • Removes the name from the node.

      Returns this

    • Removes all the text within the node

      Returns this

    • Removes text within the body of the node.

      WARNING: This will forget any previously navigated descendant nodes.

      Parameters

      • pos: number

        Start position to remove.

      • end: number

        End position to remove.

      Returns this

    • Renames the name of the node.

      Parameters

      • newName: string

        New name.

      • Optionaloptions: RenameOptions

        Options for renaming.

      Returns this

    • Replaces text within the body of the node.

      WARNING: This will forget any previously navigated descendant nodes.

      Parameters

      • range: [number, number]

        Start and end position of the text to replace.

      • textOrWriterFunction: string | WriterFunction

        Text to replace the range with.

      Returns this

    • Sets the extends expression.

      Parameters

      Returns this

    • Sets if the node is abstract.

      Parameters

      • isAbstract: boolean

        If it should be abstract or not.

      Returns this

    • Toggles a modifier.

      Parameters

      • text: ModifierTexts

        Text to toggle the modifier for.

      • Optionalvalue: boolean

        Optional toggling value.

      Returns this