Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(firestore): add support for onSnapshotsInSync #8379

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions packages/firestore/lib/modular/snapshot.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -227,3 +227,13 @@
left: Query<AppModelType, DbModelType>,
right: Query<AppModelType, DbModelType>,
): boolean;

/**
* Attaches a listener for a snapshots-in-sync event.
* The snapshots-in-sync event indicates that all listeners affected by a given change have fired, even if
* a single server-generated change affects multiple listeners.
*
* @param firestore
* @param onSync
*/
export declare function onSnapshotsInSync(firestore: Firestore, onSync: () => void): Unsubscribe;

Check failure on line 239 in packages/firestore/lib/modular/snapshot.d.ts

View workflow job for this annotation

GitHub Actions / Lint

Insert `⏎`

Check failure on line 239 in packages/firestore/lib/modular/snapshot.d.ts

View workflow job for this annotation

GitHub Actions / Lint

Insert `⏎`

Check failure on line 239 in packages/firestore/lib/modular/snapshot.d.ts

View workflow job for this annotation

GitHub Actions / Lint

Insert `⏎`
5 changes: 5 additions & 0 deletions packages/firestore/lib/modular/snapshot.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,8 @@
export function snapshotEqual(left, right) {
return left.isEqual.call(left, right, MODULAR_DEPRECATION_ARG);
}


Check failure on line 22 in packages/firestore/lib/modular/snapshot.js

View workflow job for this annotation

GitHub Actions / Lint

Delete `⏎`

Check failure on line 22 in packages/firestore/lib/modular/snapshot.js

View workflow job for this annotation

GitHub Actions / Lint

Delete `⏎`

Check failure on line 22 in packages/firestore/lib/modular/snapshot.js

View workflow job for this annotation

GitHub Actions / Lint

Delete `⏎`
export function onSnapshotsInSync(firestore, ...args) {
return firestore.onSnapshotsInSync.call(firestore, ...args, MODULAR_DEPRECATION_ARG);

Check warning on line 24 in packages/firestore/lib/modular/snapshot.js

View check run for this annotation

Codecov / codecov/patch

packages/firestore/lib/modular/snapshot.js#L23-L24

Added lines #L23 - L24 were not covered by tests
}

Check failure on line 25 in packages/firestore/lib/modular/snapshot.js

View workflow job for this annotation

GitHub Actions / Lint

Insert `⏎`

Check failure on line 25 in packages/firestore/lib/modular/snapshot.js

View workflow job for this annotation

GitHub Actions / Lint

Insert `⏎`

Check failure on line 25 in packages/firestore/lib/modular/snapshot.js

View workflow job for this annotation

GitHub Actions / Lint

Insert `⏎`
Loading