export reset id function

This commit is contained in:
Yanzhen Yu
2026-04-01 12:00:00 +08:00
parent 14dac7c0cc
commit bbf23157c5
4 changed files with 5 additions and 4 deletions

View File

@@ -1,5 +1,5 @@
import snapshot, { serializeNodeWithId } from './snapshot';
import snapshot, { serializeNodeWithId, resetId } from './snapshot';
import rebuild from './rebuild';
export * from './types';
export { snapshot, serializeNodeWithId, rebuild };
export { snapshot, serializeNodeWithId, resetId, rebuild };

View File

@@ -13,7 +13,7 @@ function genId(): number {
return _id++;
}
function resetId() {
export function resetId() {
_id = 1;
}