@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) • 1.13 kB
TypeScript
import { NormalizedDataProperty } from '@rxap/ts-morph';
import { InterfaceDeclaration, InterfaceDeclarationStructure, OptionalKind, Project, SourceFile } from 'ts-morph';
import { TsMorphAngularProjectTransformOptions, TsMorphNestProjectTransformOptions, TsMorphTransformFunctionRule } from '../ts-morph-transform';
export declare function CoerceInterface(sourceFile: SourceFile, interfaceName: string, structure?: Omit<OptionalKind<InterfaceDeclarationStructure>, 'name'>): InterfaceDeclaration;
export interface CoerceInterfaceRuleOptions extends TsMorphNestProjectTransformOptions, TsMorphAngularProjectTransformOptions {
name: string;
structure?: Omit<OptionalKind<InterfaceDeclarationStructure>, 'name'>;
propertyList?: NormalizedDataProperty[];
tsMorphTransform?: (project: Project, sourceFile: SourceFile, interfaceDeclaration: InterfaceDeclaration) => void;
}
export declare function CoerceInterfaceRule(options: CoerceInterfaceRuleOptions, tsMorphTransForm: TsMorphTransformFunctionRule<TsMorphNestProjectTransformOptions | TsMorphAngularProjectTransformOptions>): import("@angular-devkit/schematics").Rule;