Skip to main content
Module

x/ts_morph/mod.ts>SyntaxList#insertChildText

TypeScript Compiler API wrapper for static analysis and programmatic code changes.
Very Popular
Go to Latest
method SyntaxList.prototype.insertChildText
import { SyntaxList } from "https://deno.land/x/ts_morph@15.1.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.