mixpanel-js
mixpanel-js copied to clipboard
TypeScript Error: Property 'track_pageview' does not exist on type 'OverridedMixpanel'. - v2.47.0
Hi, all!
I'm currently using React (^18.1.0
) with TypeScript (^5.0.4
) and mixpanel-browser (^2.47.0
).
Using the new track_pageview()
method in the latest release, however, I am encountering this TS error:
Property 'track_pageview' does not exist on type 'OverridedMixpanel'.
When I checked mixpanel/index.d.ts
, it looks like the Mixpanel
interface does not have the method signature defined for track_pageview()
.
I believe we can fix this issue for TS users by adding the method signature:
track_pageview(properties?: Dict): void