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

Function computeRequired

packages/effect/src/encoding/SchemaBinary.ts:2405–2411  ·  view source on GitHub ↗
(layout: StructLayout)

Source from the content-addressed store, hash-verified

2403}
2404
2405function computeRequired(layout: StructLayout) {
2406 for (const field of layout.fields) {
2407 if (field.optional) continue
2408 if (field.index < 32) layout.requiredMask |= 1 << field.index
2409 else layout.requiredWide = true
2410 }
2411}
2412
2413interface CompiledLayout {
2414 readonly layout: Layout

Callers 2

compileStructFunction · 0.85
compileUnionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected