Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using types & having type definitions #4

Open
Matthbo opened this issue Jun 8, 2023 · 0 comments
Open

Using types & having type definitions #4

Matthbo opened this issue Jun 8, 2023 · 0 comments

Comments

@Matthbo
Copy link

Matthbo commented Jun 8, 2023

Why does this project have typescript in the name and uses .ts files when all the basic features & advantages of typescript aren't even used?
Could as well just call it GA4-Measurement-Protocol-Javascript or to be more precise GA4-Measurement-Protocol-ES4, since ES5+ features supported in all modern browsers and Node.js for almost 10 years haven't even been used

For starters we could set types on all the variables and functions.
Instead of having variables assigned in a main function by using this.varname we could use TS's class definition.
Then when you compile it via the tsc it would not only be type safe and friendly in source but also generate the usage definition files for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant