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) 841 B
import { Rule } from '@angular-devkit/schematics'; import { ClassDeclaration, Project, SourceFile } from 'ts-morph'; import { CoerceComponentOptions } from './coerce-component'; export interface CoerceDialogComponentOptions extends Omit<CoerceComponentOptions, 'tsMorphTransform' | 'name'> { dialogName: string; title?: string; tsMorphTransform?: (project: Project, [componentSourceFile]: [SourceFile], [componentClass]: [ClassDeclaration], options: CoerceDialogComponentOptions) => void; coerceSubmitMethod?: (classDeclaration: ClassDeclaration, options: CoerceDialogComponentOptions) => void; } export declare function DefaultDialogSubmitMethod(classDeclaration: ClassDeclaration, options: CoerceDialogComponentOptions): void; export declare function CoerceDialogComponentRule(options: CoerceDialogComponentOptions): Rule;