(checks: Checks)
| 3656 | } |
| 3657 | |
| 3658 | function 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 |