export reset id function

This commit is contained in:
Yanzhen Yu
2018-10-18 16:13:59 +08:00
parent 72beb51110
commit 43b2290f5f
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;
}