Skip to content

Conversation

@kunsachdeva
Copy link

Summary

Adds types definition so it can be used directly in .tsx/.ts files without using @ts-ignore

Testing Plan

Install in a typescript react-native or expo project

Master Issue

Closes #11

@@ -0,0 +1,302 @@
declare module 'react-native-mparticle';
export default MParticle;
Copy link

@ghost ghost May 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue: i think you need to change to lines 1 and 2 to:

declare module 'react-native-mparticle' {
  export default MParticle;
}

As currently implemented the module is declared, but is empty (tested by copying this file to our local environment). This results in the same error as before: Could not find a declaration file for module 'react-native-mparticle'

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.

Feature Request: Add Type Script Support

1 participant