Utilizing TypeScript and React Native with Firestore (without expo).
When attempting to import:
import { CollectionReference } from '@react-native-firebase/firestore'
An error is received:
The module "@react-native-firebase/firestore" does not have an exported member 'CollectionReference'. Did you intend to use 'import CollectionReference from "@react-native-firebase/firestore"' instead? ts(2614)
The module was installed using both yarn and npm install.
Below are relevant parts of the packages.json:
{
"dependencies": {
"@react-native-firebase/app": "^8.4.3",
"@react-native-firebase/auth": "^9.2.3",
"@react-native-firebase/dynamic-links": "^7.5.4",
"@react-native-firebase/firestore": "^7.8.2",
"@react-native-firebase/storage": "^7.4.3",
...
},
"devDependencies": {
"ts-node": "^8.10.2",
"typescript": "^3.9.7"
...
},
}
Although @firebase/firestore-types can still be used, it is specified as:
This package should not be directly used, and is meant to be used through the officially supported firebase package.
This is the web package and not intended for React Native Firebase.