@firebase/firestore-types 2.5.1-canary.fe7da7ec3 → 3.0.0-20230706224113
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +24 -8
- package/package.json +3 -3
package/index.d.ts
CHANGED
|
@@ -241,7 +241,10 @@ export interface GetOptions {
|
|
|
241
241
|
readonly source?: 'default' | 'server' | 'cache';
|
|
242
242
|
}
|
|
243
243
|
|
|
244
|
-
export class DocumentReference<
|
|
244
|
+
export class DocumentReference<
|
|
245
|
+
T = DocumentData,
|
|
246
|
+
T2 extends DocumentData = DocumentData
|
|
247
|
+
> {
|
|
245
248
|
private constructor();
|
|
246
249
|
|
|
247
250
|
readonly id: string;
|
|
@@ -307,7 +310,10 @@ export interface SnapshotMetadata {
|
|
|
307
310
|
isEqual(other: SnapshotMetadata): boolean;
|
|
308
311
|
}
|
|
309
312
|
|
|
310
|
-
export class DocumentSnapshot<
|
|
313
|
+
export class DocumentSnapshot<
|
|
314
|
+
T = DocumentData,
|
|
315
|
+
T2 extends DocumentData = DocumentData
|
|
316
|
+
> {
|
|
311
317
|
protected constructor();
|
|
312
318
|
|
|
313
319
|
readonly exists: boolean;
|
|
@@ -323,8 +329,9 @@ export class DocumentSnapshot<T = DocumentData> {
|
|
|
323
329
|
}
|
|
324
330
|
|
|
325
331
|
export class QueryDocumentSnapshot<
|
|
326
|
-
T = DocumentData
|
|
327
|
-
|
|
332
|
+
T = DocumentData,
|
|
333
|
+
T2 extends DocumentData = DocumentData
|
|
334
|
+
> extends DocumentSnapshot<T, T2> {
|
|
328
335
|
private constructor();
|
|
329
336
|
|
|
330
337
|
data(options?: SnapshotOptions): T;
|
|
@@ -344,7 +351,7 @@ export type WhereFilterOp =
|
|
|
344
351
|
| 'array-contains-any'
|
|
345
352
|
| 'not-in';
|
|
346
353
|
|
|
347
|
-
export class Query<T = DocumentData> {
|
|
354
|
+
export class Query<T = DocumentData, T2 extends DocumentData = DocumentData> {
|
|
348
355
|
protected constructor();
|
|
349
356
|
|
|
350
357
|
readonly firestore: FirebaseFirestore;
|
|
@@ -409,7 +416,10 @@ export class Query<T = DocumentData> {
|
|
|
409
416
|
withConverter<U>(converter: FirestoreDataConverter<U>): Query<U>;
|
|
410
417
|
}
|
|
411
418
|
|
|
412
|
-
export class QuerySnapshot<
|
|
419
|
+
export class QuerySnapshot<
|
|
420
|
+
T = DocumentData,
|
|
421
|
+
T2 extends DocumentData = DocumentData
|
|
422
|
+
> {
|
|
413
423
|
private constructor();
|
|
414
424
|
|
|
415
425
|
readonly query: Query<T>;
|
|
@@ -430,14 +440,20 @@ export class QuerySnapshot<T = DocumentData> {
|
|
|
430
440
|
|
|
431
441
|
export type DocumentChangeType = 'added' | 'removed' | 'modified';
|
|
432
442
|
|
|
433
|
-
export interface DocumentChange<
|
|
443
|
+
export interface DocumentChange<
|
|
444
|
+
T = DocumentData,
|
|
445
|
+
T2 extends DocumentData = DocumentData
|
|
446
|
+
> {
|
|
434
447
|
readonly type: DocumentChangeType;
|
|
435
448
|
readonly doc: QueryDocumentSnapshot<T>;
|
|
436
449
|
readonly oldIndex: number;
|
|
437
450
|
readonly newIndex: number;
|
|
438
451
|
}
|
|
439
452
|
|
|
440
|
-
export class CollectionReference<
|
|
453
|
+
export class CollectionReference<
|
|
454
|
+
T = DocumentData,
|
|
455
|
+
T2 extends DocumentData = DocumentData
|
|
456
|
+
> extends Query<T, T2> {
|
|
441
457
|
private constructor();
|
|
442
458
|
|
|
443
459
|
readonly id: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@firebase/firestore-types",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0-20230706224113",
|
|
4
4
|
"description": "@firebase/firestore Types",
|
|
5
5
|
"author": "Firebase <firebase-support@google.com> (https://firebase.google.com/)",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
"index.d.ts"
|
|
13
13
|
],
|
|
14
14
|
"peerDependencies": {
|
|
15
|
-
"@firebase/app-types": "0.
|
|
16
|
-
"@firebase/util": "1.
|
|
15
|
+
"@firebase/app-types": "0.x",
|
|
16
|
+
"@firebase/util": "1.x"
|
|
17
17
|
},
|
|
18
18
|
"repository": {
|
|
19
19
|
"directory": "packages/firestore-types",
|