(id: ElementId<TLabel>)
| 23 | * @returns The label. |
| 24 | */ |
| 25 | export function getLabelFromElementId<const TLabel extends string>(id: ElementId<TLabel>): TLabel { |
| 26 | for (let i = 0; i < id.length; i++) { |
| 27 | if (id.charAt(i) === ":") { |
| 28 | return id.slice(0, i) as TLabel; |
| 29 | } |
| 30 | } |
| 31 | throw new Error(`Invalid element id: ${id}`); |
| 32 | } |
| 33 | |
| 34 | export interface GraphStorage { |
| 35 | /** |
no outgoing calls
no test coverage detected