That sounds like spending a lot of extra effort just to avoid a little up-front effort.
Comment on Are we ready for javascript without a build step on the front end in 2023?
icesentry@programming.dev 1 year agoIf you want type safety and no build step you do like svelte did and use jsdoc instead. You can run the typescript type checker on those annotations so if you care about not having a build step you can still have type safety.
realharo@lemm.ee 1 year ago
icesentry@programming.dev 1 year ago
How is it extra effort? It’s just a comment instead of inline types. It’s not like going from no types to types everywhere.
Rooki@lemmy.world 1 year ago
its like js but with extra steps WHY NOT USING TS then?
icesentry@programming.dev 1 year ago
That’s litterally less step. It’s just a comment above a function. How is that more steps?
I mean, don’t get me wrong, I don’t mind build step but this is objectively less steps.
Rooki@lemmy.world 1 year ago
In typescript you dont comment before there you see the variable name and that (should be enough) and the type is there…