(document: SchemaRepresentation.MultiDocument)
| 2 | import { Codegen, type SchemaRepresentation } from "effect" |
| 3 | |
| 4 | export function makeModule(document: SchemaRepresentation.MultiDocument): Codegen.Module { |
| 5 | const module = new Codegen.Module() |
| 6 | module.addSchemas( |
| 7 | Object.fromEntries(document.representations.map((representation, i) => ["TestRoot" + i, representation])), |
| 8 | { references: document.references } |
| 9 | ) |
| 10 | return module |
| 11 | } |
| 12 | |
| 13 | export function declarationNames(module: Codegen.Module): ReadonlyArray<string> { |
| 14 | const output = module.finalize() |