We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents fdb4919 + 84fba89 commit 458f4b3Copy full SHA for 458f4b3
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