return id node map when snapshot

This commit is contained in:
Yanzhen Yu
2026-04-01 12:00:00 +08:00
parent ac5293f162
commit cfc8798b53
4 changed files with 37 additions and 10 deletions

4
index.d.ts vendored
View File

@@ -1,5 +1,5 @@
import { serializedNodeWithId } from './src/types';
import { serializedNodeWithId, idNodeMap } from './src/types';
export * from './src/types';
export function snapshot(n: Document): serializedNodeWithId | null;
export function snapshot(n: Document): [serializedNodeWithId | null, idNodeMap];
export function rebuild(n: serializedNodeWithId): Node | null;