@o3r/schematics
Version:
Schematics module of the Otter framework
37 lines • 1.57 kB
TypeScript
import type { SchematicContext, Tree } from '@angular-devkit/schematics';
import * as ts from 'typescript';
/**
* Route definition.
*/
export interface Route {
/** Path of the route. */
path: string;
/** Import path of the module to load. */
import: string;
/** Name of the module to load. */
module: string;
}
/**
* Get the Routes variable declaration from the given App Routing Module path.
* @param tree File tree
* @param context Context of the rule
* @param appRoutingModulePath Path of the App Routing Module
*/
export declare function getRoutesDeclaration(tree: Tree, context: SchematicContext, appRoutingModulePath: string): ts.VariableDeclaration | null;
/**
* Gets the Routes Node array of the App Routing Module of the given path.
* @param tree File tree
* @param context Context of the rule
* @param appRoutingModulePath
*/
export declare function getRoutesNodeArray(tree: Tree, context: SchematicContext, appRoutingModulePath: string): ts.NodeArray<ts.ObjectLiteralExpression> | null;
/**
* Inserts a route in the App Routing Module of the given path.
* @param tree File tree
* @param context Context of the rule
* @param appRoutingModulePath Path of the App Routing Module
* @param route The Route to insert
* @param standalone Whether the page component is standalone
*/
export declare function insertRoute(tree: Tree, context: SchematicContext, appRoutingModulePath: string, route: Route, standalone?: boolean): import("@angular-devkit/schematics/src/tree/interface").Tree;
//# sourceMappingURL=routes.d.ts.map