-
Notifications
You must be signed in to change notification settings - Fork 57
Description
I would like to ask for better TypeScript support for the web SDK.
I'm facing two problems that aren't solved with the @types/mparticle__web-sdk package.
1. Custom domains are not supported in the configuration
My TypeScript apps use a custom domain to prevent events from getting blocked by browsers. However, the fields on the mParticle configuration object are not allowed in TypeScript:
2. Type conflicts on the user identities
I've also noticed incompatibilities between the types and the code. For example, the userIdentities object is typed so that its fields can be string | undefined, but if I pass an undefined value, the SDK complains at runtime that the field must be a string or null.
undefined email |
null email |
|---|---|
![]() |
![]() |
Here's a screenshot of my browser's console when I pass email: undefined to the configuration:
Would you consider writing your own types so that consumers of the web SDK don't have to rely on an outdated package? TypeScript support is a must for modern apps. Thank you!



