Skip to content

Commit 8a181e1

Browse files
committed
Overloaded onSnapshot signature impl.
1 parent 593e3cd commit 8a181e1

File tree

2 files changed

+431
-231
lines changed

2 files changed

+431
-231
lines changed

common/api-review/firestore.api.md

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -456,18 +456,47 @@ export function onSnapshot<AppModelType, DbModelType extends DocumentData>(query
456456
}): Unsubscribe;
457457

458458
// @public
459-
export function onSnapshot<AppModelType, DbModelType extends DocumentData>(query: Query<AppModelType, DbModelType>, onNext: (snapshot: QuerySnapshot<AppModelType, DbModelType>) => void, onError?: (error: FirestoreError) => void, onCompletion?: () => void): Unsubscribe;
459+
export function onSnapshot<AppModelType, DbModelType extends DocumentData>(query: Query<AppModelType, DbModelType>, onNext?: (snapshot: QuerySnapshot<AppModelType, DbModelType>) => void, onError?: (error: FirestoreError) => void, onCompletion?: () => void): Unsubscribe;
460460

461461
// @public
462462
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;
463463

464-
// @public (undocumented)
465-
export function onSnapshot<AppModelType, DbModelType extends DocumentData>(db: Firestore, json: {
464+
// @public
465+
export function onSnapshot<AppModelType, DbModelType extends DocumentData>(firestore: Firestore, json: {
466466
bundle: string;
467467
bundleName: string;
468468
bundleSource: string;
469469
}, onNext: (snapshot: QuerySnapshot<AppModelType, DbModelType>) => void, onError?: (error: FirestoreError) => void, onCompletion?: () => void, converter?: FirestoreDataConverter<DbModelType>): Unsubscribe;
470470

471+
// @public
472+
export function onSnapshot<AppModelType, DbModelType extends DocumentData>(firestore: Firestore, json: {
473+
bundle: string;
474+
bundleName: string;
475+
bundleSource: string;
476+
}, options: SnapshotListenOptions, onNext: (snapshot: QuerySnapshot<AppModelType, DbModelType>) => void, onError?: (error: FirestoreError) => void, onCompletion?: () => void, converter?: FirestoreDataConverter<DbModelType>): Unsubscribe;
477+
478+
// @public
479+
export function onSnapshot<AppModelType, DbModelType extends DocumentData>(firestore: Firestore, json: {
480+
bundle: string;
481+
bundleName: string;
482+
bundleSource: string;
483+
}, observer: {
484+
next: (snapshot: QuerySnapshot<AppModelType, DbModelType>) => void;
485+
error?: (error: FirestoreError) => void;
486+
complete?: () => void;
487+
}, converter?: FirestoreDataConverter<DbModelType>): Unsubscribe;
488+
489+
// @public
490+
export function onSnapshot<AppModelType, DbModelType extends DocumentData>(firestore: Firestore, json: {
491+
bundle: string;
492+
bundleName: string;
493+
bundleSource: string;
494+
}, options: SnapshotListenOptions, observer: {
495+
next: (snapshot: QuerySnapshot<AppModelType, DbModelType>) => void;
496+
error?: (error: FirestoreError) => void;
497+
complete?: () => void;
498+
}, converter?: FirestoreDataConverter<DbModelType>): Unsubscribe;
499+
471500
// @public
472501
export function onSnapshotsInSync(firestore: Firestore, observer: {
473502
next?: (value: void) => void;

0 commit comments

Comments
 (0)