(labels: string[])
| 201 | } |
| 202 | |
| 203 | public *getEdges(labels: string[]): Iterable<StoredEdge> { |
| 204 | // Snapshot keys to prevent infinite loops when edges are added during iteration. |
| 205 | // Keys are just strings so this is cheap; actual edge data is still fetched lazily. |
| 206 | const keys = [...this.#edges.keys()]; |
| 207 | for (const key of keys) { |
| 208 | const edge = this.#edges.get(key); |
| 209 | if ( |
| 210 | edge !== undefined && |
| 211 | (labels.length === 0 || labels.includes(getLabelFromElementId(edge.id))) |
| 212 | ) { |
| 213 | yield edge; |
| 214 | } |
| 215 | } |
| 216 | } |
| 217 | |
| 218 | public *getEdgesByIds(ids: Iterable<ElementId>): Iterable<StoredEdge> { |
| 219 | for (const id of ids) { |
nothing calls this directly
no test coverage detected