Skip to main content
Module

x/ts_morph/mod.ts>JSDoc

TypeScript Compiler API wrapper for static analysis and programmatic code changes.
Very Popular
Go to Latest
class JSDoc
extends JSDocBase<ts.JSDoc>
import { JSDoc } from "https://deno.land/x/ts_morph@15.1.0/mod.ts";

JS doc node.

Methods

addTag(structure: OptionalKind<JSDocTagStructure>): JSDocTag<ts.JSDocTag>

Adds a JS doc tag.

addTags(structures: ReadonlyArray<OptionalKind<JSDocTagStructure>>): JSDocTag<ts.JSDocTag>[]

Adds JS doc tags.

getComment(): string | ()[] | undefined

Gets the comment property. Use #getCommentText() to get the text of the JS doc comment if necessary.

getCommentText(): string | undefined

Gets the text of the JS doc comment.

getDescription(): string

Gets the description from the JS doc comment.

getInnerText(): string

Gets the JSDoc's text without the surrounding slashes and stars.

getParentOrThrow(): NonNullable<NodeParentType<ts.JSDoc>>

Gets the structure equivalent to this node.

Gets the tags of the JSDoc.

insertTag(index: number, structure: OptionalKind<JSDocTagStructure>): JSDocTag<ts.JSDocTag>

Inserts a JS doc tag at the specified index.

insertTags(index: number, structures: ReadonlyArray<OptionalKind<JSDocTagStructure>>): JSDocTag<ts.JSDocTag>[]

Inserts JS doc tags at the specified index.

isMultiLine(): boolean

Gets if this JS doc spans multiple lines.

remove(): void

Removes this JSDoc.

set(structure: Partial<JSDocStructure>): Node<ts.Node>

Sets the node from a structure.

setDescription(textOrWriterFunction: string | WriterFunction): this

Sets the description.