Module

x/ts_morph/mod.ts>SyntaxList#insertChildText

TypeScript Compiler API wrapper for static analysis and programmatic code changes.
Very Popular
Latest
method SyntaxList.prototype.insertChildText
import { SyntaxList } from "https://dotland.deno.dev/x/ts_morph@22.0.0/mod.ts";

Inserts text at the specified child index.

Parameters

index: number
  • Child index to insert at.
textOrWriterFunction: string | WriterFunction | ReadonlyArray<string | WriterFunction>
  • Text to insert or function that provides a writer to write with.

Returns

Node<ts.Node>[]

The children that were inserted.