Skip to content

Some typescript internal errors #3728

@SaeedZhiany

Description

@SaeedZhiany

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


Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: StaleIssue has become stale - automatically added by Stale bothelp: good-first-issueIssues that are non-critical issues & well defined for first time contributors.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions