schema.d.ts 1.0 KB

123456789101112131415161718192021222324252627
  1. /**
  2. * Creates a new enum in your project. Enums (enumerations) are a way to define a set of
  3. * named constants, making your code more readable and maintainable. This schematic
  4. * generates a new enum with the specified name and type.
  5. */
  6. export type Schema = {
  7. /**
  8. * The name for the new enum. This will be used to create the enum file (e.g.,
  9. * `my-enum.enum.ts`).
  10. */
  11. name: string;
  12. /**
  13. * The path where the enum file should be created, relative to the current workspace. If not
  14. * specified, the enum will be created in the current directory.
  15. */
  16. path?: string;
  17. /**
  18. * The name of the project where the enum should be created. If not specified, the CLI will
  19. * determine the project from the current directory.
  20. */
  21. project: string;
  22. /**
  23. * Adds a custom type to the filename, allowing you to create more descriptive enum names.
  24. * For example, if you set the type to `status`, the filename will be `my-enum.status.ts`.
  25. */
  26. type?: string;
  27. };