Firestore class

The Cloud Firestore service interface.

Do not call this constructor directly. Instead, usegetFirestore().

Signature:

exportdeclareclassFirestore

Properties

PropertyModifiersTypeDescription
appFirebaseAppTheFirebaseApp associated with thisFirestore service instance.
type'firestore-lite' | 'firestore'Whether it's a Firestore or Firestore Lite instance.

Methods

MethodModifiersDescription
toJSON()Returns a JSON-serializable representation of thisFirestore instance.

Firestore.app

TheFirebaseApp associated with thisFirestore service instance.

Signature:

getapp():FirebaseApp;

Firestore.type

Whether it's a Firestore or Firestore Lite instance.

Signature:

type:'firestore-lite'|'firestore';

Firestore.toJSON()

Returns a JSON-serializable representation of thisFirestore instance.

Signature:

toJSON():object;

Returns:

object

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026-01-15 UTC.