Skip to content

Commit 458f4b3

Browse files
authored
Merge pull request #35 from alextes/patch-1
Make weight parameter type optional
2 parents fdb4919 + 84fba89 commit 458f4b3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ function Graph(serialized?: Serialized) {
111111

112112
// Adds an edge from node u to node v.
113113
// Implicitly adds the nodes if they were not already added.
114-
function addEdge(u: NodeId, v: NodeId, weight: EdgeWeight) {
114+
function addEdge(u: NodeId, v: NodeId, weight?: EdgeWeight) {
115115
addNode(u);
116116
addNode(v);
117117
adjacent(u).push(v);

0 commit comments

Comments
 (0)