UNPKG

1.03 kBTypeScriptView Raw
1/**
2 * Generates a new, generic route guard definition in the given or default project.
3 */
4export interface Schema {
5 /**
6 * When true (the default), creates the new files at the top level of the current project.
7 */
8 flat?: boolean;
9 /**
10 * Specifies which interfaces to implement.
11 */
12 implements?: Implement[];
13 /**
14 * When true, applies lint fixes after generating the guard.
15 */
16 lintFix?: boolean;
17 /**
18 * The name of the new route guard.
19 */
20 name: string;
21 /**
22 * The path at which to create the interface that defines the guard, relative to the current
23 * workspace.
24 */
25 path?: string;
26 /**
27 * The name of the project.
28 */
29 project?: string;
30 /**
31 * When true, does not create "spec.ts" test files for the new guard.
32 */
33 skipTests?: boolean;
34}
35export declare enum Implement {
36 CanActivate = "CanActivate",
37 CanActivateChild = "CanActivateChild",
38 CanDeactivate = "CanDeactivate",
39 CanLoad = "CanLoad"
40}