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

Function decodeValue

packages/effect/src/encoding/SchemaBinary.ts:5133–5143  ·  view source on GitHub ↗
(layout: Layout, r: Reader)

Source from the content-addressed store, hash-verified

5131}
5132
5133function decodeValue(layout: Layout, r: Reader): unknown {
5134 if (r.nesting >= MAX_NESTING_DEPTH) {
5135 invalid(`nesting depth at most ${MAX_NESTING_DEPTH}`, r.nesting + 1, r.options)
5136 }
5137 r.nesting++
5138 try {
5139 return decodeValueUnchecked(layout, r)
5140 } finally {
5141 r.nesting--
5142 }
5143}
5144
5145function decodeValueUnchecked(layout: Layout, r: Reader): unknown {
5146 switch (layout._) {

Callers 4

decodeCheckedFunction · 0.70
decodeSlotFunction · 0.70
decodeArrayFunction · 0.70
decodeValueUncheckedFunction · 0.70

Calls 2

decodeValueUncheckedFunction · 0.85
invalidFunction · 0.70

Tested by

no test coverage detected