types.ts 381 B

12345678910111213141516171819
  1. import type { Spec } from "@json-render/core";
  2. /**
  3. * Represents a generated file
  4. */
  5. export interface GeneratedFile {
  6. /** File path relative to project root */
  7. path: string;
  8. /** File contents */
  9. content: string;
  10. }
  11. /**
  12. * Interface for code generators
  13. */
  14. export interface CodeGenerator {
  15. /** Generate files from a UI spec */
  16. generate(spec: Spec): GeneratedFile[];
  17. }