Skip to content

Conversation

anirudhsama
Copy link

@anirudhsama anirudhsama commented May 10, 2025

Description

When importing anything from react-native-moengage and when the tsconfig has "verbatimModuleSyntax": true, we get an error when type checking:

../../node_modules/react-native-moengage/src/models/MoEProperties.ts:5:10 - error TS1484: 'MoESupportedAttributes' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled.

5 import { MoESupportedAttributes } from "./MoESupportedAttributes";
           ~~~~~~~~~~~~~~~~~~~~~~

../../node_modules/react-native-moengage/src/utils/MoEJsonBuilder.ts:11:10 - error TS1484: 'MoESupportedAttributes' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled.

11 import { MoESupportedAttributes } from "../models/MoESupportedAttributes";
            ~~~~~~~~~~~~~~~~~~~~~~


Found 2 errors in 2 files.

Errors  Files
     1  ../../node_modules/react-native-moengage/src/models/MoEProperties.ts:5
     1  ../../node_modules/react-native-moengage/src/utils/MoEJsonBuilder.ts:11

So this PR fixes it by just importing the type of MoESupportedAttributes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant