hms-react-native-plugin icon indicating copy to clipboard operation
hms-react-native-plugin copied to clipboard

Hitting error TS1110 when importing @hmscore/react-native-hms-analytics

Open Keatooon opened this issue 2 years ago • 0 comments

Description I've added the Huawei analytics package using this: "yarn add @hmscore/react-native-hms-analytics"

and imported it using "import HMSAnalytics from '@hmscore/react-native-hms-analytics';"

When I'm trying to run the project, I'm getting these errors:

node_modules/@hmscore/react-native-hms-analytics/src/index.d.ts:532:33 - error TS1110: Type expected.

532 static onEvent(eventId: ${HAEventType} | string, bundle: object): Promise<Result>; ~~~

node_modules/@hmscore/react-native-hms-analytics/src/index.d.ts:532:66 - error TS1005: ';' expected.

532 static onEvent(eventId: ${HAEventType} | string, bundle: object): Promise<Result>;

Expected behavior What you expected to happen?

Should run without any typescript errors.

Current behavior What actually happened?

It has errors

Logs [Post logs here or paste them to Ghostbin and insert the link here. ](https://paste.bingner.com/paste/47uhj)

Environment

  • Platform: react-native 0.62.2
  • Kit: Huawei Analytics (@hmscore/react-native-hms-analytics)
  • Kit Version Version 6.9.0-302
  • OS Version: MacOS Ventura Version 13.0.1 (22A400)
  • Android Studio version :Android Studio Dolphin | 2021.3.1 Patch 1
  • Node Version v12.13.0

Other I'm able to run it by downgrading it from 6.9.0-302 to 6.2.0-301. But I still want to use version 6.9.0-302.

Keatooon avatar May 17 '23 03:05 Keatooon