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

[v6] Typescript Error in Analytics #2732

Closed
2 of 10 tasks
kevinsperrine opened this issue Oct 15, 2019 · 4 comments
Closed
2 of 10 tasks

[v6] Typescript Error in Analytics #2732

kevinsperrine opened this issue Oct 15, 2019 · 4 comments
Labels
Keep Open avoids the stale bot plugin: analytics Google Analytics for Firebase tools: typings TypeScript / Flow
Milestone

Comments

@kevinsperrine
Copy link

kevinsperrine commented Oct 15, 2019

Issue

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,
}

Project Files

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:

info 
  React Native Environment Info:
    System:
      OS: macOS 10.14.5
      CPU: (12) x64 Intel(R) Core(TM) i9-8950HK CPU @ 2.90GHz
      Memory: 723.28 MB / 32.00 GB
      Shell: 5.7.1 - /usr/local/bin/zsh
    Binaries:
      Node: 12.11.1 - /usr/local/bin/node
      Yarn: 1.19.1 - /usr/local/bin/yarn
      npm: 6.11.3 - /usr/local/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    SDKs:
      iOS SDK:
        Platforms: iOS 13.1, DriverKit 19.0, macOS 10.15, tvOS 13.0, watchOS 6.0
      Android SDK:
        API Levels: 28
        Build Tools: 28.0.3
    IDEs:
      Android Studio: 3.5 AI-191.8026.42.35.5900203
      Xcode: 11.1/11A1027 - /usr/bin/xcodebuild
    npmPackages:
      react: 16.8.3 => 16.8.3 
      react-native: 0.59.8 => 0.59.8 
  • 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:
    • 6.0.1
  • Firebase module(s) you're using that has the issue:
    • Analytics
  • Are you using TypeScript?
    • Y
    • 3.6.4


Think react-native-firebase is 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]

@Ehesp

This comment has been minimized.

@kevinsperrine
Copy link
Author

Thanks! I've tried it on both 3.6.4 and 3.5.1.

@Salakar Salakar added this to the v6.1.0 milestone Oct 18, 2019
@Salakar Salakar added the tools: typings TypeScript / Flow label Oct 23, 2019
@Salakar Salakar mentioned this issue Nov 2, 2019
10 tasks
@stale
Copy link

stale bot commented Nov 20, 2019

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 Nov 20, 2019
@Salakar Salakar added Keep Open avoids the stale bot and removed Type: Stale Issue has become stale - automatically added by Stale bot labels Nov 23, 2019
@Salakar Salakar modified the milestones: v6.1.0, v7.0.0 Nov 25, 2019
@russellwheatley russellwheatley added Version: >= 6 plugin: analytics Google Analytics for Firebase labels May 21, 2020
@mikehardy
Copy link
Collaborator

Let's track this in one place #2614

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Keep Open avoids the stale bot plugin: analytics Google Analytics for Firebase tools: typings TypeScript / Flow
Projects
None yet
Development

No branches or pull requests

5 participants