react-ga4 icon indicating copy to clipboard operation
react-ga4 copied to clipboard

Fix types

Open FrameMuse opened this issue 3 years ago • 0 comments

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

FrameMuse avatar Apr 01 '22 14:04 FrameMuse