- getOrCreate(graph, id): Readonly<{
graph: Readonly<{
vertices: IMapImmutable<string, Readonly<{
id: string;
out: readonly Readonly<{
id: string;
weight?: (...) | (...);
}>[];
}>>;
}>;
vertex: Readonly<{
id: string;
out: readonly Readonly<{
id: string;
weight?: number;
}>[];
}>;
}> Parameters
- graph: Readonly<{
vertices: IMapImmutable<string, Readonly<{
id: string;
out: readonly Readonly<{
id: string;
weight?: number;
}>[];
}>>;
}> - id: string
Returns Readonly<{
graph: Readonly<{
vertices: IMapImmutable<string, Readonly<{
id: string;
out: readonly Readonly<{
id: string;
weight?: (...) | (...);
}>[];
}>>;
}>;
vertex: Readonly<{
id: string;
out: readonly Readonly<{
id: string;
weight?: number;
}>[];
}>;
}>
Gets a vertex by id, creating it if it does not exist.