return id node map when snapshot

This commit is contained in:
Yanzhen Yu
2018-10-08 15:35:03 +08:00
parent 978e12b089
commit f143eee54a
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;