File tree Expand file tree Collapse file tree 2 files changed +15
-4
lines changed Expand file tree Collapse file tree 2 files changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -266,8 +266,14 @@ export interface FirestoreDataConverter<
266
266
* `snapshot.data(options)`.
267
267
*
268
268
* Generally, the data returned from `snapshot.data()` can be cast to
269
- * `DbModelType`; however, this is not guaranteed as writes to the database
270
- * may have occurred without a type converter enforcing this specific layout.
269
+ * `DbModelType`; however, this is not guaranteed because Firestore does not
270
+ * enforce a schema on the database. For example, writes from a previous
271
+ * version of the application or writes from another client that did not use a
272
+ * type converter could have written data with different properties and/or
273
+ * property types. The implementation will need to choose whether to
274
+ * gracefully recover from non-conforming data or throw an error.
275
+ *
276
+ * To override this method, see {@link (FirestoreDataConverter.fromFirestore:1)}.
271
277
*
272
278
* @param snapshot - A `QueryDocumentSnapshot` containing your data and metadata.
273
279
* @param options - The `SnapshotOptions` from the initial call to `data()`.
Original file line number Diff line number Diff line change @@ -266,9 +266,14 @@ export interface FirestoreDataConverter<
266
266
* type `AppModelType`. You can access your data by calling:
267
267
* `snapshot.data()`.
268
268
*
269
+ *
269
270
* Generally, the data returned from `snapshot.data()` can be cast to
270
- * `DbModelType`; however, this is not guaranteed as writes to the database
271
- * may have occurred without a type converter enforcing this specific layout.
271
+ * `DbModelType`; however, this is not guaranteed because Firestore does not
272
+ * enforce a schema on the database. For example, writes from a previous
273
+ * version of the application or writes from another client that did not use a
274
+ * type converter could have written data with different properties and/or
275
+ * property types. The implementation will need to choose whether to
276
+ * gracefully recover from non-conforming data or throw an error.
272
277
*
273
278
* @param snapshot - A `QueryDocumentSnapshot` containing your data and
274
279
* metadata.
You can’t perform that action at this time.
0 commit comments