<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@firebase/firestore](./firestore.md) &gt; [/](./firestore_.md) &gt; [DocumentChange](./firestore_.documentchange.md) &gt; [oldIndex](./firestore_.documentchange.oldindex.md)

## DocumentChange.oldIndex property

The index of the changed document in the result set immediately prior to this `DocumentChange` (i.e. supposing that all prior `DocumentChange` objects have been applied). Is `-1` for 'added' events.

<b>Signature:</b>

```typescript
readonly oldIndex: number;
```
