Skip to content
This repository was archived by the owner on Feb 4, 2022. It is now read-only.

Commit 7172804

Browse files
committed
fix: correct TreeReplica.get return type
1 parent 09cdb12 commit 7172804

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/TreeReplica.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import { Clock } from "./Clock";
1414
import { OpMove } from "./OpMove";
1515
import { State } from "./State";
16+
import { TreeNode } from "./TreeNode";
1617

1718
export class TreeReplica<Id, Metadata> {
1819
/** The Tree state */
@@ -29,8 +30,8 @@ export class TreeReplica<Id, Metadata> {
2930
}
3031

3132
/** Get a node by its id */
32-
get(id: Id) {
33-
this.tree.get(id);
33+
get(id: Id): TreeNode<Id, Metadata> | undefined {
34+
return this.tree.get(id);
3435
}
3536

3637
/**

0 commit comments

Comments
 (0)