Can't instantiate GeoFire in TS
Closed this issue · 0 comments
This piece of code:
var database = admin.database().ref()
.child('geoData');
var geoFireDB = new GeoFire.GeoFire(database)
Does not work.
Error:
Argument of type 'import("").admin.database.Reference' is not assignable to parameter of type 'import("").Reference'.
The types of 'push(...).endAt(...).isEqual' are incompatible between these types.
Type '(other: import("functions/node_modules/firebase-admin/lib/database").admin.database.Query | null) => boolean' is not assignable to type '(other: import("/cloudFunctions/functions/node_modules/@firebase/database-types/index").Query | null) => boolean'.
Types of parameters 'other' and 'other' are incompatible.
etc.
Here is what I have defined in package.json:
"firebase": "^7.24.0",
"firebase-admin": "^8.12.1",
"firebase-functions": "^3.11.0",
"geofire": "^5.0.1",
Any ideas?