Incorrect firestore import throws Typescript error
Nostrus opened this issue · comments
Describe your environment
- Operating System version: MacOS
- Browser version: Chrome 86
- Firebase library:
firebase 8.0.0
- GeoFirestore version: 4.3.0
Describe the problem
After upgrading to latest geofire and firebase libraries, I get the following Typescript error:
ERROR in node_modules/geofirestore-core/dist/definitions.d.ts:2:10 - error TS2614:
Module '"../../firebase"' has no exported member 'firestore'.
Did you mean to use 'import firestore from "../../firebase"' instead?
2 import { firestore as webfirestore } from 'firebase/app';
Describe the bug
firestore is probably not imported correctly in the definition file.
same for me.
I fixed it manually by changing definitions.d.ts
file import to import firebase from 'firebase/app';
and replacing old usage with something similar to firebase.firestore.CollectionReference;
I created this PR to fix this issue. Hope it gets through.