(...schemas: Schema[])
| 16 | |
| 17 | /** the values every schema accepts: never if they're disjoint, unknown if there are none */ |
| 18 | export const intersect = (...schemas: Schema[]): Root => |
| 19 | schemas.reduce<Root>( |
| 20 | (result, schema) => result.intersect(parse(schema)).toNeverIfDisjoint(), |
| 21 | $ark.kw.unknown |
| 22 | ) |
| 23 | |
| 24 | /** the values any schema accepts, without the branches others subsume */ |
| 25 | export const union = (...schemas: Schema[]): Root => |
no test coverage detected