Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow for type argument for track functions #1251

Open
matus-tomlein opened this issue Oct 12, 2023 · 0 comments
Open

Allow for type argument for track functions #1251

matus-tomlein opened this issue Oct 12, 2023 · 0 comments
Labels
type:enhancement New features or improvements to existing features.

Comments

@matus-tomlein
Copy link
Contributor

Is your feature request related to a problem? Please describe.
We don't yet have the option to set the types for data passed as events or context entities in our track functions.

Describe the solution you'd like
Extending on issue #1249, we can add the type argument also to the track functions (trackPageView, trackSelfDescribingEvent, ...) so that users can specify the types for the self-describing event or the context entities.

Additional context
This runs into a problem that we discussed with @igneel64 that we need to change the type of the self-describing data from Record<string, unknown> to Record<unknown, unknown>. This should not be a breaking change, but can be in case people set TypeScript expectations on the types, which is probably rare.

@matus-tomlein matus-tomlein added the type:enhancement New features or improvements to existing features. label Oct 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:enhancement New features or improvements to existing features.
Projects
None yet
Development

No branches or pull requests

1 participant