export serializeNodeWithId so rrweb could serialize newly added nodes

This commit is contained in:
Yanzhen Yu
2026-04-01 12:00:00 +08:00
parent cfc8798b53
commit 9cf2c4c7ed
3 changed files with 14 additions and 7 deletions

5
index.d.ts vendored
View File

@@ -3,3 +3,8 @@ export * from './src/types';
export function snapshot(n: Document): [serializedNodeWithId | null, idNodeMap];
export function rebuild(n: serializedNodeWithId): Node | null;
export function serializeNodeWithId(
n: Node,
doc: Document,
map: idNodeMap,
): serializedNodeWithId | null;