Home > @firebase/firestore > lite > FirestoreDataConverter > toFirestore
FirestoreDataConverter.toFirestore() method
Called by the Firestore SDK to convert a custom model object of type T
into a plain Javascript object (suitable for writing directly to the Firestore database). Used with setDoc(), and .
Signature:
toFirestore(modelObject: T): DocumentData;
Parameters
Parameter | Type | Description |
---|---|---|
modelObject | T |
Returns: