Skip to main content
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://deno.land/x/ts_morph@15.1.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://deno.land/x/ts_morph@15.1.0/ts_morph.d.ts";

Type Parameters

T extends Constructor<TextInsertableNodeExtensionType>