Skip to content
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

Some typescript internal errors #3728

Closed
2 of 10 tasks
SaeedZhiany opened this issue Jun 2, 2020 · 4 comments
Closed
2 of 10 tasks

Some typescript internal errors #3728

SaeedZhiany opened this issue Jun 2, 2020 · 4 comments
Labels
help: good-first-issue Issues that are non-critical issues & well defined for first time contributors. Type: Stale Issue has become stale - automatically added by Stale bot

Comments

@SaeedZhiany
Copy link
Contributor

SaeedZhiany commented Jun 2, 2020

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:

# N/A

iOS

Click To Expand

ios/Podfile:

  • I'm not using Pods
  • I'm using Pods and my Podfile looks like:
# N/A

AppDelegate.m:

// N/A


Android

Click To Expand

Have you converted to AndroidX?

  • my application is an AndroidX application?
  • I am using android/gradle.settings jetifier=true for Android compatibility?
  • I am using the NPM package jetifier for react-native compatibility?

android/build.gradle:

// N/A

android/app/build.gradle:

// N/A

android/settings.gradle:

// N/A

MainApplication.java:

// N/A

AndroidManifest.xml:

<!-- N/A -->


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:
    • iOS
    • Android
    • iOS but have not tested behavior on Android
    • Android but have not tested behavior on iOS
    • Both
  • react-native-firebase version you're using that has this issue:
    • 7.1.4
  • Firebase module(s) you're using that has the issue:
    • app
    • cloud messaging
  • Are you using TypeScript?
    • Y & 3.9.3


@mikehardy
Copy link
Collaborator

should be fixed of course but the workaround is skipLibCheck: true in your tsconfig.json no? I believe the standard react-native typescript template even ships with that

Do you have a PR for types improvements? That'll be the fastest way to get it fixed as always :-)

@SaeedZhiany
Copy link
Contributor Author

should be fixed of course but the workaround is skipLibCheck: true in your tsconfig.json no?

Yes, it's right, as I said before, it's not actually a bug for developers, and projects can successfully be built. it's just for maintainers information.

Do you have a PR for types improvements?

No, I didn't work on it.

@russellwheatley russellwheatley added the help: good-first-issue Issues that are non-critical issues & well defined for first time contributors. label Jun 17, 2020
@stale
Copy link

stale bot commented Jul 18, 2020

Hello 👋, to help manage issues we automatically close stale issues.
This issue has been automatically marked as stale because it has not had activity for quite some time. Has this issue been fixed, or does it still require the community's attention?

This issue will be closed in 15 days if no further activity occurs.
Thank you for your contributions.

@stale stale bot added the Type: Stale Issue has become stale - automatically added by Stale bot label Jul 18, 2020
@stale
Copy link

stale bot commented Aug 2, 2020

Closing this issue after a prolonged period of inactivity. If this is still present in the latest release, please feel free to create a new issue with up-to-date information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help: good-first-issue Issues that are non-critical issues & well defined for first time contributors. Type: Stale Issue has become stale - automatically added by Stale bot
Projects
None yet
Development

No branches or pull requests

3 participants