SnapshotListenOptions interface
Stay organized with collections
Save and categorize content based on your preferences.
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:
export declare interface SnapshotListenOptions
Properties
Property |
Type |
Description |
includeMetadataChanges |
boolean |
Include a change even if only the metadata of the query or of a document changed. Default is false. |
source |
ListenSource |
Set the source the query listens to. Default to "default", which listens to both cache and server. |
Include a change even if only the metadata of the query or of a document changed. Default is false.
Signature:
readonly includeMetadataChanges?: boolean;
SnapshotListenOptions.source
Set the source the query listens to. Default to "default", which listens to both cache and server.
Signature:
readonly source?: ListenSource;
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-03-14 UTC.
[null,null,["Last updated 2024-03-14 UTC."],[],[],null,["An options object that can be passed to [onSnapshot()](./firestore_.md#onsnapshot_0312fd7) and [QuerySnapshot.docChanges()](./firestore_.querysnapshot.md#querysnapshotdocchanges) to control which types of changes to include in the result set.\n\n**Signature:** \n\n export declare interface SnapshotListenOptions \n\nProperties\n\nSnapshotListenOptions.includeMetadataChanges\n\nInclude a change even if only the metadata of the query or of a document changed. Default is false.\n\n**Signature:** \n\n readonly includeMetadataChanges?: boolean;\n\nSnapshotListenOptions.source\n\nSet the source the query listens to. Default to \"default\", which listens to both cache and server.\n\n**Signature:** \n\n readonly source?: ListenSource;"]]