UNPKG

@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

20 lines (19 loc) 1.08 kB
import { ClassDeclaration, SourceFile, WriterFunction } from 'ts-morph'; export interface CoerceDataSourceClassOptions { name: string; providedInRoot?: boolean; decorator?: { name: string; moduleSpecifier: string; argument?: string | WriterFunction; }; extends?: { name: string; moduleSpecifier: string; }; coerceDecorator?: (sourceFile: SourceFile, classDeclaration: ClassDeclaration, options: CoerceDataSourceClassOptions) => void; coerceExtends?: (sourceFile: SourceFile, classDeclaration: ClassDeclaration, options: CoerceDataSourceClassOptions) => void; } export declare function CoerceRxapDataSourceDecorator(sourceFile: SourceFile, classDeclaration: ClassDeclaration, options: CoerceDataSourceClassOptions): void; export declare function CoerceExtendsBaseDataSource(sourceFile: SourceFile, classDeclaration: ClassDeclaration, options: CoerceDataSourceClassOptions): void; export declare function CoerceDataSourceClass(sourceFile: SourceFile, options: CoerceDataSourceClassOptions): ClassDeclaration;