🤖 Merge PR #45960 Sharedb: getSnapshotBulk second param should be a string array by @eveshum

* fix params for getSnapshotBulk'

* Add a test
This commit is contained in:
Eve Shum 2020-07-08 15:09:22 -07:00 committed by GitHub
parent b5b627cf71
commit cb01078884
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -63,7 +63,7 @@ declare namespace sharedb {
close(callback?: BasicCallback): void;
commit(collection: string, id: string, op: Op, snapshot: any, options: any, callback: (...args: any[]) => any): void;
getSnapshot(collection: string, id: string, fields: any, options: any, callback: (...args: any[]) => any): void;
getSnapshotBulk(collection: string, ids: string, fields: any, options: any, callback: (...args: any[]) => any): void;
getSnapshotBulk(collection: string, ids: string[], fields: any, options: any, callback: (...args: any[]) => any): void;
getOps(collection: string, id: string, from: number | null, to: number | null, options: any, callback: (...args: any[]) => any): void;
getOpsToSnapshot(collection: string, id: string, from: number | null, snapshot: number, options: any, callback: (...args: any[]) => any): void;
getOpsBulk(collection: string, fromMap: any, toMap: any, options: any, callback: (...args: any[]) => any): void;

View File

@ -44,6 +44,7 @@ console.log(backend.db);
// getOps allows for `from` and `to` to both be `null`:
// https://github.com/share/sharedb/blob/960f5d152f6a8051ed2dcb00a57681a3ebbd7dc2/README.md#getops
backend.db.getOps('someCollection', 'someId', null, null, {}, () => {});
backend.db.getSnapshotBulk('someCollection', ['id1', 'id2'], null, null, () => {});
console.log(backend.pubsub);
console.log(backend.extraDbs);