(
id: ElementId,
options?: { throwIfNotFound?: boolean },
)
| 417 | options?: { throwIfNotFound?: false }, |
| 418 | ): Vertex<TSchema, TVertexLabel> | undefined; |
| 419 | public getVertexById<TVertexLabel extends VertexLabel<TSchema>>( |
| 420 | id: ElementId, |
| 421 | options?: { throwIfNotFound?: boolean }, |
| 422 | ): Vertex<TSchema, TVertexLabel> | undefined { |
| 423 | const data = this.#config.storage.getVertexById(id); |
| 424 | if (data === undefined) { |
| 425 | if (options?.throwIfNotFound) { |
| 426 | throw new VertexNotFoundError(id); |
| 427 | } |
| 428 | return undefined; |
| 429 | } |
| 430 | return this.instantiateVertex<TVertexLabel>(data); |
| 431 | } |
| 432 | |
| 433 | public *getVertices<TVertexLabel extends VertexLabel<TSchema>>( |
| 434 | ...labels: TVertexLabel[] |
no test coverage detected