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

11 lines (10 loc) 568 B
import { DirEntry } from '@angular-devkit/schematics'; import { Project } from 'ts-morph'; /** * Adds all files recursively from a specify DirEntry to the project. * @param dir A schematic DirEntry instance * @param project A ts-morph Project instance * @param parentPath The base dir for the sourceFiles in the ts-morph Project * @param filter A filter function base on the pathFragment and dirEntry */ export declare function AddDir(dir: DirEntry, project: Project, parentPath?: string, filter?: ((pathFragment: string, dirEntry: DirEntry) => boolean)): void;