<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@firebase/firestore](./firestore.md) &gt; [lite](./firestore_lite.md) &gt; [QueryDocumentSnapshot](./firestore_lite.querydocumentsnapshot.md) &gt; [data](./firestore_lite.querydocumentsnapshot.data.md)

## QueryDocumentSnapshot.data() method

Retrieves all fields in the document as an `Object`<!-- -->.

<b>Signature:</b>

```typescript
/** @override */
data(): T;
```
<b>Returns:</b>

T

An `Object` containing all fields in the document.

