react-ga4
react-ga4 copied to clipboard
Fix types
Problem
There are several problems with typings
Somewhere you put any like in this example
https://github.com/PriceRunner/react-ga4/blob/f31ed502adec6dc9dd68e3b59d39c1857880f433/src/ga4.js#L46
Niether put any types like here
https://github.com/PriceRunner/react-ga4/blob/f31ed502adec6dc9dd68e3b59d39c1857880f433/src/ga4.js#L479
So then it becomes any anyway.
This is the opposite of what typings are for.
Solution
In my opinion, it's better to rewrite the script in ts, so it's easier to maintain types, or eventually put right types everywhere