You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: fix object spread typing and mis-named variables (#1188)
There was an issue with typing (I think) using the current way of returning a new object with the doc.id included. This method ensures that what gets returned is properly typed.
This method was used on two other examples (`.stateChanges()` and `auditTrail()`) so those were updated as well. I also found a handful of mis-named types (assume they were missed from copy/pasting) and so I updated those as well.
const data =a.payload.doc.data() asAccountLogItem;
253
+
const id =a.payload.doc.id;
254
+
return { id, ...data };
255
+
})
241
256
});
242
257
}
243
258
}
@@ -305,4 +320,4 @@ To add a new document to a collection with a generated id use the `add()` method
305
320
306
321
To retrieve, update, or delete an individual document you can use the `doc()` method. This method returns an `AngularFirestoreDocument`, which provides methods for streaming, updating, and deleting. [See Using Documents with AngularFirestore for more information on how to use documents](documents.md).
307
322
308
-
### [Next Step: Querying Collections in AngularFirestore](querying-collections.md)
323
+
### [Next Step: Querying Collections in AngularFirestore](querying-collections.md)
0 commit comments