@rxap/schematics-ts-morph
Version:
This package provides utilities for manipulating TypeScript code using ts-morph, particularly for Angular and NestJS projects. It offers functions to add, coerce, and modify code elements like classes, methods, decorators, and imports. The package also in
13 lines (12 loc) • 403 B
TypeScript
import { SourceFile } from 'ts-morph';
/**
* Adds the value to the array with the name arrayName
*
* @param sourceFile
* @param arrayName
* @param value
* @param type The variable type of the array declaration
* @param overwrite
* @constructor
*/
export declare function AddToArray(sourceFile: SourceFile, arrayName: string, value: string, type?: string, overwrite?: boolean | string[]): void;