Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
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@20.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>[]