@@ -8,8 +8,10 @@ import * as mlkit from "./mlkit";
88
99// note that this implementation is overridden for iOS
1010export class FieldValue {
11- constructor ( public type : firestore . FieldValueType , public value : any ) {
12- } ;
11+ constructor (
12+ public type : firestore . FieldValueType ,
13+ public value : any ,
14+ ) { }
1315
1416 static serverTimestamp = ( ) => "SERVER_TIMESTAMP" ;
1517 static arrayUnion = ( fields : Array < any > ) => new FieldValue ( "ARRAY_UNION" , fields ) ;
@@ -204,19 +206,16 @@ export const firebase: any = {
204206export abstract class DocumentSnapshot implements firestore . DocumentSnapshot {
205207 public data : ( ) => firestore . DocumentData ;
206208
207- constructor ( public id : string , public exists : boolean , documentData : firestore . DocumentData ) {
209+ constructor (
210+ public id : string ,
211+ public exists : boolean ,
212+ documentData : firestore . DocumentData ,
213+ public ref : firestore . DocumentReference ,
214+ ) {
208215 this . data = ( ) => exists ? documentData : undefined ;
209216 }
210217}
211218
212219export function isDocumentReference ( object : any ) : object is firestore . DocumentReference {
213220 return object && object . discriminator === "docRef" ;
214221}
215-
216- export class QuerySnapshot implements firestore . QuerySnapshot {
217- public docSnapshots : firestore . DocumentSnapshot [ ] ;
218-
219- forEach ( callback : ( result : firestore . DocumentSnapshot ) => void , thisArg ?: any ) : void {
220- this . docSnapshots . map ( snapshot => callback ( snapshot ) ) ;
221- }
222- }
0 commit comments