schema.d.ts 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /**
  2. * Generates a new, generic route guard definition in the given or default project.
  3. */
  4. export 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. /**
  35. * When true (the default), generates a "spec.ts" test file for the new guard.
  36. * @deprecated Use "skipTests" instead.
  37. */
  38. spec?: boolean;
  39. }
  40. export declare enum Implement {
  41. CanActivate = "CanActivate",
  42. CanActivateChild = "CanActivateChild",
  43. CanDeactivate = "CanDeactivate",
  44. CanLoad = "CanLoad"
  45. }