mParticle / react-native-mparticle

React Native module for mParticle
https://www.mparticle.com
Other
13 stars 27 forks source link

Feature Request: Add Type Script Support #11

Open caisd1998 opened 4 years ago

caisd1998 commented 4 years ago

We're using type script, can you add the support?

markgibaud-vtail commented 3 years ago

See https://github.com/mParticle/js-models/tree/master/packages/events 👍

alexs-mparticle commented 2 years ago

Closing this as there is a viable solution. If this is still an issue, please reopen.

joelain commented 2 years ago

Hey! The event types @markgibaud-vtail mentions does not solve the typescript issue for this module. We need type definitions for the items in js/index.js. Without them typescript does not know what type MParticle is when we import it.

import MParticle  from 'react-native-mparticle';

The error without the type definitions

Could not find a declaration file for module 'react-native-mparticle'. '/some/path/node_modules/react-native-mparticle/js/index.js' implicitly has an 'any' type.
alexs-mparticle commented 2 years ago

@joelain Thanks for the heads up. We'll reopen this issue and see when we can get it into our backlog. Tracking internally as 77187.

fparhat-rbi commented 2 years ago

Please add type support +1

BuddhaBing commented 2 years ago

+1

einsteinx2 commented 2 years ago

Tracking internally via https://go.mparticle.com/work/SQDSDKS-4220

JulianKingman commented 2 years ago

Just starting to implement MParticle, and I'm really looking forward to this, particularly with option chains like so: MParticle.User.UserAttributeType.FirstName, I've come to expect the intellisense that comes with TS.