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

Contradicting types for `config.version` #435

Closed jamesbeith closed 4 months ago

jamesbeith commented 4 months ago

In the API reference docs, config.version is typed as a string.

https://github.com/DavidWells/analytics/blob/82216bfad172fa834b1b7beb030be4e41ed73ed9/site/main/source/api.md?plain=1#L31

However, the Using in your app example docs on the homepage is using a integer.

https://github.com/DavidWells/analytics/blob/209e6fd8e3e33b61297cf0d41f69a3c94b9d89c2/site/main/source/index.mdx?plain=1#L67

DavidWells commented 4 months ago

Ah word. Good catch.

Should be string|number. Really it can be whatever you wish. Some like semver, some like dates, some like numbers

DavidWells commented 4 months ago

Published updated lib