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

Function compile

packages/effect/src/encoding/SchemaBinary.ts:2430–2436  ·  view source on GitHub ↗
(ast: SchemaAST.AST)

Source from the content-addressed store, hash-verified

2428 const leaf = (kind: LeafKind): LeafLayout => ({ _: kind, slot: kind === "string" ? stringSlots++ : 0 })
2429
2430 function compile(ast: SchemaAST.AST): Layout {
2431 const hit = memo.get(ast)
2432 if (hit !== undefined) return hit
2433 const layout = go(ast)
2434 memo.set(ast, layout)
2435 return layout
2436 }
2437
2438 function go(ast: SchemaAST.AST): Layout {
2439 switch (ast._tag) {

Callers 6

goFunction · 0.70
compileStructFunction · 0.70
compileArrayFunction · 0.70
compileDeclarationFunction · 0.70
compileUnionFunction · 0.70
compileLayoutFunction · 0.70

Calls 3

goFunction · 0.70
getMethod · 0.65
setMethod · 0.65

Tested by

no test coverage detected