- getOrCreate(graph, id): Readonly<{
graph: Readonly<{
edges: readonly Readonly<{
a: string;
b: string;
weight?: number;
}>[];
vertices: IMapImmutable<string, Readonly<{
id: string;
}>>;
}>;
vertex: Readonly<{
id: string;
}>;
}> Parameters
- graph: Readonly<{
edges: readonly Readonly<{
a: string;
b: string;
weight?: number;
}>[];
vertices: IMapImmutable<string, Readonly<{
id: string;
}>>;
}> - id: string
Returns Readonly<{
graph: Readonly<{
edges: readonly Readonly<{
a: string;
b: string;
weight?: number;
}>[];
vertices: IMapImmutable<string, Readonly<{
id: string;
}>>;
}>;
vertex: Readonly<{
id: string;
}>;
}>