(self: Graph<N, E, Kind>, that: Graph<N, E, Kind>)
| 852 | |
| 853 | /** @internal */ |
| 854 | const assertSameKind = <N, E>(self: Graph<N, E, Kind>, that: Graph<N, E, Kind>): void => { |
| 855 | if (self.type !== that.type) { |
| 856 | throw new GraphError({ message: `Cannot combine ${self.type} and ${that.type} graphs` }) |
| 857 | } |
| 858 | } |
| 859 | |
| 860 | /** |
| 861 | * Composes two graphs, merging nodes by identity. |