HMS-Core / hms-react-native-plugin

This repo contains all of React-Native HMS plugins.
https://developer.huawei.com/consumer/en/doc/overview/HMS-Core-Plugin?ha_source=hms1
Apache License 2.0
235 stars 67 forks source link

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

Open Keatooon opened 1 year ago

Keatooon commented 1 year ago

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;



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](https://ghostbin.co) and insert the link here.

Environment

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.