UNPKG

3.22 kBTypeScriptView Raw
1/**
2 * Creates a new generic component definition in the given or default project.
3 */
4export interface Schema {
5 /**
6 * The change detection strategy to use in the new component.
7 */
8 changeDetection?: ChangeDetection;
9 /**
10 * Specifies if the style will contain `:host { display: block; }`.
11 */
12 displayBlock?: boolean;
13 /**
14 * When true, the new component is the entry component of the declaring NgModule.
15 * @deprecated Since version 9.0.0 with Ivy, entryComponents is no longer necessary.
16 */
17 entryComponent?: boolean;
18 /**
19 * When true, the declaring NgModule exports this component.
20 */
21 export?: boolean;
22 /**
23 * When true, creates the new files at the top level of the current project.
24 */
25 flat?: boolean;
26 /**
27 * When true, includes styles inline in the component.ts file. Only CSS styles can be
28 * included inline. By default, an external styles file is created and referenced in the
29 * component.ts file.
30 */
31 inlineStyle?: boolean;
32 /**
33 * When true, includes template inline in the component.ts file. By default, an external
34 * template file is created and referenced in the component.ts file.
35 */
36 inlineTemplate?: boolean;
37 /**
38 * When true, applies lint fixes after generating the component.
39 */
40 lintFix?: boolean;
41 /**
42 * The declaring NgModule.
43 */
44 module?: string;
45 /**
46 * The name of the component.
47 */
48 name: string;
49 /**
50 * The path at which to create the component file, relative to the current workspace.
51 * Default is a folder with the same name as the component in the project root.
52 */
53 path?: string;
54 /**
55 * The prefix to apply to the generated component selector.
56 */
57 prefix?: string;
58 /**
59 * The name of the project.
60 */
61 project?: string;
62 /**
63 * The HTML selector to use for this component.
64 */
65 selector?: string;
66 /**
67 * When true, does not import this component into the owning NgModule.
68 */
69 skipImport?: boolean;
70 /**
71 * Specifies if the component should have a selector or not.
72 */
73 skipSelector?: boolean;
74 /**
75 * When true, does not create "spec.ts" test files for the new component.
76 */
77 skipTests?: boolean;
78 /**
79 * The file extension or preprocessor to use for style files.
80 */
81 style?: Style;
82 /**
83 * Adds a developer-defined type to the filename, in the format "name.type.ts".
84 */
85 type?: string;
86 /**
87 * The view encapsulation strategy to use in the new component.
88 */
89 viewEncapsulation?: ViewEncapsulation;
90}
91/**
92 * The change detection strategy to use in the new component.
93 */
94export declare enum ChangeDetection {
95 Default = "Default",
96 OnPush = "OnPush"
97}
98/**
99 * The file extension or preprocessor to use for style files.
100 */
101export declare enum Style {
102 Css = "css",
103 Less = "less",
104 Sass = "sass",
105 Scss = "scss",
106 Styl = "styl"
107}
108/**
109 * The view encapsulation strategy to use in the new component.
110 */
111export declare enum ViewEncapsulation {
112 Emulated = "Emulated",
113 Native = "Native",
114 None = "None",
115 ShadowDom = "ShadowDom"
116}