File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ if (typeof window !== 'undefined') {
3232 try {
3333 connectFirestoreEmulator ( db , emulatorHost , parseInt ( emulatorPort ) ) ;
3434 console . log ( 'Connected to Firestore emulator' ) ;
35- } catch ( error ) {
35+ } catch {
3636 // Emulator already connected
3737 console . log ( 'Firestore emulator already connected' ) ;
3838 }
@@ -54,7 +54,7 @@ if (typeof window !== 'undefined') {
5454 try {
5555 connectStorageEmulator ( storage , emulatorHost , parseInt ( emulatorPort ) ) ;
5656 console . log ( 'Connected to Storage emulator' ) ;
57- } catch ( error ) {
57+ } catch {
5858 // Emulator already connected
5959 console . log ( 'Storage emulator already connected' ) ;
6060 }
Original file line number Diff line number Diff line change @@ -11,14 +11,9 @@ import {
1111 orderBy ,
1212 limit ,
1313 onSnapshot ,
14- DocumentData ,
15- QueryDocumentSnapshot ,
16- QuerySnapshot ,
17- DocumentSnapshot ,
18- CollectionReference ,
19- DocumentReference ,
2014 Query ,
21- Unsubscribe
15+ Unsubscribe ,
16+ WhereFilterOp
2217} from 'firebase/firestore' ;
2318import { db } from './firebase' ;
2419
@@ -98,7 +93,7 @@ export class FirestoreService {
9893 // Query documents with conditions
9994 static async query < T > (
10095 collectionName : string ,
101- conditions : Array < { field : string ; operator : any ; value : any } > ,
96+ conditions : Array < { field : string ; operator : WhereFilterOp ; value : unknown } > ,
10297 orderByField ?: string ,
10398 orderDirection ?: 'asc' | 'desc' ,
10499 limitCount ?: number
@@ -152,7 +147,7 @@ export class FirestoreService {
152147 static subscribeToCollection < T > (
153148 collectionName : string ,
154149 callback : ( data : T [ ] ) => void ,
155- conditions ?: Array < { field : string ; operator : any ; value : any } > ,
150+ conditions ?: Array < { field : string ; operator : WhereFilterOp ; value : unknown } > ,
156151 orderByField ?: string ,
157152 orderDirection ?: 'asc' | 'desc' ,
158153 limitCount ?: number
You can’t perform that action at this time.
0 commit comments