| 15585 | readonly edge: Edge |
| 15586 | } |
| 15587 | function graphEncodedSchema<T extends Graph_.Kind, Node extends Constraint, Edge extends Constraint>( |
| 15588 | type: T, |
| 15589 | node: Node, |
| 15590 | edge: Edge |
| 15591 | ) { |
| 15592 | return Struct({ |
| 15593 | type: Literal(type), |
| 15594 | nodes: ArraySchema(Struct({ index: Natural, data: node })), |
| 15595 | edges: ArraySchema(Struct({ index: Natural, source: Natural, target: Natural, data: edge })) |
| 15596 | }) |
| 15597 | } |
| 15598 | function graphDecode<N, E, T extends Graph_.Kind>( |
| 15599 | input: EncodedGraph<N, E, T>, |
| 15600 | options: SchemaAST.ParseOptions |