TypeError on useTracking().trackEvent()
sad-squid opened this issue · 1 comments
Using @types/react-tracking
, the DefinitelyTyped type definitions show that the useTracking().trackEvent() method's return type is explicitly defined as any
. Because this raises linting warnings and errors if using @typescript-eslint/no-unsafe-return
, I've made a requested change to the types in DefinitelyTyped - link to pull request here.
If there is any concern / issue with the adjustment of typing from any
to void
please let me know! Feel free to close this issue if valid! ✅
That makes sense, thanks for catching this. I see the Definitely Typed has been merged and it looks like a good change to me, so I'll close this issue.
FWIW, we are looking to bring the TS typings in-house here. This PR is a step in that direction and your review would be appreciated! #152
Thanks again!