@@ -691,6 +691,52 @@ export namespace firestore {
691691
692692 export function GeoPoint ( latitude : number , longitude : number ) : GeoPoint ;
693693
694+ export interface Settings {
695+ /** The hostname to connect to. */
696+ host ?: string ;
697+ /** Whether to use SSL when connecting. */
698+ ssl ?: boolean ;
699+
700+ /**
701+ * Specifies whether to use `Timestamp` objects for timestamp fields in
702+ * `DocumentSnapshot`s. This is enabled by default and should not be
703+ * disabled.
704+ *
705+ * Previously, Firestore returned timestamp fields as `Date` but `Date`
706+ * only supports millisecond precision, which leads to truncation and
707+ * causes unexpected behavior when using a timestamp from a snapshot as a
708+ * part of a subsequent query.
709+ *
710+ * So now Firestore returns `Timestamp` values instead of `Date`, avoiding
711+ * this kind of problem.
712+ *
713+ * To opt into the old behavior of returning `Date` objects, you can
714+ * temporarily set `timestampsInSnapshots` to false.
715+ *
716+ * @deprecated This setting will be removed in a future release. You should
717+ * update your code to expect `Timestamp` objects and stop using the
718+ * `timestampsInSnapshots` setting.
719+ */
720+ timestampsInSnapshots ?: boolean ;
721+
722+ /**
723+ * An approximate cache size threshold for the on-disk data. If the cache grows beyond this
724+ * size, Firestore will start removing data that hasn't been recently used. The size is not a
725+ * guarantee that the cache will stay below that size, only that if the cache exceeds the given
726+ * size, cleanup will be attempted.
727+ *
728+ * The default value is 40 MB. The threshold must be set to at least 1 MB, and can be set to
729+ * CACHE_SIZE_UNLIMITED to disable garbage collection.
730+ */
731+ cacheSizeBytes ?: number ;
732+ }
733+ /**
734+ * Specifies custom settings to be used to configure the `Firestore`
735+ * instance. Must be set before invoking any other methods.
736+ *
737+ * @param settings The settings to use.
738+ */
739+ export function settings ( settings : Settings ) : void ;
694740 export interface SetOptions {
695741 merge ?: boolean ;
696742 }
0 commit comments