return id node map when rebuild

This commit is contained in:
Yanzhen Yu
2018-10-12 12:43:16 +08:00
parent b3fdc44fc7
commit 1ddb0a3343
5 changed files with 23 additions and 6 deletions

2
index.d.ts vendored
View File

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