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

Function transform

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

Source from the content-addressed store, hash-verified

2773 const out = make<Literal<L>>(new SchemaAST.Literal(literal), {
2774 literal,
2775 transform<L2 extends SchemaAST.LiteralValue>(to: L2): decodeTo<Literal<L2>, Literal<L>> {
2776 return out.pipe(decodeTo(Literal(to), {
2777 decode: SchemaGetter.transform(() => to),
2778 encode: SchemaGetter.transform(() => literal)
2779 }))
2780 }
2781 })
2782 return out
2783}

Callers 11

fromTransformFunction · 0.70
makeSourceFunction · 0.70
walkFunction · 0.70
makeCompilerFunction · 0.50
makeCompilerFunction · 0.50
makeCompilerFunction · 0.50
makeCompilerFunction · 0.50
makeCompilerFunction · 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