1+ declare module 'react-native-mixpanel' {
2+ export class MixpanelInstance {
3+ constructor ( apiToken ?: string )
4+
5+ initialize ( ) : Promise < void >
6+ getDistinctId ( ) : Promise < string >
7+ getSuperProperty ( propertyName : string ) : Promise < any >
8+ track ( event : string , properties ?: Object ) : Promise < void >
9+ flush ( ) : Promise < void >
10+ disableIpAddressGeolocalization ( ) : Promise < void >
11+ alias ( alias : string ) : Promise < void >
12+ identify ( userId : string ) : Promise < void >
13+ timeEvent ( event : string ) : Promise < void >
14+ registerSuperProperties ( properties : Object ) : Promise < void >
15+ registerSuperPropertiesOnce ( properties : Object ) : Promise < void >
16+ initPushHandling ( token : string ) : Promise < void >
17+ set ( properties : Object ) : Promise < void >
18+ setOnce ( properties : Object ) : Promise < void >
19+ trackCharge ( charge : number ) : Promise < void >
20+ trackChargeWithProperties ( charge : number , properties : Object ) : Promise < void >
21+ increment ( property : string , by : number ) : Promise < void >
22+ union ( name : string , properties : any [ ] ) : Promise < void >
23+ removePushDeviceToken ( deviceToken : Object ) : Promise < void >
24+ removeAllPushDeviceTokens ( ) : Promise < void >
25+ addPushDeviceToken ( token : string ) : Promise < void >
26+
27+ // android only
28+ setPushRegistrationId ( token : string ) : Promise < void >
29+
30+ // android only
31+ clearPushRegistrationId ( ) : Promise < void >
32+
33+ reset ( ) : Promise < void >
34+ }
35+
36+ interface MixpanelAPI {
37+ sharedInstanceWithToken ( apiToken : string ) : Promise < void > ;
38+ getDistinctId ( callback : ( id ?: string ) => void ) : void ;
39+ getSuperProperty ( propertyName : string , callback : ( value : any ) => void ) : void ;
40+ track ( event : string ) : void ;
41+ trackWithProperties ( event : string , properties : Object ) : void ;
42+ flush ( ) : void ;
43+ disableIpAddressGeolocalization ( ) : void ;
44+ createAlias ( alias : string ) : void ;
45+ identify ( userId : string ) : void ;
46+ timeEvent ( event : string ) : void ;
47+ registerSuperProperties ( properties : Object ) : void ;
48+ registerSuperPropertiesOnce ( properties : Object ) : void ;
49+ initPushHandling ( token : string ) : void ;
50+ set ( properties : Object ) : void ;
51+ setOnce ( properties : Object ) : void ;
52+ removePushDeviceToken ( deviceToken : Object ) : void ;
53+ removeAllPushDeviceTokens ( ) : void ;
54+ trackCharge ( charge : number ) : void ;
55+ trackChargeWithProperties ( charge : number , properties : Object ) : void ;
56+ increment ( property : string , by : number ) : void ;
57+ union ( name : string , properties : any [ ] ) : void ;
58+ addPushDeviceToken ( token : string ) : void ;
59+
60+ // android only
61+ setPushRegistrationId ( token : string ) : void ;
62+
63+ // android only
64+ clearPushRegistrationId ( ) : void ;
65+
66+ reset ( ) : void ;
67+ }
68+
69+ const mixpanelApi : MixpanelAPI ;
70+ export default mixpanelApi ;
71+
72+ }
0 commit comments