Skip to content

Allow for type argument for track functions #1251

Open
@matus-tomlein

Description

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.

Metadata

Assignees

No one assigned

    Labels

    type:enhancementNew features or improvements to existing features.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions