Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

onSnapshotsInSync

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.

NOTE: The snapshots-in-sync event only indicates that listeners are in sync with each other, but does not relate to whether those snapshots are in sync with the server. Use SnapshotMetadata in the individual listeners to determine if a snapshot is from the cache or the server.

function onSnapshotsInSync(firestore: Firestore, observer: {
next?: (value: void) => void;
error?: (error: FirestoreError) => void;
complete?: () => void;
}
): Unsubscribe;
function onSnapshotsInSync(firestore: Firestore, onSync: () => void): Unsubscribe;
§
onSnapshotsInSync(firestore: Firestore, observer: {
next?: (value: void) => void;
error?: (error: FirestoreError) => void;
complete?: () => void;
}
): Unsubscribe
[src]

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.

NOTE: The snapshots-in-sync event only indicates that listeners are in sync with each other, but does not relate to whether those snapshots are in sync with the server. Use SnapshotMetadata in the individual listeners to determine if a snapshot is from the cache or the server.

§Parameters

§
firestore: Firestore
[src]
  • The instance of Firestore for synchronizing snapshots.
§
observer: {
next?: (value: void) => void;
error?: (error: FirestoreError) => void;
complete?: () => void;
}
[src]
  • A single object containing next and error callbacks.

§Return Type

§

An unsubscribe function that can be called to cancel the snapshot listener.

§
onSnapshotsInSync(firestore: Firestore, onSync: () => void): Unsubscribe
[src]

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.

NOTE: The snapshots-in-sync event only indicates that listeners are in sync with each other, but does not relate to whether those snapshots are in sync with the server. Use SnapshotMetadata in the individual listeners to determine if a snapshot is from the cache or the server.

§Parameters

§
firestore: Firestore
[src]
  • The Firestore instance for synchronizing snapshots.
§
onSync: () => void
[src]
  • A callback to be called every time all snapshot listeners are in sync with each other.

§Return Type

§

An unsubscribe function that can be called to cancel the snapshot listener.