Skip to content

Missing types update in v3.3.0 #381

@vvslepkan

Description

@vvslepkan

Hello team,
In your recent update you forgot to update types
https://github.com/mixpanel/mixpanel-react-native/releases/tag/v3.3.0

According to the docs I should be able to set serverURL as a 3rd parameter:

const serverURL = '<YOUR_PROXY_DOMAIN>';  // set the server URL to your proxy
const trackAutomaticEvents = false;
 
// create an instance of Mixpanel using your project token
// with the configuration options above
const mixpanel = new Mixpanel(
  'YOUR_PROJECT_TOKEN',
  trackAutomaticEvents,
  serverURL
  );
 
//initialize Mixpanel
mixpanel.init();

In reality it looks like this:

export class Mixpanel {
  constructor(token: string, trackAutoMaticEvents: boolean);
  constructor(token: string, trackAutoMaticEvents: boolean, useNative: true);
  constructor(
    token: string,
    trackAutomaticEvents: boolean,
    useNative: false,
    storage?: MixpanelAsyncStorage
  );
  static init(
    token: string,
    trackAutomaticEvents: boolean,
    optOutTrackingDefault?: boolean
  ): Promise<Mixpanel>;
  init(
    optOutTrackingDefault?: boolean,
    superProperties?: MixpanelProperties,
    serverURL?: string,
    useGzipCompression?: boolean
  ): Promise<void>;
  setServerURL(serverURL: string): void;
  ...
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions