documentSnapshotFromJSON
Builds a DocumentSnapshot
instance from a JSON object created by
DocumentSnapshot.toJSON.
function documentSnapshotFromJSON<AppModelType, DbModelType extends DocumentData = DocumentData>(
db: Firestore,
json: object,
converter: FirestoreDataConverter<AppModelType, DbModelType>,
): DocumentSnapshot<AppModelType, DbModelType>;§
Builds a DocumentSnapshot
instance from a JSON object created by
DocumentSnapshot.toJSON.
§Parameters
§Return Type
§
an instance of DocumentSnapshot if the JSON object could be parsed. Throws a FirestoreError if an error occurs.
§
documentSnapshotFromJSON<AppModelType, DbModelType extends DocumentData = DocumentData>(db: Firestore, json: object, converter: FirestoreDataConverter<AppModelType, DbModelType>): DocumentSnapshot<AppModelType, DbModelType>
[src]Builds a DocumentSnapshot
instance from a JSON object created by
DocumentSnapshot.toJSON.
§Parameters
§
converter: FirestoreDataConverter<AppModelType, DbModelType>
[src]- Converts objects to and from Firestore.
§Return Type
§
DocumentSnapshot<AppModelType, DbModelType>
[src]an instance of DocumentSnapshot if the JSON object could be parsed. Throws a FirestoreError if an error occurs.