DavidWells / analytics

Lightweight analytics abstraction layer for tracking page views, custom events, & identifying visitors
https://getanalytics.io
MIT License
2.43k stars 247 forks source link

type definitions have invalid type annotations #445

Closed trusktr closed 2 months ago

trusktr commented 3 months ago

For example, the init function is seen to have a string & number type which TypeScript does not support, leading to the type definition resulting in undefined:

Screenshot 2024-06-25 at 10 51 02 AM

Trying to use it results in an error:

Screenshot 2024-06-25 at 10 55 26 AM Screenshot 2024-06-25 at 10 55 40 AM

Changing it to string | number will fix the type def.

DavidWells commented 2 months ago

Should be fixed with