Skip to content
This repository was archived by the owner on Apr 4, 2023. It is now read-only.

Commit fafc6f2

Browse files
committed
chore: cleanup
1 parent 8b5ae28 commit fafc6f2

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/firebase.android.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2729,7 +2729,7 @@ firebase.firestore.getDocument = (collectionPath: string, documentPath: string,
27292729
reject(ex && ex.getReason ? ex.getReason() : ex);
27302730
} else {
27312731
const result: com.google.firebase.firestore.DocumentSnapshot = task.getResult();
2732-
resolve(new firebase.DocumentSnapshot(result));
2732+
resolve(<any>new DocumentSnapshot(result));
27332733
}
27342734
}
27352735
});
@@ -2874,7 +2874,7 @@ function convertDocChangeType(type: com.google.firebase.firestore.DocumentChange
28742874
}
28752875

28762876
function convertDocument(qDoc: com.google.firebase.firestore.QueryDocumentSnapshot): firestore.QueryDocumentSnapshot {
2877-
return new firebase.DocumentSnapshot(qDoc);
2877+
return <any>new DocumentSnapshot(qDoc);
28782878
}
28792879

28802880
export class QuerySnapshot implements firestore.QuerySnapshot {
@@ -2893,7 +2893,7 @@ export class QuerySnapshot implements firestore.QuerySnapshot {
28932893
const docSnapshots: firestore.QueryDocumentSnapshot[] = [];
28942894
for (let i = 0; i < this.snapshot.size(); i++) {
28952895
const documentSnapshot: com.google.firebase.firestore.DocumentSnapshot = this.snapshot.getDocuments().get(i);
2896-
docSnapshots.push(new firebase.DocumentSnapshot(documentSnapshot));
2896+
docSnapshots.push(<any>new DocumentSnapshot(documentSnapshot));
28972897
}
28982898
this._docSnapshots = docSnapshots;
28992899

src/firebase.ios.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2387,7 +2387,7 @@ firebase.firestore.get = (collectionPath: string, options?: firestore.GetOptions
23872387
return firebase.firestore.getCollection(collectionPath, options);
23882388
};
23892389

2390-
firebase.firestore.getDocument = (collectionPath: string, documentPath: string, options?: firestore.GetOptions): Promise<firestore.DocumentSnapshot> => {
2390+
firebase.firestore.getDocument = (collectionPath: string, documentPath: string, options?: firestore.GetOptions): Promise<DocumentSnapshot> => {
23912391
ensureFirestore();
23922392
return new Promise((resolve, reject) => {
23932393
try {
@@ -2407,7 +2407,7 @@ firebase.firestore.getDocument = (collectionPath: string, documentPath: string,
24072407
if (error) {
24082408
reject(error.localizedDescription);
24092409
} else {
2410-
resolve(new firebase.firestore.DocumentSnapshot(snapshot));
2410+
resolve(new DocumentSnapshot(<any>snapshot));
24112411
}
24122412
});
24132413

@@ -2555,7 +2555,7 @@ function convertDocChangeType(type: FIRDocumentChangeType) {
25552555
}
25562556

25572557
function convertDocument(qDoc: FIRQueryDocumentSnapshot): firestore.QueryDocumentSnapshot {
2558-
return new firebase.firestore.DocumentSnapshot(qDoc);
2558+
return <any>new DocumentSnapshot(<any>qDoc);
25592559
}
25602560

25612561
export class QuerySnapshot implements firestore.QuerySnapshot {
@@ -2574,7 +2574,7 @@ export class QuerySnapshot implements firestore.QuerySnapshot {
25742574
const docSnapshots: firestore.QueryDocumentSnapshot[] = [];
25752575
for (let i = 0, l = this.snapshot.documents.count; i < l; i++) {
25762576
const document = this.snapshot.documents.objectAtIndex(i);
2577-
docSnapshots.push(new firebase.firestore.DocumentSnapshot(document));
2577+
docSnapshots.push(<any>new DocumentSnapshot(<any>document));
25782578
}
25792579
this._docSnapshots = docSnapshots;
25802580

0 commit comments

Comments
 (0)