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

Enhance & update type support #182

Open DavidWells opened 3 years ago

DavidWells commented 3 years ago

Types were originally implemented with JSdoc before typescript proper supported this for type generation. This led to the kind of funky setup here.

The js first + JSdocs approach has been working well in a number of my other projects and it's time to update that over c'here 😃

Todo:

Related:

Reference material:

dobesv commented 2 years ago

The docs are currently saying that typescript is fully supported:

https://github.com/DavidWells/analytics#typescript-support

If the TypeScript support isn't coming soon, I wonder if the README should be updated.

Any reason not to just convert everything to TypeScript? Then you get the benefits of TypeScript and generating types becomes easier as well.

alex-grover commented 1 year ago

agreed, that snippet in the README makes it a bit confusing that e.g. @analytics/segment does not bundle types