veritatisdoloremque
Version:
Monorepo for the Firebase JavaScript SDK
26 lines (15 loc) • 1.13 kB
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@firebase/firestore](./firestore.md) > [/](./firestore_.md) > [FirestoreDataConverter](./firestore_.firestoredataconverter.md) > [fromFirestore](./firestore_.firestoredataconverter.fromfirestore.md)
## 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)`<!-- -->.
<b>Signature:</b>
```typescript
fromFirestore(snapshot: QueryDocumentSnapshot<DocumentData>, options?: SnapshotOptions): T;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| snapshot | [QueryDocumentSnapshot](./firestore_.querydocumentsnapshot.md)<!-- --><[DocumentData](./firestore_.documentdata.md)<!-- -->> | A <code>QueryDocumentSnapshot</code> containing your data and metadata. |
| options | [SnapshotOptions](./firestore_.snapshotoptions.md) | The <code>SnapshotOptions</code> from the initial call to <code>data()</code>. |
<b>Returns:</b>
T