UNPKG

ts-simple-ast

Version:

TypeScript compiler wrapper for AST navigation and code generation.

35 lines (34 loc) 825 B
import * as ts from "typescript"; import CodeBlockWriter from "code-block-writer"; import { Node } from "./../common"; /** * JS doc node. */ export declare class JSDoc extends Node<ts.JSDoc> { /** * Gets the tags of the JSDoc. */ getTags(): Node[]; /** * Gets the comment. */ getComment(): string | undefined; /** * Gets the JSDoc's text without the surrounding comment. */ getInnerText(): string; /** * Sets the comment. * @param writerFunction - Write the text using the provided writer. */ setComment(writerFunction: (writer: CodeBlockWriter) => void): this; /** * Sets the comment. * @param text - Text of the comment. */ setComment(text: string): this; /** * Removes this JSDoc. */ remove(): void; }