Home > @firebase/firestore > / > FirestoreDataConverter > fromFirestore
FirestoreDataConverter.fromFirestore() method
Called by the Firestore SDK to convert Firestore data into an object of type T. You can access your data by calling: snapshot.data(options).
Signature:
fromFirestore(snapshot: QueryDocumentSnapshot<DocumentData>, options?: SnapshotOptions): T;
Parameters
| Parameter | Type | Description |
|---|---|---|
| snapshot | QueryDocumentSnapshot<DocumentData> | A QueryDocumentSnapshot containing your data and metadata. |
| options | SnapshotOptions | The SnapshotOptions from the initial call to data(). |
Returns:
T