@rxap/ts-morph
Version:
Provides utilities for manipulating TypeScript code using the ts-morph library. It offers a fluent API to add, modify, and remove code elements such as classes, decorators, imports, and properties in both Angular and NestJS projects. This package simplifi
17 lines (16 loc) • 622 B
TypeScript
import { ClassDeclaration, Project, SourceFile } from 'ts-morph';
import { DtoClassProperty } from './dto-class-property';
import 'colors';
export interface CoerceDtoClassOutput {
className: string;
filePath: string;
sourceFile: SourceFile;
classDeclaration: ClassDeclaration;
}
export interface CoerceDtoClassOptions {
project: Project;
name: string;
propertyList?: DtoClassProperty[];
tsMorphTransform?: (project: Project, sourceFile: SourceFile, classDeclaration: ClassDeclaration) => void;
}
export declare function CoerceDtoClass(options: CoerceDtoClassOptions): CoerceDtoClassOutput;