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

Function extractStructuralChecks

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

Source from the content-addressed store, hash-verified

4684}
4685
4686function extractStructuralChecks(checks: Checks): Checks | undefined {
4687 function extract(check: Check<any>): Array<Check<any>> {
4688 if (isStructuralCheck(check)) return [check]
4689 return check._tag === "FilterGroup" ? check.checks.flatMap(extract) : []
4690 }
4691 const out = checks.flatMap(extract)
4692 return Arr.isArrayNonEmpty(out) ? out : undefined
4693}
4694
4695// Suspensions are leaves in this walk. Only resolving a suspension may call its thunk.
4696function everyNode(root: AST, predicate: (ast: AST) => boolean, proven?: WeakSet<AST>): boolean {

Callers 1

projectChecksFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected