Skip to content

Commit 68d49a6

Browse files
committed
Fixes for review.
1 parent afc7f44 commit 68d49a6

File tree

7 files changed

+171
-214
lines changed

7 files changed

+171
-214
lines changed

common/api-review/firestore.api.md

Lines changed: 10 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -179,11 +179,7 @@ export class DocumentSnapshot<AppModelType = DocumentData, DbModelType extends D
179179
readonly metadata: SnapshotMetadata;
180180
get ref(): DocumentReference<AppModelType, DbModelType>;
181181
// (undocumented)
182-
toJSON(): {
183-
bundle: string;
184-
bundleSource: string;
185-
bundleName: string;
186-
};
182+
toJSON(): object;
187183
}
188184

189185
export { EmulatorMockTokenOptions }
@@ -466,72 +462,40 @@ export function onSnapshot<AppModelType, DbModelType extends DocumentData>(query
466462
export function onSnapshot<AppModelType, DbModelType extends DocumentData>(query: Query<AppModelType, DbModelType>, options: SnapshotListenOptions, onNext: (snapshot: QuerySnapshot<AppModelType, DbModelType>) => void, onError?: (error: FirestoreError) => void, onCompletion?: () => void): Unsubscribe;
467463

468464
// @public
469-
export function onSnapshot<AppModelType, DbModelType extends DocumentData>(firestore: Firestore, snapshotJson: {
470-
bundle: string;
471-
bundleName: string;
472-
bundleSource: string;
473-
}, onNext: (snapshot: QuerySnapshot<AppModelType, DbModelType>) => void, onError?: (error: FirestoreError) => void, onCompletion?: () => void, converter?: FirestoreDataConverter<DbModelType>): Unsubscribe;
465+
export function onSnapshot<AppModelType, DbModelType extends DocumentData>(firestore: Firestore, snapshotJson: object, onNext: (snapshot: QuerySnapshot<AppModelType, DbModelType>) => void, onError?: (error: FirestoreError) => void, onCompletion?: () => void, converter?: FirestoreDataConverter<DbModelType>): Unsubscribe;
474466

475467
// @public
476-
export function onSnapshot<AppModelType, DbModelType extends DocumentData>(firestore: Firestore, snapshotJson: {
477-
bundle: string;
478-
bundleName: string;
479-
bundleSource: string;
480-
}, onNext: (snapshot: DocumentSnapshot<AppModelType, DbModelType>) => void, onError?: (error: FirestoreError) => void, onCompletion?: () => void, converter?: FirestoreDataConverter<DbModelType>): Unsubscribe;
468+
export function onSnapshot<AppModelType, DbModelType extends DocumentData>(firestore: Firestore, snapshotJson: object, onNext: (snapshot: DocumentSnapshot<AppModelType, DbModelType>) => void, onError?: (error: FirestoreError) => void, onCompletion?: () => void, converter?: FirestoreDataConverter<DbModelType>): Unsubscribe;
481469

482470
// @public
483-
export function onSnapshot<AppModelType, DbModelType extends DocumentData>(firestore: Firestore, snapshotJson: {
484-
bundle: string;
485-
bundleName: string;
486-
bundleSource: string;
487-
}, options: SnapshotListenOptions, onNext: (snapshot: QuerySnapshot<AppModelType, DbModelType>) => void, onError?: (error: FirestoreError) => void, onCompletion?: () => void, converter?: FirestoreDataConverter<DbModelType>): Unsubscribe;
471+
export function onSnapshot<AppModelType, DbModelType extends DocumentData>(firestore: Firestore, snapshotJson: object, options: SnapshotListenOptions, onNext: (snapshot: QuerySnapshot<AppModelType, DbModelType>) => void, onError?: (error: FirestoreError) => void, onCompletion?: () => void, converter?: FirestoreDataConverter<DbModelType>): Unsubscribe;
488472

489473
// @public
490-
export function onSnapshot<AppModelType, DbModelType extends DocumentData>(firestore: Firestore, snapshotJson: {
491-
bundle: string;
492-
bundleName: string;
493-
bundleSource: string;
494-
}, options: SnapshotListenOptions, onNext: (snapshot: DocumentSnapshot<AppModelType, DbModelType>) => void, onError?: (error: FirestoreError) => void, onCompletion?: () => void, converter?: FirestoreDataConverter<DbModelType>): Unsubscribe;
474+
export function onSnapshot<AppModelType, DbModelType extends DocumentData>(firestore: Firestore, snapshotJson: object, options: SnapshotListenOptions, onNext: (snapshot: DocumentSnapshot<AppModelType, DbModelType>) => void, onError?: (error: FirestoreError) => void, onCompletion?: () => void, converter?: FirestoreDataConverter<DbModelType>): Unsubscribe;
495475

496476
// @public
497-
export function onSnapshot<AppModelType, DbModelType extends DocumentData>(firestore: Firestore, snapshotJson: {
498-
bundle: string;
499-
bundleName: string;
500-
bundleSource: string;
501-
}, observer: {
477+
export function onSnapshot<AppModelType, DbModelType extends DocumentData>(firestore: Firestore, snapshotJson: object, observer: {
502478
next: (snapshot: QuerySnapshot<AppModelType, DbModelType>) => void;
503479
error?: (error: FirestoreError) => void;
504480
complete?: () => void;
505481
}, converter?: FirestoreDataConverter<DbModelType>): Unsubscribe;
506482

507483
// @public
508-
export function onSnapshot<AppModelType, DbModelType extends DocumentData>(firestore: Firestore, snapshotJson: {
509-
bundle: string;
510-
bundleName: string;
511-
bundleSource: string;
512-
}, observer: {
484+
export function onSnapshot<AppModelType, DbModelType extends DocumentData>(firestore: Firestore, snapshotJson: object, observer: {
513485
next: (snapshot: DocumentSnapshot<AppModelType, DbModelType>) => void;
514486
error?: (error: FirestoreError) => void;
515487
complete?: () => void;
516488
}, converter?: FirestoreDataConverter<DbModelType>): Unsubscribe;
517489

518490
// @public
519-
export function onSnapshot<AppModelType, DbModelType extends DocumentData>(firestore: Firestore, snapshotJson: {
520-
bundle: string;
521-
bundleName: string;
522-
bundleSource: string;
523-
}, options: SnapshotListenOptions, observer: {
491+
export function onSnapshot<AppModelType, DbModelType extends DocumentData>(firestore: Firestore, snapshotJson: object, options: SnapshotListenOptions, observer: {
524492
next: (snapshot: QuerySnapshot<AppModelType, DbModelType>) => void;
525493
error?: (error: FirestoreError) => void;
526494
complete?: () => void;
527495
}, converter?: FirestoreDataConverter<DbModelType>): Unsubscribe;
528496

529497
// @public
530-
export function onSnapshot<AppModelType, DbModelType extends DocumentData>(firestore: Firestore, snapshotJson: {
531-
bundle: string;
532-
bundleName: string;
533-
bundleSource: string;
534-
}, options: SnapshotListenOptions, observer: {
498+
export function onSnapshot<AppModelType, DbModelType extends DocumentData>(firestore: Firestore, snapshotJson: object, options: SnapshotListenOptions, observer: {
535499
next: (snapshot: DocumentSnapshot<AppModelType, DbModelType>) => void;
536500
error?: (error: FirestoreError) => void;
537501
complete?: () => void;
@@ -689,11 +653,7 @@ export class QuerySnapshot<AppModelType = DocumentData, DbModelType extends Docu
689653
readonly query: Query<AppModelType, DbModelType>;
690654
get size(): number;
691655
// (undocumented)
692-
toJSON(): {
693-
bundle: string;
694-
bundleSource: string;
695-
bundleName: string;
696-
};
656+
toJSON(): object;
697657
}
698658

699659
// @public

docs-devsite/firestore_.documentsnapshot.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -150,13 +150,9 @@ The data at the specified field location or undefined if no such field exists in
150150
<b>Signature:</b>
151151

152152
```typescript
153-
toJSON(): {
154-
bundle: string;
155-
bundleSource: string;
156-
bundleName: string;
157-
};
153+
toJSON(): object;
158154
```
159155
<b>Returns:</b>
160156

161-
{ bundle: string; bundleSource: string; bundleName: string; }
157+
object
162158

0 commit comments

Comments
 (0)