export serializeNodeWithId so rrweb could serialize newly added nodes

This commit is contained in:
Yanzhen Yu
2018-10-09 10:51:30 +08:00
parent f143eee54a
commit d59ba817cb
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;