Module

x/ts_morph/mod.ts>JSDocTag

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

JS doc tag node.

Type Parameters

optional
NodeType extends ts.JSDocTag = ts.JSDocTag

Methods

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

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

getCommentText(): string | undefined

Gets the text of the JS doc tag comment (ex. "Some description." for &#64;param value Some description.).

Gets a structure that represents this JS doc tag node.

getTagName(): string

Gets the tag's name as a string (ex. returns "param" for &#64;param).

Gets the tag name node (ex. Returns the param identifier for &#64;param).

remove(): void

Removes the JS doc comment.

replaceWithText(textOrWriterFunction: string | WriterFunction): Node
set(structure: Partial<JSDocTagStructure>): Node<ts.Node>

Sets the node from a structure.

setTagName(tagName: string): Node<ts.Node>

Sets the tag name.