The index of the changed document in the result set immediately after
this DocumentChange (i.e. supposing that all prior DocumentChange
objects and the current DocumentChange object have been applied).
Is -1 for 'removed' events.
oldIndex
oldIndex:number
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2022-07-27 UTC."],[],[],null,["- [firebase](/docs/reference/js/v8/firebase).\n- [firestore](/docs/reference/js/v8/firebase.firestore).\n- DocumentChange\n\\\u003c T \\\u003e \nA `DocumentChange` represents a change to the documents matching a query.\nIt contains the document affected and the type of change that occurred.\n\nType parameters\n\n-\n\n T\n\nIndex\n\nProperties\n\n- [doc](/docs/reference/js/v8/firebase.firestore.DocumentChange#doc)\n- [newIndex](/docs/reference/js/v8/firebase.firestore.DocumentChange#newindex)\n- [oldIndex](/docs/reference/js/v8/firebase.firestore.DocumentChange#oldindex)\n- [type](/docs/reference/js/v8/firebase.firestore.DocumentChange#type)\n\nProperties\n\ndoc \ndoc: [QueryDocumentSnapshot](/docs/reference/js/v8/firebase.firestore.QueryDocumentSnapshot)\\\u003cT\\\u003e \nThe document affected by this change.\n\nnewIndex \nnewIndex: number \nThe index of the changed document in the result set immediately after\nthis `DocumentChange` (i.e. supposing that all prior `DocumentChange`\nobjects and the current `DocumentChange` object have been applied).\nIs -1 for 'removed' events.\n\noldIndex \noldIndex: number \nThe index of the changed document in the result set immediately prior to\nthis `DocumentChange` (i.e. supposing that all prior `DocumentChange` objects\nhave been applied). Is -1 for 'added' events.\n\ntype \ntype: [DocumentChangeType](/docs/reference/js/v8/firebase.firestore#documentchangetype) \nThe type of change ('added', 'modified', or 'removed')."]]
A
DocumentChange
represents a change to the documents matching a query. It contains the document affected and the type of change that occurred.