- graph(...initialConnections): Readonly<{
vertices: IMapImmutable<string, Readonly<{
id: string;
out: readonly Readonly<{
id: string;
weight?: number;
}>[];
}>>;
}> Parameters
Rest
...initialConnections: Readonly<{
bidi?: boolean;
from: string;
to: string | string[];
weight?: number;
}>[]
Returns Readonly<{
vertices: IMapImmutable<string, Readonly<{
id: string;
out: readonly Readonly<{
id: string;
weight?: number;
}>[];
}>>;
}>
Create a graph
Can optionally provide initial connections: