schema.d.ts 1.2 KB

123456789101112131415161718192021222324252627282930313233
  1. /**
  2. * Creates a new interface in your project. Interfaces define the structure of objects in
  3. * TypeScript, ensuring type safety and code clarity. This schematic generates a new
  4. * interface with the specified name and type.
  5. */
  6. export type Schema = {
  7. /**
  8. * The name for the new interface. This will be used to create the interface file (e.g.,
  9. * `my-interface.interface.ts`).
  10. */
  11. name: string;
  12. /**
  13. * The path where the interface file should be created, relative to the workspace root. If
  14. * not provided, the interface will be created in the current directory.
  15. */
  16. path?: string;
  17. /**
  18. * A prefix to be added to the interface name. This is typically not used for interfaces, as
  19. * they don't have selectors like components or directives.
  20. */
  21. prefix?: string;
  22. /**
  23. * The name of the project where the interface should be created. If not specified, the CLI
  24. * will determine the project from the current directory.
  25. */
  26. project: string;
  27. /**
  28. * Adds a custom type to the filename, allowing you to create more descriptive interface
  29. * names. For example, if you set the type to `data`, the filename will be
  30. * `my-interface.data.ts`.
  31. */
  32. type?: string;
  33. };