File tree Expand file tree Collapse file tree 2 files changed +12
-16
lines changed Expand file tree Collapse file tree 2 files changed +12
-16
lines changed Original file line number Diff line number Diff line change 15
15
* limitations under the License.
16
16
*/
17
17
18
- import { DocumentData } from '@firebase/firestore-types' ;
18
+ import {
19
+ DocumentData ,
20
+ QueryDocumentSnapshot ,
21
+ SetOptions
22
+ } from '@firebase/firestore-types' ;
19
23
20
24
/**
21
25
* <code>firebase</code> is a global namespace from which all Firebase
@@ -7864,9 +7868,8 @@ declare namespace firebase.firestore {
7864
7868
* Firestore database). To use set() with `merge` and `mergeFields,
7865
7869
* toFirestore() must be defined with `Partial<T>`.
7866
7870
*/
7867
- toFirestore :
7868
- | ( ( modelObject : T ) => DocumentData )
7869
- | ( ( modelObject : Partial < T > , options ?: SetOptions ) => DocumentData ) ;
7871
+ toFirestore ( modelObject : T ) : DocumentData ;
7872
+ toFirestore ( modelObject : Partial < T > , options : SetOptions ) : DocumentData ;
7870
7873
7871
7874
/**
7872
7875
* Called by the Firestore SDK to convert Firestore data into an object of
@@ -7875,10 +7878,7 @@ declare namespace firebase.firestore {
7875
7878
* @param snapshot A QueryDocumentSnapshot containing your data and metadata.
7876
7879
* @param options The SnapshotOptions from the initial call to `data()`.
7877
7880
*/
7878
- fromFirestore : (
7879
- snapshot : QueryDocumentSnapshot ,
7880
- options : SnapshotOptions
7881
- ) => T ;
7881
+ fromFirestore ( snapshot : QueryDocumentSnapshot , options : SnapshotOptions ) : T ;
7882
7882
}
7883
7883
7884
7884
/**
Original file line number Diff line number Diff line change @@ -49,14 +49,10 @@ export type LogLevel =
49
49
export function setLogLevel ( logLevel : LogLevel ) : void ;
50
50
51
51
export interface FirestoreDataConverter < T > {
52
- toFirestore :
53
- | ( ( modelObject : T ) => DocumentData )
54
- | ( ( modelObject : Partial < T > , options ?: SetOptions ) => DocumentData ) ;
55
-
56
- fromFirestore : (
57
- snapshot : QueryDocumentSnapshot ,
58
- options : SnapshotOptions
59
- ) => T ;
52
+ toFirestore ( modelObject : T ) : DocumentData ;
53
+ toFirestore ( modelObject : Partial < T > , options : SetOptions ) : DocumentData ;
54
+
55
+ fromFirestore ( snapshot : QueryDocumentSnapshot , options : SnapshotOptions ) : T ;
60
56
}
61
57
62
58
export class FirebaseFirestore {
You can’t perform that action at this time.
0 commit comments