Module

x/ts_morph/ts_morph.d.ts>ArrayLiteralExpression#insertElements

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

Insert elements into the array.

Parameters

index: number
  • Child index to insert at.
textsOrWriterFunction: ReadonlyArray<string | WriterFunction> | WriterFunction
  • Texts to insert as elements.
optional
options: { useNewLines?: boolean; }
  • Options.

Returns

Expression<ts.Expression>[]