Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
What in particular do you like about it vs plain JavaScript? I haven't looked into it, old heard others talk.
How is it any better than say, latest js features w/ babel? Not a rhetorical question, I'm just curious about the experience. -
@Wisecrack it is mostly types, I get a bunch of information by just reading typed code, and my tooling have it easy because the guessing game is out of the picture, one example: Was using query-string to parse location.search this as part of a function that returns a string, without typing safeguarding my dumbass I could have return an array of strings instead of a string (was using the result of parsing location.search).
Small stuff like that can (and should) be caught by having unit tests in place, but I find it helpful that Emacs can highlight those, I can fix them right away, all thanks to types. -
@catholic-emacs sounds better than than little help we get now. Js I'm finding is notoriously fast and loose.
-
@molaram I mean, you can still use JSDoc to get proper intellisense. Good luck importing types with that though.
I'm having such a blast writing code in TypeScript. Once you learn it you cannot go back to regular JavaScript.
random
javascript
typescript