voluptasmollitia
Version:
Monorepo for the Firebase JavaScript SDK
26 lines (15 loc) • 936 B
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@firebase/firestore](./firestore.md) > [lite](./firestore_lite.md) > [QuerySnapshot](./firestore_lite.querysnapshot.md) > [forEach](./firestore_lite.querysnapshot.foreach.md)
## QuerySnapshot.forEach() method
Enumerates all of the documents in the `QuerySnapshot`<!-- -->.
<b>Signature:</b>
```typescript
forEach(callback: (result: QueryDocumentSnapshot<T>) => void, thisArg?: unknown): void;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| callback | (result: [QueryDocumentSnapshot](./firestore_lite.querydocumentsnapshot.md)<!-- --><T>) => void | A callback to be called with a <code>QueryDocumentSnapshot</code> for each document in the snapshot. |
| thisArg | unknown | The <code>this</code> binding for the callback. |
<b>Returns:</b>
void