Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add types definition #130

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

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