Function
flatten
(candidates: ReadonlyArray<AST>)
Source from the content-addressed store, hash-verified
| 1607 | |
| 1608 | /** @internal */ |
| 1609 | export const flatten = (candidates: ReadonlyArray<AST>): Array<AST> => |
| 1610 | Arr.flatMap(candidates, (ast) => isUnion(ast) ? flatten(ast.types) : [ast]) |
| 1611 | |
| 1612 | /** @internal */ |
| 1613 | export const unify = (candidates: ReadonlyArray<AST>): Array<AST> => { |
Tested by
no test coverage detected
Used in the wild real call sites across dependent graphs
searching dependent graphs…