SnapshotListenOptions interface

An options object that can be passed to onSnapshot() and QuerySnapshot.docChanges() to control which types of changes to include in the result set.

Signature:

exportdeclareinterfaceSnapshotListenOptions

Properties

PropertyTypeDescription
includeMetadataChangesbooleanInclude a change even if only the metadata of the query or of a document changed. Default is false.
sourceListenSourceSet the source the query listens to. Default to "default", which listens to both cache and server.

SnapshotListenOptions.includeMetadataChanges

Include a change even if only the metadata of the query or of a document changed. Default is false.

Signature:

readonlyincludeMetadataChanges?:boolean;

SnapshotListenOptions.source

Set the source the query listens to. Default to "default", which listens to both cache and server.

Signature:

readonlysource?:ListenSource;