mixpanel / mixpanel-react-native

Official React Native Tracking Library for Mixpanel Analytics
https://mixpanel.com
Apache License 2.0
107 stars 48 forks source link

Type fix for mixpanel.alias() #178

Closed mfbx9da4 closed 1 year ago

mfbx9da4 commented 1 year ago

Here is the diff that solved my problem:

diff --git a/node_modules/mixpanel-react-native/index.d.ts b/node_modules/mixpanel-react-native/index.d.ts
index b61ed78..d76b35f 100644
--- a/node_modules/mixpanel-react-native/index.d.ts
+++ b/node_modules/mixpanel-react-native/index.d.ts
@@ -14,7 +14,7 @@ export class Mixpanel {
     optInTracking(): void;
     optOutTracking(): void;
     identify(distinctId: string): void;
-    alias(alias: string, distinctId: string): void
+    alias(alias: string, distinctId?: string): void
     track(eventName: string, properties?: MixpanelProperties): void
     getPeople(): People;
     trackWithGroups(eventName: string, properties?: MixpanelProperties, groups: MixpanelProperties): void;

This issue body was partially generated by patch-package.