schema.d.ts 3.0 KB

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