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

Function transform

packages/effect/src/Schema.ts:2746–2751  ·  view source on GitHub ↗
(to: L2)

Source from the content-addressed store, hash-verified

2744 const out = make<Literal<L>>(new SchemaAST.Literal(literal), {
2745 literal,
2746 transform<L2 extends SchemaAST.LiteralValue>(to: L2): decodeTo<Literal<L2>, Literal<L>> {
2747 return out.pipe(decodeTo(Literal(to), {
2748 decode: SchemaGetter.transform(() => to),
2749 encode: SchemaGetter.transform(() => literal)
2750 }))
2751 }
2752 })
2753 return out
2754}

Callers 12

fromTransformFunction · 0.70
makeSourceFunction · 0.70
walkFunction · 0.70
makeCompilerFunction · 0.50
makeCompilerFunction · 0.50
makeCompilerFunction · 0.50
makeCompilerFunction · 0.50
makeCompilerFunction · 0.50
makeFunction · 0.50
layerFunction · 0.50
layerFunction · 0.50
layerFunction · 0.50

Calls 6

decodeToFunction · 0.70
LiteralFunction · 0.70
UnionFunction · 0.70
pipeMethod · 0.65
transformMethod · 0.65
mapMethod · 0.45

Tested by

no test coverage detected