-
Notifications
You must be signed in to change notification settings - Fork 2.2k
🔥 TypeScript errors #2614
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Could you try 0.5.3 of the pre-release packages please? I think these were fixed? cc @iljadaderko |
Tried both
(These are the errors for |
@Salakar No, this is new to me as well. Will need to take another look. At first glance it looks like ts is highlighting "semantic" errors i.e. no imports in declarations etc... |
Weird, not sure why it doesn't show up in any of our typescript tests or validations though 🤔 |
Just tried locally, all seems to be passing now with latest updates. |
I get similar errors somehow on 6.0.3 but it's hard to say why (I checked on both 3.6.4 and 3.5.3 TS versions). I get this both on a local machine and on CI so it's not any kind of cache.
my tsConfig:
|
Also tracking in #2732 - have confirmed it's an issue on all modules. Unfortunately the fix requires a substantial change to all the type definitions so tracking this for 6.1.0. Frustratingly it didn't show up on any of our tests before we released v6 because of a single |
this happened to me after migrating from v5 - v6. i just added this line to tsconfig.json to please my pipelines but i dont think that this is an actual fix |
Hello 👋, to help manage issues we automatically close stale issues.
|
This is still a problem for me, even after upgrading to
This is the
Running TypeScript |
Yeah apologies, we still need to get around to fixing these. It was a derp on our end during development and we didn't have these issues flagging 😭 |
No need to apologize. I wasn’t trying to exert pressure or anything, just fending off the stale bot :D If you need more details to investigate this let me know. |
Hello 👋, to help manage issues we automatically close stale issues.
|
@Stale Don't close this just yet |
having same issue with
|
Hello 👋, to help manage issues we automatically close stale issues.
|
still valid. 6.3.0 |
GIven the frequent staleness, anyone have a PR? That would help move it along |
Hello 👋, to help manage issues we automatically close stale issues.
|
it's still valid |
Hello 👋, to help manage issues we automatically close stale issues.
|
Hello 👋, to help manage issues we automatically close stale issues.
|
Still issue to me for @react-native-firebase/dynamic-links |
This clearly needs some community help as it's sat stale for a while. We would welcome any PRs that addressed the errors/warnings seen |
Yes please 🙏 PRs would be welcome |
We happily accept types PRs #3810 is an example |
Why does this issue have Specifically, as of this comment, these packages/versions:
|
Because it was originally logged when v5 and v6 were co-existing. It's a historical context, nothing semantically useful anymore |
The entire list of type declaration conflicts can be seen by making these changes to the monrepo's
Removing Here's the full list of type conflicts between the packages in this monorepo (as of commit 55cd752)yarn run v1.22.4
$ tsc --project .
packages/admob/lib/index.d.ts:18:10 - error TS2440: Import declaration conflicts with local declaration of 'ReactNativeFirebase'.
18 import { ReactNativeFirebase } from '@react-native-firebase/app';
~~~~~~~~~~~~~~~~~~~
packages/admob/lib/index.d.ts:401:11 - error TS2713: Cannot access 'AdsConsentDebugGeography.DISABLED' because 'AdsConsentDebugGeography' is a type, but not a namespace. Did you mean to retrieve the type of the property 'DISABLED' in 'AdsConsentDebugGeography' with 'AdsConsentDebugGeography["DISABLED"]'?
401 | AdsConsentDebugGeography.DISABLED
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
packages/admob/lib/index.d.ts:402:11 - error TS2713: Cannot access 'AdsConsentDebugGeography.EEA' because 'AdsConsentDebugGeography' is a type, but not a namespace. Did you mean to retrieve the type of the property 'EEA' in 'AdsConsentDebugGeography' with 'AdsConsentDebugGeography["EEA"]'?
402 | AdsConsentDebugGeography.EEA
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
packages/admob/lib/index.d.ts:403:11 - error TS2713: Cannot access 'AdsConsentDebugGeography.NOT_EEA' because 'AdsConsentDebugGeography' is a type, but not a namespace. Did you mean to retrieve the type of the property 'NOT_EEA' in 'AdsConsentDebugGeography' with 'AdsConsentDebugGeography["NOT_EEA"]'?
403 | AdsConsentDebugGeography.NOT_EEA,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
packages/admob/lib/index.d.ts:427:11 - error TS2713: Cannot access 'AdsConsentStatus.UNKNOWN' because 'AdsConsentStatus' is a type, but not a namespace. Did you mean to retrieve the type of the property 'UNKNOWN' in 'AdsConsentStatus' with 'AdsConsentStatus["UNKNOWN"]'?
427 | AdsConsentStatus.UNKNOWN
~~~~~~~~~~~~~~~~~~~~~~~~
packages/admob/lib/index.d.ts:428:11 - error TS2713: Cannot access 'AdsConsentStatus.NON_PERSONALIZED' because 'AdsConsentStatus' is a type, but not a namespace. Did you mean to retrieve the type of the property 'NON_PERSONALIZED' in 'AdsConsentStatus' with 'AdsConsentStatus["NON_PERSONALIZED"]'?
428 | AdsConsentStatus.NON_PERSONALIZED
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
packages/admob/lib/index.d.ts:429:11 - error TS2713: Cannot access 'AdsConsentStatus.PERSONALIZED' because 'AdsConsentStatus' is a type, but not a namespace. Did you mean to retrieve the type of the property 'PERSONALIZED' in 'AdsConsentStatus' with 'AdsConsentStatus["PERSONALIZED"]'?
429 | AdsConsentStatus.PERSONALIZED,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
packages/admob/lib/index.d.ts:446:7 - error TS2713: Cannot access 'AdsConsentStatus.UNKNOWN' because 'AdsConsentStatus' is a type, but not a namespace. Did you mean to retrieve the type of the property 'UNKNOWN' in 'AdsConsentStatus' with 'AdsConsentStatus["UNKNOWN"]'?
446 AdsConsentStatus.UNKNOWN | AdsConsentStatus.NON_PERSONALIZED | AdsConsentStatus.PERSONALIZED
~~~~~~~~~~~~~~~~~~~~~~~~
packages/admob/lib/index.d.ts:446:34 - error TS2713: Cannot access 'AdsConsentStatus.NON_PERSONALIZED' because 'AdsConsentStatus' is a type, but not a namespace. Did you mean to retrieve the type of the property 'NON_PERSONALIZED' in 'AdsConsentStatus' with 'AdsConsentStatus["NON_PERSONALIZED"]'?
446 AdsConsentStatus.UNKNOWN | AdsConsentStatus.NON_PERSONALIZED | AdsConsentStatus.PERSONALIZED
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
packages/admob/lib/index.d.ts:446:70 - error TS2713: Cannot access 'AdsConsentStatus.PERSONALIZED' because 'AdsConsentStatus' is a type, but not a namespace. Did you mean to retrieve the type of the property 'PERSONALIZED' in 'AdsConsentStatus' with 'AdsConsentStatus["PERSONALIZED"]'?
446 AdsConsentStatus.UNKNOWN | AdsConsentStatus.NON_PERSONALIZED | AdsConsentStatus.PERSONALIZED
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
packages/admob/lib/index.d.ts:540:9 - error TS2713: Cannot access 'AdsConsentStatus.UNKNOWN' because 'AdsConsentStatus' is a type, but not a namespace. Did you mean to retrieve the type of the property 'UNKNOWN' in 'AdsConsentStatus' with 'AdsConsentStatus["UNKNOWN"]'?
540 | AdsConsentStatus.UNKNOWN
~~~~~~~~~~~~~~~~~~~~~~~~
packages/admob/lib/index.d.ts:541:9 - error TS2713: Cannot access 'AdsConsentStatus.NON_PERSONALIZED' because 'AdsConsentStatus' is a type, but not a namespace. Did you mean to retrieve the type of the property 'NON_PERSONALIZED' in 'AdsConsentStatus' with 'AdsConsentStatus["NON_PERSONALIZED"]'?
541 | AdsConsentStatus.NON_PERSONALIZED
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
packages/admob/lib/index.d.ts:542:9 - error TS2713: Cannot access 'AdsConsentStatus.PERSONALIZED' because 'AdsConsentStatus' is a type, but not a namespace. Did you mean to retrieve the type of the property 'PERSONALIZED' in 'AdsConsentStatus' with 'AdsConsentStatus["PERSONALIZED"]'?
542 | AdsConsentStatus.PERSONALIZED;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
packages/admob/lib/index.d.ts:562:9 - error TS2713: Cannot access 'AdsConsentStatus.UNKNOWN' because 'AdsConsentStatus' is a type, but not a namespace. Did you mean to retrieve the type of the property 'UNKNOWN' in 'AdsConsentStatus' with 'AdsConsentStatus["UNKNOWN"]'?
562 | AdsConsentStatus.UNKNOWN
~~~~~~~~~~~~~~~~~~~~~~~~
packages/admob/lib/index.d.ts:563:9 - error TS2713: Cannot access 'AdsConsentStatus.NON_PERSONALIZED' because 'AdsConsentStatus' is a type, but not a namespace. Did you mean to retrieve the type of the property 'NON_PERSONALIZED' in 'AdsConsentStatus' with 'AdsConsentStatus["NON_PERSONALIZED"]'?
563 | AdsConsentStatus.NON_PERSONALIZED
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
packages/admob/lib/index.d.ts:564:9 - error TS2713: Cannot access 'AdsConsentStatus.PERSONALIZED' because 'AdsConsentStatus' is a type, but not a namespace. Did you mean to retrieve the type of the property 'PERSONALIZED' in 'AdsConsentStatus' with 'AdsConsentStatus["PERSONALIZED"]'?
564 | AdsConsentStatus.PERSONALIZED;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
packages/admob/lib/index.d.ts:771:9 - error TS2713: Cannot access 'MaxAdContentRating.G' because 'MaxAdContentRating' is a type, but not a namespace. Did you mean to retrieve the type of the property 'G' in 'MaxAdContentRating' with 'MaxAdContentRating["G"]'?
771 | MaxAdContentRating.G
~~~~~~~~~~~~~~~~~~~~
packages/admob/lib/index.d.ts:772:9 - error TS2713: Cannot access 'MaxAdContentRating.PG' because 'MaxAdContentRating' is a type, but not a namespace. Did you mean to retrieve the type of the property 'PG' in 'MaxAdContentRating' with 'MaxAdContentRating["PG"]'?
772 | MaxAdContentRating.PG
~~~~~~~~~~~~~~~~~~~~~
packages/admob/lib/index.d.ts:773:9 - error TS2713: Cannot access 'MaxAdContentRating.T' because 'MaxAdContentRating' is a type, but not a namespace. Did you mean to retrieve the type of the property 'T' in 'MaxAdContentRating' with 'MaxAdContentRating["T"]'?
773 | MaxAdContentRating.T
~~~~~~~~~~~~~~~~~~~~
packages/admob/lib/index.d.ts:774:9 - error TS2713: Cannot access 'MaxAdContentRating.MA' because 'MaxAdContentRating' is a type, but not a namespace. Did you mean to retrieve the type of the property 'MA' in 'MaxAdContentRating' with 'MaxAdContentRating["MA"]'?
774 | MaxAdContentRating.MA;
~~~~~~~~~~~~~~~~~~~~~
packages/admob/lib/index.d.ts:846:9 - error TS2713: Cannot access 'AdEventType.LOADED' because 'AdEventType' is a type, but not a namespace. Did you mean to retrieve the type of the property 'LOADED' in 'AdEventType' with 'AdEventType["LOADED"]'?
846 | AdEventType.LOADED
~~~~~~~~~~~~~~~~~~
packages/admob/lib/index.d.ts:847:9 - error TS2713: Cannot access 'AdEventType.ERROR' because 'AdEventType' is a type, but not a namespace. Did you mean to retrieve the type of the property 'ERROR' in 'AdEventType' with 'AdEventType["ERROR"]'?
847 | AdEventType.ERROR
~~~~~~~~~~~~~~~~~
packages/admob/lib/index.d.ts:848:9 - error TS2713: Cannot access 'AdEventType.OPENED' because 'AdEventType' is a type, but not a namespace. Did you mean to retrieve the type of the property 'OPENED' in 'AdEventType' with 'AdEventType["OPENED"]'?
848 | AdEventType.OPENED
~~~~~~~~~~~~~~~~~~
packages/admob/lib/index.d.ts:849:9 - error TS2713: Cannot access 'AdEventType.CLICKED' because 'AdEventType' is a type, but not a namespace. Did you mean to retrieve the type of the property 'CLICKED' in 'AdEventType' with 'AdEventType["CLICKED"]'?
849 | AdEventType.CLICKED
~~~~~~~~~~~~~~~~~~~
packages/admob/lib/index.d.ts:850:9 - error TS2713: Cannot access 'AdEventType.LEFT_APPLICATION' because 'AdEventType' is a type, but not a namespace. Did you mean to retrieve the type of the property 'LEFT_APPLICATION' in 'AdEventType' with 'AdEventType["LEFT_APPLICATION"]'?
850 | AdEventType.LEFT_APPLICATION
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
packages/admob/lib/index.d.ts:851:9 - error TS2713: Cannot access 'AdEventType.CLOSED' because 'AdEventType' is a type, but not a namespace. Did you mean to retrieve the type of the property 'CLOSED' in 'AdEventType' with 'AdEventType["CLOSED"]'?
851 | AdEventType.CLOSED
~~~~~~~~~~~~~~~~~~
packages/admob/lib/index.d.ts:852:9 - error TS2713: Cannot access 'RewardedAdEventType.LOADED' because 'RewardedAdEventType' is a type, but not a namespace. Did you mean to retrieve the type of the property 'LOADED' in 'RewardedAdEventType' with 'RewardedAdEventType["LOADED"]'?
852 | RewardedAdEventType.LOADED
~~~~~~~~~~~~~~~~~~~~~~~~~~
packages/admob/lib/index.d.ts:853:9 - error TS2713: Cannot access 'RewardedAdEventType.EARNED_REWARD' because 'RewardedAdEventType' is a type, but not a namespace. Did you mean to retrieve the type of the property 'EARNED_REWARD' in 'RewardedAdEventType' with 'RewardedAdEventType["EARNED_REWARD"]'?
853 | RewardedAdEventType.EARNED_REWARD,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
packages/admob/lib/index.d.ts:1185:3 - error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
1185 import { ReactNativeFirebase } from '@react-native-firebase/app';
~~~~~~
packages/admob/lib/index.d.ts:1186:3 - error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
1186 import React from 'react';
~~~~~~
packages/admob/lib/index.d.ts:1186:21 - error TS2307: Cannot find module 'react' or its corresponding type declarations.
1186 import React from 'react';
~~~~~~~
packages/admob/lib/index.d.ts:1187:3 - error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
1187 import ReactNativeFirebaseModule = ReactNativeFirebase.Module;
~~~~~~
packages/admob/lib/index.d.ts:1188:3 - error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
1188 import FirebaseModuleWithStaticsAndApp = ReactNativeFirebase.FirebaseModuleWithStaticsAndApp;
~~~~~~
packages/admob/lib/index.d.ts:1189:3 - error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
1189 import BannerAd = FirebaseAdMobTypes.BannerAd;
~~~~~~
packages/admob/lib/index.d.ts:1192:27 - error TS1254: A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.
1192 export const firebase = firebaseNamedExport;
~~~~~~~~~~~~~~~~~~~
packages/admob/lib/index.d.ts:1210:3 - error TS2666: Exports and export assignments are not permitted in module augmentations.
1210 export default defaultExport;
~~~~~~
packages/admob/lib/index.d.ts:1230:1 - error TS1046: Top-level declarations in .d.ts files must start with either a 'declare' or 'export' modifier.
1230 namespace ReactNativeFirebase {
~~~~~~~~~
packages/analytics/lib/index.d.ts:18:10 - error TS2440: Import declaration conflicts with local declaration of 'ReactNativeFirebase'.
18 import { ReactNativeFirebase } from '@react-native-firebase/app';
~~~~~~~~~~~~~~~~~~~
packages/analytics/lib/index.d.ts:1265:34 - error TS2304: Cannot find name 'SetCheckoutOptionEventParameters'.
1265 logSetCheckoutOption(params: SetCheckoutOptionEventParameters): Promise<void>;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
packages/analytics/lib/index.d.ts:1485:3 - error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
1485 import { ReactNativeFirebase } from '@react-native-firebase/app';
~~~~~~
packages/analytics/lib/index.d.ts:1486:3 - error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
1486 import ReactNativeFirebaseModule = ReactNativeFirebase.Module;
~~~~~~
packages/analytics/lib/index.d.ts:1487:3 - error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
1487 import FirebaseModuleWithStatics = ReactNativeFirebase.FirebaseModuleWithStatics;
~~~~~~
packages/analytics/lib/index.d.ts:1490:27 - error TS1254: A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.
1490 export const firebase = firebaseNamedExport;
~~~~~~~~~~~~~~~~~~~
packages/analytics/lib/index.d.ts:1496:3 - error TS2666: Exports and export assignments are not permitted in module augmentations.
1496 export default defaultExport;
~~~~~~
packages/analytics/lib/index.d.ts:1518:1 - error TS1046: Top-level declarations in .d.ts files must start with either a 'declare' or 'export' modifier.
1518 namespace ReactNativeFirebase {
~~~~~~~~~
packages/app/lib/index.d.ts:549:3 - error TS2666: Exports and export assignments are not permitted in module augmentations.
549 export default module;
~~~~~~
packages/auth/lib/index.d.ts:1639:3 - error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
1639 import { ReactNativeFirebase } from '@react-native-firebase/app';
~~~~~~
packages/auth/lib/index.d.ts:1640:3 - error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
1640 import ReactNativeFirebaseModule = ReactNativeFirebase.Module;
~~~~~~
packages/auth/lib/index.d.ts:1641:3 - error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
1641 import FirebaseModuleWithStaticsAndApp = ReactNativeFirebase.FirebaseModuleWithStaticsAndApp;
~~~~~~
packages/auth/lib/index.d.ts:1644:27 - error TS1254: A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.
1644 export const firebase = firebaseNamedExport;
~~~~~~~~~~~~~~~~~~~
packages/auth/lib/index.d.ts:1650:3 - error TS2666: Exports and export assignments are not permitted in module augmentations.
1650 export default defaultExport;
~~~~~~
packages/crashlytics/lib/index.d.ts:18:10 - error TS2440: Import declaration conflicts with local declaration of 'ReactNativeFirebase'.
18 import { ReactNativeFirebase } from '@react-native-firebase/app';
~~~~~~~~~~~~~~~~~~~
packages/crashlytics/lib/index.d.ts:254:3 - error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
254 import { ReactNativeFirebase } from '@react-native-firebase/app';
~~~~~~
packages/crashlytics/lib/index.d.ts:255:3 - error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
255 import ReactNativeFirebaseModule = ReactNativeFirebase.Module;
~~~~~~
packages/crashlytics/lib/index.d.ts:256:3 - error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
256 import FirebaseModuleWithStatics = ReactNativeFirebase.FirebaseModuleWithStatics;
~~~~~~
packages/crashlytics/lib/index.d.ts:259:27 - error TS1254: A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.
259 export const firebase = firebaseNamedExport;
~~~~~~~~~~~~~~~~~~~
packages/crashlytics/lib/index.d.ts:265:3 - error TS2666: Exports and export assignments are not permitted in module augmentations.
265 export default defaultExport;
~~~~~~
packages/crashlytics/lib/index.d.ts:286:1 - error TS1046: Top-level declarations in .d.ts files must start with either a 'declare' or 'export' modifier.
286 namespace ReactNativeFirebase {
~~~~~~~~~
packages/database/lib/index.d.ts:18:10 - error TS2440: Import declaration conflicts with local declaration of 'ReactNativeFirebase'.
18 import { ReactNativeFirebase } from '@react-native-firebase/app';
~~~~~~~~~~~~~~~~~~~
packages/database/lib/index.d.ts:267:37 - error TS2304: Cannot find name 'value'.
267 update(values: { [key: string]: value }, onComplete?: Function): Promise<void>;
~~~~~
packages/database/lib/index.d.ts:918:37 - error TS2304: Cannot find name 'value'.
918 update(values: { [key: string]: value }, onComplete?: Function): Promise<void>;
~~~~~
packages/database/lib/index.d.ts:1253:3 - error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
1253 import { ReactNativeFirebase } from '@react-native-firebase/app';
~~~~~~
packages/database/lib/index.d.ts:1254:3 - error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
1254 import ReactNativeFirebaseModule = ReactNativeFirebase.Module;
~~~~~~
packages/database/lib/index.d.ts:1255:3 - error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
1255 import FirebaseModuleWithStaticsAndApp = ReactNativeFirebase.FirebaseModuleWithStaticsAndApp;
~~~~~~
packages/database/lib/index.d.ts:1258:27 - error TS1254: A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.
1258 export const firebase = firebaseNamedExport;
~~~~~~~~~~~~~~~~~~~
packages/database/lib/index.d.ts:1264:3 - error TS2666: Exports and export assignments are not permitted in module augmentations.
1264 export default defaultExport;
~~~~~~
packages/database/lib/index.d.ts:1286:1 - error TS1046: Top-level declarations in .d.ts files must start with either a 'declare' or 'export' modifier.
1286 namespace ReactNativeFirebase {
~~~~~~~~~
packages/dynamic-links/lib/index.d.ts:543:22 - error TS2315: Type 'Function' is not generic.
543 onLink(listener: Function<DynamicLink>): Function;
~~~~~~~~~~~~~~~~~~~~~
packages/dynamic-links/lib/index.d.ts:571:3 - error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
571 import { ReactNativeFirebase } from '@react-native-firebase/app';
~~~~~~
packages/dynamic-links/lib/index.d.ts:572:3 - error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
572 import ReactNativeFirebaseModule = ReactNativeFirebase.Module;
~~~~~~
packages/dynamic-links/lib/index.d.ts:573:3 - error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
573 import FirebaseModuleWithStatics = ReactNativeFirebase.FirebaseModuleWithStatics;
~~~~~~
packages/dynamic-links/lib/index.d.ts:576:27 - error TS1254: A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.
576 export const firebase = firebaseNamedExport;
~~~~~~~~~~~~~~~~~~~
packages/dynamic-links/lib/index.d.ts:582:3 - error TS2666: Exports and export assignments are not permitted in module augmentations.
582 export default defaultExport;
~~~~~~
packages/firestore/lib/index.d.ts:1965:66 - error TS2314: Generic type 'Promise<T>' requires 1 type argument(s).
1965 runTransaction(updateFunction: (transaction: Transaction) => Promise): Promise<any>;
~~~~~~~
packages/firestore/lib/index.d.ts:2028:3 - error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
2028 import { ReactNativeFirebase } from '@react-native-firebase/app';
~~~~~~
packages/firestore/lib/index.d.ts:2029:3 - error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
2029 import ReactNativeFirebaseModule = ReactNativeFirebase.Module;
~~~~~~
packages/firestore/lib/index.d.ts:2030:3 - error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
2030 import FirebaseModuleWithStaticsAndApp = ReactNativeFirebase.FirebaseModuleWithStaticsAndApp;
~~~~~~
packages/firestore/lib/index.d.ts:2033:27 - error TS1254: A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.
2033 export const firebase = firebaseNamedExport;
~~~~~~~~~~~~~~~~~~~
packages/firestore/lib/index.d.ts:2039:3 - error TS2666: Exports and export assignments are not permitted in module augmentations.
2039 export default defaultExport;
~~~~~~
packages/functions/lib/index.d.ts:364:3 - error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
364 import { ReactNativeFirebase } from '@react-native-firebase/app';
~~~~~~
packages/functions/lib/index.d.ts:365:3 - error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
365 import ReactNativeFirebaseModule = ReactNativeFirebase.Module;
~~~~~~
packages/functions/lib/index.d.ts:366:3 - error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
366 import FirebaseModuleWithStaticsAndApp = ReactNativeFirebase.FirebaseModuleWithStaticsAndApp;
~~~~~~
packages/functions/lib/index.d.ts:369:27 - error TS1254: A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.
369 export const firebase = firebaseNamedExport;
~~~~~~~~~~~~~~~~~~~
packages/functions/lib/index.d.ts:375:3 - error TS2666: Exports and export assignments are not permitted in module augmentations.
375 export default defaultExport;
~~~~~~
packages/iid/lib/index.d.ts:136:3 - error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
136 import { ReactNativeFirebase } from '@react-native-firebase/app';
~~~~~~
packages/iid/lib/index.d.ts:137:3 - error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
137 import ReactNativeFirebaseModule = ReactNativeFirebase.Module;
~~~~~~
packages/iid/lib/index.d.ts:138:3 - error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
138 import FirebaseModuleWithStaticsAndApp = ReactNativeFirebase.FirebaseModuleWithStaticsAndApp;
~~~~~~
packages/iid/lib/index.d.ts:141:27 - error TS1254: A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.
141 export const firebase = firebaseNamedExport;
~~~~~~~~~~~~~~~~~~~
packages/iid/lib/index.d.ts:147:3 - error TS2666: Exports and export assignments are not permitted in module augmentations.
147 export default defaultExport;
~~~~~~
packages/in-app-messaging/lib/index.d.ts:18:10 - error TS2440: Import declaration conflicts with local declaration of 'ReactNativeFirebase'.
18 import { ReactNativeFirebase } from '@react-native-firebase/app';
~~~~~~~~~~~~~~~~~~~
packages/in-app-messaging/lib/index.d.ts:152:3 - error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
152 import { ReactNativeFirebase } from '@react-native-firebase/app';
~~~~~~
packages/in-app-messaging/lib/index.d.ts:153:3 - error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
153 import ReactNativeFirebaseModule = ReactNativeFirebase.Module;
~~~~~~
packages/in-app-messaging/lib/index.d.ts:154:3 - error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
154 import FirebaseModuleWithStatics = ReactNativeFirebase.FirebaseModuleWithStatics;
~~~~~~
packages/in-app-messaging/lib/index.d.ts:157:27 - error TS1254: A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.
157 export const firebase = firebaseNamedExport;
~~~~~~~~~~~~~~~~~~~
packages/in-app-messaging/lib/index.d.ts:163:3 - error TS2666: Exports and export assignments are not permitted in module augmentations.
163 export default module;
~~~~~~
packages/in-app-messaging/lib/index.d.ts:185:1 - error TS1046: Top-level declarations in .d.ts files must start with either a 'declare' or 'export' modifier.
185 namespace ReactNativeFirebase {
~~~~~~~~~
packages/messaging/lib/index.d.ts:18:10 - error TS2440: Import declaration conflicts with local declaration of 'ReactNativeFirebase'.
18 import { ReactNativeFirebase } from '@react-native-firebase/app';
~~~~~~~~~~~~~~~~~~~
packages/messaging/lib/index.d.ts:611:41 - error TS1015: Parameter cannot have question mark and initializer.
611 getToken(authorizedEntity?: string, scope?: string = 'FCM'): Promise<string>;
~~~~~
packages/messaging/lib/index.d.ts:611:41 - error TS2371: A parameter initializer is only allowed in a function or constructor implementation.
611 getToken(authorizedEntity?: string, scope?: string = 'FCM'): Promise<string>;
~~~~~~~~~~~~~~~~~~~~~~
packages/messaging/lib/index.d.ts:626:44 - error TS1015: Parameter cannot have question mark and initializer.
626 deleteToken(authorizedEntity?: string, scope?: string = 'FCM'): Promise<void>;
~~~~~
packages/messaging/lib/index.d.ts:626:44 - error TS2371: A parameter initializer is only allowed in a function or constructor implementation.
626 deleteToken(authorizedEntity?: string, scope?: string = 'FCM'): Promise<void>;
~~~~~~~~~~~~~~~~~~~~~~
packages/messaging/lib/index.d.ts:900:5 - error TS7010: 'setBackgroundMessageHandler', which lacks return-type annotation, implicitly has an 'any' return type.
900 setBackgroundMessageHandler(handler: (message: RemoteMessage) => Promise<any>);
~~~~~~~~~~~~~~~~~~~~~~~~~~~
packages/messaging/lib/index.d.ts:954:3 - error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
954 import { ReactNativeFirebase } from '@react-native-firebase/app';
~~~~~~
packages/messaging/lib/index.d.ts:955:3 - error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
955 import ReactNativeFirebaseModule = ReactNativeFirebase.Module;
~~~~~~
packages/messaging/lib/index.d.ts:956:3 - error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
956 import FirebaseModuleWithStatics = ReactNativeFirebase.FirebaseModuleWithStatics;
~~~~~~
packages/messaging/lib/index.d.ts:959:27 - error TS1254: A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.
959 export const firebase = firebaseNamedExport;
~~~~~~~~~~~~~~~~~~~
packages/messaging/lib/index.d.ts:965:3 - error TS2666: Exports and export assignments are not permitted in module augmentations.
965 export default defaultExport;
~~~~~~
packages/messaging/lib/index.d.ts:987:1 - error TS1046: Top-level declarations in .d.ts files must start with either a 'declare' or 'export' modifier.
987 namespace ReactNativeFirebase {
~~~~~~~~~
packages/ml-natural-language/lib/index.d.ts:18:10 - error TS2440: Import declaration conflicts with local declaration of 'ReactNativeFirebase'.
18 import { ReactNativeFirebase } from '@react-native-firebase/app';
~~~~~~~~~~~~~~~~~~~
packages/ml-natural-language/lib/index.d.ts:229:3 - error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
229 import { ReactNativeFirebase } from '@react-native-firebase/app';
~~~~~~
packages/ml-natural-language/lib/index.d.ts:230:3 - error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
230 import ReactNativeFirebaseModule = ReactNativeFirebase.Module;
~~~~~~
packages/ml-natural-language/lib/index.d.ts:231:3 - error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
231 import FirebaseModuleWithStaticsAndApp = ReactNativeFirebase.FirebaseModuleWithStaticsAndApp;
~~~~~~
packages/ml-natural-language/lib/index.d.ts:234:27 - error TS1254: A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.
234 export const firebase = firebaseNamedExport;
~~~~~~~~~~~~~~~~~~~
packages/ml-natural-language/lib/index.d.ts:240:3 - error TS2666: Exports and export assignments are not permitted in module augmentations.
240 export default defaultExport;
~~~~~~
packages/ml-natural-language/lib/index.d.ts:263:1 - error TS1046: Top-level declarations in .d.ts files must start with either a 'declare' or 'export' modifier.
263 namespace ReactNativeFirebase {
~~~~~~~~~
packages/ml-vision/lib/BarcodeDetectorTypes.d.ts:52:18 - error TS2304: Cannot find name 'VisionRectangle'.
52 boundingBox: VisionRectangle;
~~~~~~~~~~~~~~~
packages/ml-vision/lib/BarcodeDetectorTypes.d.ts:57:19 - error TS2304: Cannot find name 'VisionPoint'.
57 cornerPoints: VisionPoint[];
~~~~~~~~~~~
packages/ml-vision/lib/BarcodeDetectorTypes.d.ts:181:16 - error TS2304: Cannot find name 'VisionGeoPoint'.
181 geoPoint?: VisionGeoPoint;
~~~~~~~~~~~~~~
packages/ml-vision/lib/index.d.ts:18:10 - error TS2440: Import declaration conflicts with local declaration of 'ReactNativeFirebase'.
18 import { ReactNativeFirebase } from '@react-native-firebase/app';
~~~~~~~~~~~~~~~~~~~
packages/ml-vision/lib/index.d.ts:674:20 - error TS2430: Interface 'VisionDocumentText' incorrectly extends interface 'VisionText'.
Types of property 'blocks' are incompatible.
Type 'VisionDocumentTextBlock[]' is not assignable to type 'VisionTextBlock[]'.
Type 'VisionDocumentTextBlock' is missing the following properties from type 'VisionTextBlock': lines, cornerPoints
674 export interface VisionDocumentText extends VisionText {
~~~~~~~~~~~~~~~~~~
packages/ml-vision/lib/index.d.ts:1173:32 - error TS2304: Cannot find name 'VisionBarcodeDetectorOptions'.
1173 barcodeDetectorOptions?: VisionBarcodeDetectorOptions,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
packages/ml-vision/lib/index.d.ts:1174:16 - error TS2304: Cannot find name 'VisionBarcode'.
1174 ): Promise<VisionBarcode[]>;
~~~~~~~~~~~~~
packages/ml-vision/lib/index.d.ts:1180:3 - error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
1180 import { ReactNativeFirebase } from '@react-native-firebase/app';
~~~~~~
packages/ml-vision/lib/index.d.ts:1181:3 - error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
1181 import ReactNativeFirebaseModule = ReactNativeFirebase.Module;
~~~~~~
packages/ml-vision/lib/index.d.ts:1182:3 - error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
1182 import FirebaseModuleWithStaticsAndApp = ReactNativeFirebase.FirebaseModuleWithStaticsAndApp;
~~~~~~
packages/ml-vision/lib/index.d.ts:1185:27 - error TS1254: A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.
1185 export const firebase = firebaseNamedExport;
~~~~~~~~~~~~~~~~~~~
packages/ml-vision/lib/index.d.ts:1187:69 - error TS2339: Property 'VisionBarcodeFormat' does not exist on type 'typeof FirebaseVisionTypes'.
1187 export const VisionBarcodeFormat: {} & typeof FirebaseVisionTypes.VisionBarcodeFormat;
~~~~~~~~~~~~~~~~~~~
packages/ml-vision/lib/index.d.ts:1190:72 - error TS2339: Property 'VisionBarcodeValueType' does not exist on type 'typeof FirebaseVisionTypes'.
1190 export const VisionBarcodeValueType: {} & typeof FirebaseVisionTypes.VisionBarcodeValueType;
~~~~~~~~~~~~~~~~~~~~~~
packages/ml-vision/lib/index.d.ts:1191:72 - error TS2339: Property 'VisionBarcodeEmailType' does not exist on type 'typeof FirebaseVisionTypes'.
1191 export const VisionBarcodeEmailType: {} & typeof FirebaseVisionTypes.VisionBarcodeEmailType;
~~~~~~~~~~~~~~~~~~~~~~
packages/ml-vision/lib/index.d.ts:1192:72 - error TS2339: Property 'VisionBarcodePhoneType' does not exist on type 'typeof FirebaseVisionTypes'.
1192 export const VisionBarcodePhoneType: {} & typeof FirebaseVisionTypes.VisionBarcodePhoneType;
~~~~~~~~~~~~~~~~~~~~~~
packages/ml-vision/lib/index.d.ts:1193:74 - error TS2339: Property 'VisionBarcodeAddressType' does not exist on type 'typeof FirebaseVisionTypes'.
1193 export const VisionBarcodeAddressType: {} & typeof FirebaseVisionTypes.VisionBarcodeAddressType;
~~~~~~~~~~~~~~~~~~~~~~~~
packages/ml-vision/lib/index.d.ts:1196:74 - error TS2694: Namespace '"/Users/Matt/Development/react-native-firebase/packages/ml-vision/lib/index".FirebaseVisionTypes' has no exported member 'VisionBarcodeWifiEncryptionType'.
1196 export const VisionBarcodeWifiEncryptionType: {} & FirebaseVisionTypes.VisionBarcodeWifiEncryptionType;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
packages/ml-vision/lib/index.d.ts:1207:3 - error TS2666: Exports and export assignments are not permitted in module augmentations.
1207 export default defaultExport;
~~~~~~
packages/ml-vision/lib/index.d.ts:1229:1 - error TS1046: Top-level declarations in .d.ts files must start with either a 'declare' or 'export' modifier.
1229 namespace ReactNativeFirebase {
~~~~~~~~~
packages/perf/lib/index.d.ts:18:10 - error TS2440: Import declaration conflicts with local declaration of 'ReactNativeFirebase'.
18 import { ReactNativeFirebase } from '@react-native-firebase/app';
~~~~~~~~~~~~~~~~~~~
packages/perf/lib/index.d.ts:112:5 - error TS7010: 'putAttribute', which lacks return-type annotation, implicitly has an 'any' return type.
112 putAttribute(attribute: string, value: string);
~~~~~~~~~~~~
packages/perf/lib/index.d.ts:158:5 - error TS7010: 'putMetric', which lacks return-type annotation, implicitly has an 'any' return type.
158 putMetric(metricName: string, value: number);
~~~~~~~~~
packages/perf/lib/index.d.ts:172:5 - error TS7010: 'incrementMetric', which lacks return-type annotation, implicitly has an 'any' return type.
172 incrementMetric(metricName: string, incrementBy: number);
~~~~~~~~~~~~~~~
packages/perf/lib/index.d.ts:185:5 - error TS7010: 'removeMetric', which lacks return-type annotation, implicitly has an 'any' return type.
185 removeMetric(metricName: string);
~~~~~~~~~~~~
packages/perf/lib/index.d.ts:259:5 - error TS7010: 'putAttribute', which lacks return-type annotation, implicitly has an 'any' return type.
259 putAttribute(attribute: string, value: string);
~~~~~~~~~~~~
packages/perf/lib/index.d.ts:272:5 - error TS7010: 'removeAttribute', which lacks return-type annotation, implicitly has an 'any' return type.
272 removeAttribute(attribute: string);
~~~~~~~~~~~~~~~
packages/perf/lib/index.d.ts:288:5 - error TS7010: 'setHttpResponseCode', which lacks return-type annotation, implicitly has an 'any' return type.
288 setHttpResponseCode(code: number | null);
~~~~~~~~~~~~~~~~~~~
packages/perf/lib/index.d.ts:302:5 - error TS7010: 'setRequestPayloadSize', which lacks return-type annotation, implicitly has an 'any' return type.
302 setRequestPayloadSize(bytes: number | null);
~~~~~~~~~~~~~~~~~~~~~
packages/perf/lib/index.d.ts:316:5 - error TS7010: 'setResponsePayloadSize', which lacks return-type annotation, implicitly has an 'any' return type.
316 setResponsePayloadSize(bytes: number | null);
~~~~~~~~~~~~~~~~~~~~~~
packages/perf/lib/index.d.ts:330:5 - error TS7010: 'setResponseContentType', which lacks return-type annotation, implicitly has an 'any' return type.
330 setResponseContentType(contentType: string | null);
~~~~~~~~~~~~~~~~~~~~~~
packages/perf/lib/index.d.ts:448:3 - error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
448 import { ReactNativeFirebase } from '@react-native-firebase/app';
~~~~~~
packages/perf/lib/index.d.ts:449:3 - error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
449 import ReactNativeFirebaseModule = ReactNativeFirebase.Module;
~~~~~~
packages/perf/lib/index.d.ts:450:3 - error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
450 import FirebaseModuleWithStatics = ReactNativeFirebase.FirebaseModuleWithStatics;
~~~~~~
packages/perf/lib/index.d.ts:453:27 - error TS1254: A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.
453 export const firebase = firebaseNamedExport;
~~~~~~~~~~~~~~~~~~~
packages/perf/lib/index.d.ts:459:3 - error TS2666: Exports and export assignments are not permitted in module augmentations.
459 export default defaultExport;
~~~~~~
packages/perf/lib/index.d.ts:480:1 - error TS1046: Top-level declarations in .d.ts files must start with either a 'declare' or 'export' modifier.
480 namespace ReactNativeFirebase {
~~~~~~~~~
packages/remote-config/lib/index.d.ts:522:3 - error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
522 import { ReactNativeFirebase } from '@react-native-firebase/app';
~~~~~~
packages/remote-config/lib/index.d.ts:523:3 - error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
523 import ReactNativeFirebaseModule = ReactNativeFirebase.Module;
~~~~~~
packages/remote-config/lib/index.d.ts:524:3 - error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
524 import FirebaseModuleWithStatics = ReactNativeFirebase.FirebaseModuleWithStatics;
~~~~~~
packages/remote-config/lib/index.d.ts:527:27 - error TS1254: A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.
527 export const firebase = firebaseNamedExport;
~~~~~~~~~~~~~~~~~~~
packages/remote-config/lib/index.d.ts:533:3 - error TS2666: Exports and export assignments are not permitted in module augmentations.
533 export default defaultExport;
~~~~~~
packages/storage/lib/index.d.ts:1102:3 - error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
1102 import { ReactNativeFirebase } from '@react-native-firebase/app';
~~~~~~
packages/storage/lib/index.d.ts:1103:3 - error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
1103 import ReactNativeFirebaseModule = ReactNativeFirebase.Module;
~~~~~~
packages/storage/lib/index.d.ts:1104:3 - error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
1104 import FirebaseModuleWithStaticsAndApp = ReactNativeFirebase.FirebaseModuleWithStaticsAndApp;
~~~~~~
packages/storage/lib/index.d.ts:1107:27 - error TS1254: A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.
1107 export const firebase = firebaseNamedExport;
~~~~~~~~~~~~~~~~~~~
packages/storage/lib/index.d.ts:1113:3 - error TS2666: Exports and export assignments are not permitted in module augmentations.
1113 export default defaultExport;
~~~~~~ |
So it seems any PR to fix this should include that change to the tsconfig.json - do you have anything in mind for a PR? |
I don't think I'll be able to fix this, at least not yet, as I'm still new to TypeScript, & these type declaration files are some of the most complex I've seen so far. Definitely don't want to make it worse! |
Pinging this thread since there are many subscribers: If you want to try It's working for me! But I only use |
@davidgovea did you know I added auto-patch-package generation here :-) - check it out: https://github.com/invertase/react-native-firebase/actions/runs/271992461 (it's off the "Checks" area on the PR then the "Create Test Patches" action Thank you for the PR in general though! I would love to hear positive feedback and I'm excited to merge them. I use most of the modules myself and I'll give them a try in my work project to see how it goes also |
Getting this while running
on a react-native project that uses firebase functions |
Worked like a charm. Thanks! |
Issue
I'm testing the Authentication part of v6. Functionally it works well, but I do get TypeScript errors when I run
yarn tsc
:For now, I'm hiding lib errors using
yarn tsc --skipLibCheck
, but I'd rather not use the--skipLibCheck
of course.Project Files
iOS
Click To Expand
ios/Podfile
:AppDelegate.m
:Android
Click To Expand
Have you converted to AndroidX?
android/gradle.settings
jetifier=true
for Android compatibility?jetifier
for react-native compatibility?android/build.gradle
:android/app/build.gradle
:android/settings.gradle
:MainApplication.java
:AndroidManifest.xml
:Environment
Click To Expand
react-native info
output:react-native-firebase
version you're using that has this issue:Firebase
module(s) you're using that has the issue:TypeScript
?Yes
The text was updated successfully, but these errors were encountered: