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

Function extractStructuralChecks

packages/effect/src/SchemaAST.ts:3658–3665  ·  view source on GitHub ↗
(checks: Checks)

Source from the content-addressed store, hash-verified

3656}
3657
3658function extractStructuralChecks(checks: Checks): Checks | undefined {
3659 function extract(check: Check<any>): Array<Check<any>> {
3660 if (isStructuralCheck(check)) return [check]
3661 return check._tag === "FilterGroup" ? check.checks.flatMap(extract) : []
3662 }
3663 const out = checks.flatMap(extract)
3664 return Arr.isArrayNonEmpty(out) ? out : undefined
3665}
3666
3667/**
3668 * Strips all encoding transformations from an AST, returning the decoded

Callers 1

SchemaAST.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected