@types/mixpanel-browser does not support autocapture
I try mixpanel.init() with the autocapture argument:
mixpanel.init(MIXPANEL_TOKEN, {
debug: MP_DEBUG,
persistence: "localStorage",
autocapture: true,
});
I get the following typescript error:
Object literal may only specify known properties, and 'autocapture' does not exist in type 'Partial<Config>'.
Here is my package.json
{
"dependencies" : {
"mixpanel-browser": "^2.60.0",
"@types/mixpanel-browser": "^2.51.0",
}
}
We don't maintain DefinitelyTyped, you can open a PR on that repo for them to review
https://github.com/DefinitelyTyped/DefinitelyTyped/pull/72311
@tdumitrescu Sadly nobody really seems to feel responsible for this package over at DefinitelyTyped. I pushed a few PRs over there already and it always took a few weeks until approval. My latest PR which would close this issue here is now open for 30 days already but nobody seems to bother looking at it. afaik people can be added as maintainers for particular packages. It would already help if someone from Mixpanel could be added to gain approval permissions. So far only DefinitelyTyped core team members have approved the changes to this package if at all.
Yeah, sorry about that. We're planning to pull the typedefs into this repo soon, so the process won't be so painful.
@tdumitrescu That's awesome news. I hope my PR gets merged before. Otherwise please include it when pulling in the typings 😅
It's finally merged and released as 2.60.0.