| 15648 | return Effect.succeed(InternalGraph.hydrate(input)) |
| 15649 | } |
| 15650 | function graphEncode<N, E, T extends Graph_.Kind>( |
| 15651 | input: Graph_.Graph<N, E, T>, |
| 15652 | type: T, |
| 15653 | options: SchemaAST.ParseOptions |
| 15654 | ): Effect.Effect<EncodedGraph<N, E, T>, SchemaIssue.Issue> { |
| 15655 | if (!InternalGraph.isGraph(input) || input.mutable || input.type !== type) { |
| 15656 | return Effect.fail(new SchemaIssue.InvalidValue({ expected: `an immutable ${type} Graph` }, input, options)) |
| 15657 | } |
| 15658 | return Effect.succeed(InternalGraph.snapshot(input)) |
| 15659 | } |
| 15660 | function graphToEquivalence<N, E, T extends Graph_.Kind>( |
| 15661 | node: Equivalence.Equivalence<N>, |
| 15662 | edge: Equivalence.Equivalence<E> |