UNPKG

@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

12 lines (11 loc) 533 B
import { SourceFile } from 'ts-morph'; /** * Adds a provided class to the imports array of the component. * * @param sourceFile - The source file where the component class is located. * @param namedImport - The name of the class that should be added to the imports array of the component. * @param [moduleSpecifier] - The module specifier to import the class into the source file. * * @returns {void} */ export declare function AddComponentImport(sourceFile: SourceFile, namedImport: string, moduleSpecifier?: string): void;