Skip to main content
Module

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

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