MCPcopy Create free account
hub / github.com/Effect-TS/effect / makeModule

Function makeModule

packages/effect/test/utils/schemaCodegen.ts:4–11  ·  view source on GitHub ↗
(document: SchemaRepresentation.MultiDocument)

Source from the content-addressed store, hash-verified

2import { Codegen, type SchemaRepresentation } from "effect"
3
4export 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
13export function declarationNames(module: Codegen.Module): ReadonlyArray<string> {
14 const output = module.finalize()

Callers 9

Schema.test.tsFile · 0.90
assertCodeFunction · 0.90
generateFunction · 0.90
codegen.test.tsFile · 0.90
sanitizeFunction · 0.90
printFunction · 0.90
assertCodeFunction · 0.90

Calls 2

addSchemasMethod · 0.95
mapMethod · 0.45

Tested by 5

assertCodeFunction · 0.72
generateFunction · 0.72
sanitizeFunction · 0.72
printFunction · 0.72
assertCodeFunction · 0.72