Skip to main content
Module

x/ts_morph/mod.ts>ObjectLiteralExpression#insertProperty

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

Inserts the specified property to the object literal expression.

Note: If you only want to insert a property assignment, then it might be more convenient to use #insertPropertyAssignment.