Skip to content

Commit 3b57fa8

Browse files
committed
fix: graph node type is string by default
1 parent 61e3f1e commit 3b57fa8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/Graph.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { CycleError } from "./CycleError.js";
22
import { invariant } from "./invariant.js";
33
import { Edge, EdgeWeight, Serialized, SerializedInput } from "./types.js";
44

5-
export class Graph<Node, LinkProps = unknown, Link extends Edge<Node, LinkProps> = Edge<Node, LinkProps>> {
5+
export class Graph<Node = string, LinkProps = unknown, Link extends Edge<Node, LinkProps> = Edge<Node, LinkProps>> {
66

77
/**
88
* The adjacency list of the graph.

0 commit comments

Comments
 (0)