Skip to main content
Module

x/ts_morph/mod.ts>ArrayLiteralExpression#insertElement

TypeScript Compiler API wrapper for static analysis and programmatic code changes.
Very Popular
Go to Latest
method ArrayLiteralExpression.prototype.insertElement
import { ArrayLiteralExpression } from "https://deno.land/x/ts_morph@15.1.0/mod.ts";

Insert an element into the array.

Parameters

index: number
  • Child index to insert at.
textOrWriterFunction: string | WriterFunction
  • Text to insert as an element.
optional
options: { useNewLines?: boolean; }
  • Options.

Returns

Expression<ts.Expression>