@@ -33,6 +33,8 @@ export declare class DocumentReference<AppModelType = DocumentData, DbModelType
3333
3434| Method | Modifiers | Description |
3535| --- | --- | --- |
36+ | [fromJSON (firestore , json , converter )](./firestore_lite .documentreference .md #documentreferencefromjson ) | <code >static </code > | Builds a <code >DocumentReference </code > instance from a JSON serialized version of <code >DocumentReference </code >. |
37+ | [toJSON ()](./firestore_lite .documentreference .md #documentreferencetojson ) | | Returns a JSON -serializable representation of this DocumentReference . |
3638| [withConverter (converter )](./firestore_lite .documentreference .md #documentreferencewithconverter ) | | Applies a custom data converter to this <code >DocumentReference </code >, allowing you to use your own custom model objects with Firestore . When you call [setDoc ()](./firestore_lite .md #setdoc_ee215ad )<!-- -->, [getDoc ()](./firestore_lite .md #getdoc_4569087 )<!-- -->, etc . with the returned <code >DocumentReference </code > instance , the provided converter will convert between Firestore data of type <code >NewDbModelType </code > and your custom type <code >NewAppModelType </code >. |
3739| [withConverter (converter )](./firestore_lite .documentreference .md #documentreferencewithconverter ) | | Removes the current converter . |
3840
@@ -96,6 +98,41 @@ The type of this Firestore reference.
9698readonly type = "document ";
9799```
98100
101+ ## DocumentReference .fromJSON ()
102+
103+ Builds a `DocumentReference ` instance from a JSON serialized version of `DocumentReference `<!-- -->.
104+
105+ <b >Signature :</b >
106+
107+ ```typescript
108+ static fromJSON <NewAppModelType = DocumentData , NewDbModelType extends DocumentData = DocumentData >(firestore : Firestore , json : object , converter ?: FirestoreDataConverter <NewAppModelType , NewDbModelType >): DocumentReference <NewAppModelType , NewDbModelType >;
109+ ```
110+
111+ #### Parameters
112+
113+ | Parameter | Type | Description |
114+ | --- | --- | --- |
115+ | firestore | [Firestore ](./firestore_lite .firestore .md #firestore_class ) | |
116+ | json | object | |
117+ | converter | [FirestoreDataConverter ](./firestore_lite .firestoredataconverter .md #firestoredataconverter_interface )<!-- -->< ;NewAppModelType , NewDbModelType > ; | |
118+
119+ <b >Returns :</b >
120+
121+ [DocumentReference ](./firestore_lite .documentreference .md #documentreference_class )<!-- -->< ;NewAppModelType , NewDbModelType > ;
122+
123+ ## DocumentReference .toJSON ()
124+
125+ Returns a JSON -serializable representation of this DocumentReference .
126+
127+ <b >Signature :</b >
128+
129+ ```typescript
130+ toJSON (): object ;
131+ ```
132+ <b >Returns :</b >
133+
134+ object
135+
99136## DocumentReference .withConverter ()
100137
101138Applies a custom data converter to this `DocumentReference `<!-- -->, allowing you to use your own custom model objects with Firestore . When you call [setDoc ()](./firestore_lite .md #setdoc_ee215ad )<!-- -->, [getDoc ()](./firestore_lite .md #getdoc_4569087 )<!-- -->, etc . with the returned `DocumentReference ` instance , the provided converter will convert between Firestore data of type `NewDbModelType ` and your custom type `NewAppModelType `<!-- -->.
0 commit comments