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

TypeScript Error: global.__turboModuleProxy type definition missing for React Native Turbo Modules #773

Open
KMJ-007 opened this issue Feb 14, 2025 · 1 comment

Comments

@KMJ-007
Copy link

KMJ-007 commented Feb 14, 2025

When using react-native-contacts with TypeScript strict mode enabled, the following type error occurs:

This error occurs because the package uses React Native's Turbo Modules feature but doesn't include the necessary type definitions for the global __turboModuleProxy property.

Environment

  • react-native-contacts: ^8.0.4
  • react-native: 0.76.7
  • typescript: ~5.3.3
  • expo: ~52.0.33
  • Platform: iOS/Android

Steps to Reproduce

  1. Create a new React Native project with TypeScript
  2. Enable strict: true in tsconfig.json
  3. Install react-native-contacts
  4. Run TypeScript type checking

Expected Behavior

TypeScript should recognize the __turboModuleProxy property on the global object as it's a valid React Native Turbo Modules property.

Additional Context

This is related to React Native's Turbo Modules architecture. The property is valid and works at runtime, but lacks proper TypeScript definitions.

@therveux
Copy link

Same issue here !

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

No branches or pull requests

2 participants