@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
13 lines (12 loc) • 519 B
TypeScript
import { ArrayLiteralExpression, SourceFile } from 'ts-morph';
import { AngularRoute } from './build-route-object';
import 'colors';
export declare function DefaultInsertAtFactory(route: AngularRoute): (array: ArrayLiteralExpression) => number;
export interface AddRouteOptions {
route: AngularRoute;
path?: string[];
component?: string;
name?: string;
insertAt?: (array: ArrayLiteralExpression) => number;
}
export declare function AddRoute(sourceFile: SourceFile, options: AddRouteOptions): void;