Skip to content
This repository was archived by the owner on Aug 8, 2025. It is now read-only.
This repository was archived by the owner on Aug 8, 2025. It is now read-only.

TSC Compilation Issue #8

@Yathousen

Description

@Yathousen

As soon as you update to the latest version and import the library, this happens.
imported node_modules cannot be ignored by tsc.

tsc

node_modules/@taplytics/segment-react-native-plugin-taplytics/src/methods/identify.ts:5:11 - error TS2339: Property 'email' does not exist on type 'UserTraits | undefined'.

5   const { email, firstName, lastName, name, age, gender, customData, ...customAttributes } = event.traits;
            ~~~~~

node_modules/@taplytics/segment-react-native-plugin-taplytics/src/methods/identify.ts:5:18 - error TS2339: Property 'firstName' does not exist on type 'UserTraits | undefined'.

5   const { email, firstName, lastName, name, age, gender, customData, ...customAttributes } = event.traits;
                   ~~~~~~~~~

node_modules/@taplytics/segment-react-native-plugin-taplytics/src/methods/identify.ts:5:29 - error TS2339: Property 'lastName' does not exist on type 'UserTraits | undefined'.

5   const { email, firstName, lastName, name, age, gender, customData, ...customAttributes } = event.traits;
                              ~~~~~~~~

node_modules/@taplytics/segment-react-native-plugin-taplytics/src/methods/identify.ts:5:39 - error TS2339: Property 'name' does not exist on type 'UserTraits | undefined'.

5   const { email, firstName, lastName, name, age, gender, customData, ...customAttributes } = event.traits;
                                        ~~~~

node_modules/@taplytics/segment-react-native-plugin-taplytics/src/methods/identify.ts:5:45 - error TS2339: Property 'age' does not exist on type 'UserTraits | undefined'.

5   const { email, firstName, lastName, name, age, gender, customData, ...customAttributes } = event.traits;
                                              ~~~

node_modules/@taplytics/segment-react-native-plugin-taplytics/src/methods/identify.ts:5:50 - error TS2339: Property 'gender' does not exist on type 'UserTraits | undefined'.

5   const { email, firstName, lastName, name, age, gender, customData, ...customAttributes } = event.traits;
                                                   ~~~~~~

node_modules/@taplytics/segment-react-native-plugin-taplytics/src/methods/identify.ts:5:58 - error TS2339: Property 'customData' does not exist on type 'UserTraits | undefined'.

5   const { email, firstName, lastName, name, age, gender, customData, ...customAttributes } = event.traits;
                                                           ~~~~~~~~~~


Found 7 errors.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions