We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fdb4919 commit 84fba89Copy full SHA for 84fba89
1 file changed
index.ts
@@ -111,7 +111,7 @@ function Graph(serialized?: Serialized) {
111
112
// Adds an edge from node u to node v.
113
// Implicitly adds the nodes if they were not already added.
114
- function addEdge(u: NodeId, v: NodeId, weight: EdgeWeight) {
+ function addEdge(u: NodeId, v: NodeId, weight?: EdgeWeight) {
115
addNode(u);
116
addNode(v);
117
adjacent(u).push(v);
0 commit comments