(id: ElementId<TLabel>)
| 359 | id: ElementId<TLabel>, |
| 360 | ): Edge<TSchema, TLabel>; |
| 361 | public getElementById<TLabel extends AnyLabel<TSchema>>(id: ElementId<TLabel>) { |
| 362 | const label = getLabelFromElementId<TLabel>(id); |
| 363 | if (label in this.#config.schema.vertices) { |
| 364 | return this.getVertexById<TLabel>(id); |
| 365 | } else if (label in this.#config.schema.edges) { |
| 366 | return this.getEdgeById<TLabel>(id); |
| 367 | } else { |
| 368 | throw new LabelNotFoundError(label); |
| 369 | } |
| 370 | } |
| 371 | |
| 372 | /** |
| 373 | * Instantiate a vertex from a stored vertex. |
nothing calls this directly
no test coverage detected