Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

documentSnapshotFromJSON

Builds a DocumentSnapshot instance from a JSON object created by DocumentSnapshot.toJSON.

function documentSnapshotFromJSON(db: Firestore, json: object): DocumentSnapshot;
function documentSnapshotFromJSON<AppModelType, DbModelType extends DocumentData = DocumentData>(
json: object,
converter: FirestoreDataConverter<AppModelType, DbModelType>,
): DocumentSnapshot<AppModelType, DbModelType>;
§
documentSnapshotFromJSON(db: Firestore, json: object): DocumentSnapshot
[src]

Builds a DocumentSnapshot instance from a JSON object created by DocumentSnapshot.toJSON.

§Parameters

§
json: object
[src]
  • a JSON object represention of a DocumentSnapshot instance.

§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.

§Type Parameters

§
AppModelType
[src]
§
DbModelType extends DocumentData = DocumentData
[src]

§Parameters

§
json: object
[src]
  • a JSON object represention of a DocumentSnapshot instance.
§
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.