analytics.js-core
analytics.js-core copied to clipboard
adds types for Segment Integration Settings
cross checked from https://github.com/segmentio/analytics.js-integrations/blob/master/integrations/segmentio/lib/index.js#L58
I would also like to add types for the Mixpanel integration settings (https://github.com/segmentio/analytics.js-integrations/blob/master/integrations/mixpanel/lib/index.js#L21) but am unsure where to put them. There doesn't seem to be any place where types are housed for integrations in https://github.com/segmentio/analytics.js-integrations/
@dimitropoulos Thanks for the submission! I'll get this merged today.
Regarding other specific integration settings, I think this is something we definitely want to expose as part of analytics.js-integrations but there isn't a great story around TypeScript and our integrations. I'll bring this up with the team
Once I have an answer, I'll ping you for possible next steps.
yeah, I ended up giving up on using this package, sadly, because of the lack of typings and missing documentation. I would have been happy to contribute to the typings if they're actually used but some of the problems with them (for example: https://github.com/segmentio/analytics.js-core/pull/181/files) indicate to me that no one is actually using them because if they were it would break almost immediately in light usage, as it did for me. I lost a lot of time in the project I was using this for trying to figure out how to set up integrations and I eventually just added the script tag.
It appeared that I can't use the node integration without manually specifying each integration which seems counter to the idea of segment itself (where, I could manage integrations from afar on segment's site without having to make changes to or deploy my app).
Still, I really appreciate that segment (which seems to (as a company) be very late (or bitter?) to join the TypeScript world) is changing their ways and supporting more TypeScript. I wish you luck and next time I have to add segment to a package I'll take a fresh look. :)