Module

x/ts_morph/ts_morph.d.ts>TextInsertableNode

TypeScript Compiler API wrapper for static analysis and programmatic code changes.
Very Popular
Go to Latest
interface TextInsertableNode
import { type TextInsertableNode } from "https://dotland.deno.dev/x/ts_morph@17.0.0/ts_morph.d.ts";

Methods

insertText(pos: number, textOrWriterFunction: string | WriterFunction): this

Inserts text within the body of the node.

WARNING: This will forget any previously navigated descendant nodes.

replaceText(range: [number, number], textOrWriterFunction: string | WriterFunction): this

Replaces text within the body of the node.

WARNING: This will forget any previously navigated descendant nodes.

removeText(): this

Removes all the text within the node

removeText(pos: number, end: number): this

Removes text within the body of the node.

WARNING: This will forget any previously navigated descendant nodes.

function TextInsertableNode
import { TextInsertableNode } from "https://dotland.deno.dev/x/ts_morph@17.0.0/ts_morph.d.ts";

Type Parameters

T extends Constructor<TextInsertableNodeExtensionType>