Check out example codes for "mixpanel for typescript". It will help you in understanding the concepts better.

Code Example 1

npm install --save @types/mixpanel-browser

Learn ReactJs, React Native from akashmittal.com