@@ -42,40 +42,40 @@ export function setLogLevel(logLevel: LogLevel): void;
42
42
43
43
export class FirebaseFirestore {
44
44
private constructor ( ) ;
45
-
45
+
46
46
settings ( settings : Settings ) : void ;
47
-
47
+
48
48
enablePersistence ( settings ?: PersistenceSettings ) : Promise < void > ;
49
-
49
+
50
50
collection ( collectionPath : string ) : CollectionReference ;
51
-
51
+
52
52
doc ( documentPath : string ) : DocumentReference ;
53
-
53
+
54
54
collectionGroup ( collectionId : string ) : Query ;
55
-
55
+
56
56
runTransaction < T > (
57
57
updateFunction : ( transaction : Transaction ) => Promise < T >
58
58
) : Promise < T > ;
59
-
59
+
60
60
batch ( ) : WriteBatch ;
61
-
61
+
62
62
app : any ;
63
-
63
+
64
64
clearPersistence ( ) : Promise < void > ;
65
-
65
+
66
66
enableNetwork ( ) : Promise < void > ;
67
-
67
+
68
68
disableNetwork ( ) : Promise < void > ;
69
-
69
+
70
70
waitForPendingWrites ( ) : Promise < void > ;
71
-
71
+
72
72
onSnapshotsInSync ( observer : {
73
73
next ?: ( value : void ) => void ;
74
74
error ?: ( error : Error ) => void ;
75
75
complete ?: ( ) => void ;
76
76
} ) : ( ) => void ;
77
77
onSnapshotsInSync ( onSync : ( ) => void ) : ( ) => void ;
78
-
78
+
79
79
terminate ( ) : Promise < void > ;
80
80
81
81
INTERNAL : { delete : ( ) => Promise < void > } ;
@@ -86,26 +86,26 @@ export class GeoPoint {
86
86
87
87
readonly latitude : number ;
88
88
readonly longitude : number ;
89
-
89
+
90
90
isEqual ( other : GeoPoint ) : boolean ;
91
91
}
92
92
93
93
export class Timestamp {
94
94
constructor ( seconds : number , nanoseconds : number ) ;
95
-
95
+
96
96
static now ( ) : Timestamp ;
97
-
97
+
98
98
static fromDate ( date : Date ) : Timestamp ;
99
-
99
+
100
100
static fromMillis ( milliseconds : number ) : Timestamp ;
101
101
102
102
readonly seconds : number ;
103
103
readonly nanoseconds : number ;
104
104
105
105
toDate ( ) : Date ;
106
-
106
+
107
107
toMillis ( ) : number ;
108
-
108
+
109
109
isEqual ( other : Timestamp ) : boolean ;
110
110
}
111
111
@@ -119,7 +119,7 @@ export class Blob {
119
119
public toBase64 ( ) : string ;
120
120
121
121
public toUint8Array ( ) : Uint8Array ;
122
-
122
+
123
123
isEqual ( other : Blob ) : boolean ;
124
124
}
125
125
@@ -133,7 +133,7 @@ export class Transaction {
133
133
data : DocumentData ,
134
134
options ?: SetOptions
135
135
) : Transaction ;
136
-
136
+
137
137
update ( documentRef : DocumentReference , data : UpdateData ) : Transaction ;
138
138
update (
139
139
documentRef : DocumentReference ,
@@ -142,7 +142,6 @@ export class Transaction {
142
142
...moreFieldsAndValues : any [ ]
143
143
) : Transaction ;
144
144
145
-
146
145
delete ( documentRef : DocumentReference ) : Transaction ;
147
146
}
148
147
@@ -162,9 +161,9 @@ export class WriteBatch {
162
161
value : any ,
163
162
...moreFieldsAndValues : any [ ]
164
163
) : WriteBatch ;
165
-
164
+
166
165
delete ( documentRef : DocumentReference ) : WriteBatch ;
167
-
166
+
168
167
commit ( ) : Promise < void > ;
169
168
}
170
169
@@ -294,14 +293,13 @@ export class Query {
294
293
295
294
startAt ( snapshot : DocumentSnapshot ) : Query ;
296
295
startAt ( ...fieldValues : any [ ] ) : Query ;
297
-
296
+
298
297
startAfter ( snapshot : DocumentSnapshot ) : Query ;
299
298
startAfter ( ...fieldValues : any [ ] ) : Query ;
300
299
301
300
endBefore ( snapshot : DocumentSnapshot ) : Query ;
302
301
endBefore ( ...fieldValues : any [ ] ) : Query ;
303
302
304
-
305
303
endAt ( snapshot : DocumentSnapshot ) : Query ;
306
304
endAt ( ...fieldValues : any [ ] ) : Query ;
307
305
@@ -365,39 +363,39 @@ export interface DocumentChange {
365
363
366
364
export class CollectionReference extends Query {
367
365
private constructor ( ) ;
368
-
366
+
369
367
readonly id : string ;
370
368
readonly parent : DocumentReference | null ;
371
369
readonly path : string ;
372
-
370
+
373
371
doc ( documentPath ?: string ) : DocumentReference ;
374
-
372
+
375
373
add ( data : DocumentData ) : Promise < DocumentReference > ;
376
-
374
+
377
375
isEqual ( other : CollectionReference ) : boolean ;
378
376
}
379
377
380
378
export class FieldValue {
381
379
private constructor ( ) ;
382
-
380
+
383
381
static serverTimestamp ( ) : FieldValue ;
384
-
382
+
385
383
static delete ( ) : FieldValue ;
386
-
384
+
387
385
static arrayUnion ( ...elements : any [ ] ) : FieldValue ;
388
-
386
+
389
387
static arrayRemove ( ...elements : any [ ] ) : FieldValue ;
390
-
388
+
391
389
static increment ( n : number ) : FieldValue ;
392
-
390
+
393
391
isEqual ( other : FieldValue ) : boolean ;
394
392
}
395
393
396
394
export class FieldPath {
397
395
constructor ( ...fieldNames : string [ ] ) ;
398
-
396
+
399
397
static documentId ( ) : FieldPath ;
400
-
398
+
401
399
isEqual ( other : FieldPath ) : boolean ;
402
400
}
403
401
0 commit comments