Issue
I just noticed I have some typescript errors in my project and some of them are related to firebase packages, so I thought to report them here. (I'm currently using app and message packages, so other packages may have similar issues.
(I should mention that the modules work fine and I have no problem with building my project, so this issue is not actually a bug report, just is a report for internal type checking errors)
\node_modules@react-native-firebase\app\lib\index.d.ts
Error:(396, 3) TS2666: Exports and export assignments are not permitted in module augmentations.
\node_modules@react-native-firebase\messaging\lib\index.d.ts
Error:(18, 10) TS2440: Import declaration conflicts with local declaration of 'ReactNativeFirebase'.
Error:(592, 41) TS1015: Parameter cannot have question mark and initializer.
Error:(592, 41) TS2371: A parameter initializer is only allowed in a function or constructor implementation.
Error:(607, 44) TS1015: Parameter cannot have question mark and initializer.
Error:(607, 44) TS2371: A parameter initializer is only allowed in a function or constructor implementation.
Error:(906, 5) TS7010: 'setBackgroundMessageHandler', which lacks return-type annotation, implicitly has an 'any' return type.
Error:(960, 3) TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
Error:(961, 3) TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
Error:(962, 3) TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
Error:(965, 27) TS1254: A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.
Error:(971, 3) TS2666: Exports and export assignments are not permitted in module augmentations.
Error:(993, 1) TS1046: Top-level declarations in .d.ts files must start with either a 'declare' or 'export' modifier.
Project Files
Javascript
Click To Expand
package.json:
"@react-native-firebase/app": "7.1.4",
"@react-native-firebase/messaging": "7.1.3",
firebase.json for react-native-firebase v6:
iOS
Click To Expand
ios/Podfile:
AppDelegate.m:
Android
Click To Expand
Have you converted to AndroidX?
android/build.gradle:
android/app/build.gradle:
android/settings.gradle:
MainApplication.java:
AndroidManifest.xml:
Environment
Click To Expand
react-native info output:
System:
OS: Windows 10 10.0.18363
CPU: (8) x64 Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz
Memory: 9.24 GB / 15.94 GB
Binaries:
Node: 12.3.1 - C:\Program Files\nodejs\node.EXE
Yarn: Not Found
npm: 6.14.5 - C:\Program Files\nodejs\npm.CMD
Watchman: 4.9.4 - C:\watchman\watchman.EXE
SDKs:
Android SDK: Not Found
IDEs:
Android Studio: Version 4.0.0.0 AI-193.6911.18.40.6514223
Languages:
Java: Not Found
Python: 2.7.16 - C:\Python27\python.EXE
npmPackages:
@react-native-community/cli: Not Found
react: 16.11.0 => 16.11.0
react-native: 0.62.2 => 0.62.2
npmGlobalPackages:
*react-native*: Not Found
- Platform that you're experiencing the issue on:
react-native-firebase version you're using that has this issue:
Firebase module(s) you're using that has the issue:
- Are you using
TypeScript?
Issue
I just noticed I have some typescript errors in my project and some of them are related to firebase packages, so I thought to report them here. (I'm currently using
appandmessagepackages, so other packages may have similar issues.(I should mention that the modules work fine and I have no problem with building my project, so this issue is not actually a bug report, just is a report for internal type checking errors)
\node_modules@react-native-firebase\app\lib\index.d.ts
\node_modules@react-native-firebase\messaging\lib\index.d.ts
Project Files
Javascript
Click To Expand
package.json:firebase.jsonfor react-native-firebase v6:# N/AiOS
Click To Expand
ios/Podfile:# N/AAppDelegate.m:// N/AAndroid
Click To Expand
Have you converted to AndroidX?
android/gradle.settingsjetifier=truefor Android compatibility?jetifierfor react-native compatibility?android/build.gradle:// N/Aandroid/app/build.gradle:// N/Aandroid/settings.gradle:// N/AMainApplication.java:// N/AAndroidManifest.xml:<!-- N/A -->Environment
Click To Expand
react-native infooutput:react-native-firebaseversion you're using that has this issue:7.1.4Firebasemodule(s) you're using that has the issue:appcloud messagingTypeScript?Y&3.9.3React Native FirebaseandInvertaseon Twitter for updates on the library.