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

21 lines (20 loc) 825 B
import { ClassDeclarationStructure, ObjectLiteralExpression, OptionalKind, SourceFile } from 'ts-morph'; export interface CoerceComponentOptions { selector?: string | false; prefix?: string; template?: string; styles?: string; /** * true - use the component name to generate the templateUrl */ templateUrl?: string | true; /** * true - use the component name to generate a styleUrl */ styleUrls?: string | string[] | true; changeDetection?: 'OnPush' | 'Default'; } export declare function CoerceComponent(sourceFile: SourceFile, name: string, options?: CoerceComponentOptions, classStructure?: Omit<OptionalKind<ClassDeclarationStructure>, 'name'>): { classDeclaration: import("ts-morph").ClassDeclaration; componentDecoratorObject: ObjectLiteralExpression; };