Skip to content

TypeScript error in bridge.d.ts and analytics.d.ts #11

@cristeahub

Description

@cristeahub

Hi,

I recently stumbled upon the following error when running tsc in my project:

node_modules/@segment/analytics-react-native/build/esm/analytics.d.ts:89:26 - error TS1039: Initializers are not allowed in ambient contexts.

89         readonly ready = false;
                            ~~~~~

node_modules/@segment/analytics-react-native/build/esm/bridge.d.ts:2:17 - error TS2503: Cannot find namespace 'NativeModules'.

2 import bridge = NativeModules.RNAnalytics;
                  ~~~~~~~~~~~~~

node_modules/@segment/analytics-react-native/build/esm/bridge.d.ts:4:31 - error TS2503: Cannot find namespace 'NativeModules'.

4 export declare type JsonMap = NativeModules.RNAnalytics.JsonMap;

This doesn't cause any errors in the app as far as I can see.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions