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

Function extract

packages/effect/src/SchemaAST.ts:3659–3662  ·  view source on GitHub ↗
(check: Check<any>)

Source from the content-addressed store, hash-verified

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}

Callers 2

VariantSchema.tsFile · 0.50
UnionFunction · 0.50

Calls 1

isStructuralCheckFunction · 0.85

Tested by

no test coverage detected