Closed henbrand closed 2 years ago
Thanks for the suggestion @henbrand, that's really cool and a good step towards type safety!
It would be awesome if you could make a PR for this. I just have one concern regarding the diff that you sent above – the TData
in your code extends object
, wouldn't it better to have it extend Record<string, unknown>
as previously required by the SelfDescribing
type? Perhaps we could take inspiration from the way it's implemented in the Snowplow JavaScript tracker, see here.
@matus-tomlein - could you give me correct permissions (Direct Access should work) to open a PR?
@henbrand Can you please fork the repository, make the change and submit a PR to this repository? That should work without needing any extra permissions. Let me know if there is any problem with it.
Hi! 👋
For additional type safety I wanted to be able to type the data object for
trackSelfDescribingEvent
, currently I have patched the library to allow me to do so. Let me know if you'd like me to open a pull request!Here is the diff that solved my problem: