Closed sad-squid closed 4 years ago
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! https://github.com/nytimes/react-tracking/pull/152
Thanks again!
Using
@types/react-tracking
, the DefinitelyTyped type definitions show that the useTracking().trackEvent() method's return type is explicitly defined asany
. 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
tovoid
please let me know! Feel free to close this issue if valid! ✅