Skip to content

Commit 747f102

Browse files
committed
Clean up
1 parent 470e3ec commit 747f102

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

packages/api-graph/src/private/Graph.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,11 @@ class Graph extends EventTarget {
155155
return stream.values();
156156
}
157157

158-
snapshot() {
159-
return new Map(this.#graph);
158+
/**
159+
* Takes a snapshot of the current graph.
160+
*/
161+
snapshot(): ReadonlyMap<Identifier, SlantNode> {
162+
return Object.freeze(new Map(this.#graph));
160163
}
161164

162165
/**

0 commit comments

Comments
 (0)