Typescript errors in Analytics module.
$ tsc -p tsconfig.json
node_modules/@react-native-firebase/analytics/lib/index.d.ts:1350:3 - error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
1350 import { ReactNativeFirebase } from '@react-native-firebase/app';
~~~~~~
node_modules/@react-native-firebase/analytics/lib/index.d.ts:1351:3 - error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
1351 import ReactNativeFirebaseModule = ReactNativeFirebase.Module;
~~~~~~
node_modules/@react-native-firebase/analytics/lib/index.d.ts:1352:3 - error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
1352 import FirebaseModuleWithStatics = ReactNativeFirebase.FirebaseModuleWithStatics;
~~~~~~
node_modules/@react-native-firebase/analytics/lib/index.d.ts:1355:27 - error TS1254: A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.
1355 export const firebase = firebaseNamedExport;
~~~~~~~~~~~~~~~~~~~
node_modules/@react-native-firebase/analytics/lib/index.d.ts:1361:3 - error TS2666: Exports and export assignments are not permitted in module augmentations.
1361 export default defaultExport;
~~~~~~
node_modules/@react-native-firebase/analytics/lib/index.d.ts:1383:1 - error TS1046: Top-level declarations in .d.ts files must start with either a 'declare' or 'export' modifier.
1383 namespace ReactNativeFirebase {
~~~~~~~~~
node_modules/@react-native-firebase/app/lib/index.d.ts:395:3 - error TS2666: Exports and export assignments are not permitted in module augmentations.
395 export default module;
~~~~~~
Found 11 errors.
// tsconfig.json
{
"compilerOptions": {
"allowJs": true,
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"isolatedModules": true,
"jsx": "react",
"lib": ["es6"],
"moduleResolution": "node",
"noEmit": true,
// "strict": true,
"target": "esnext",
"baseUrl": "./src",
"module": "esnext",
"rootDir": "src",
"sourceMap": true,
"forceConsistentCasingInFileNames": true,
"noImplicitReturns": true,
"noImplicitThis": true,
"noImplicitAny": true,
"strictNullChecks": true,
"noUnusedLocals": true,
"suppressImplicitAnyIndexErrors": true,
"preserveConstEnums": true,
}
Issue
Typescript errors in Analytics module.
Project Files
iOS
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:6.0.1Firebasemodule(s) you're using that has the issue:AnalyticsTypeScript?Y3.6.4Think
react-native-firebaseis great? Please consider supporting all of the project maintainers and contributors by donating via our Open Collective where all contributors can submit expenses. [Learn More]React Native FirebaseandInvertaseon Twitter for updates on the library.