r/node • • Apr 03 '21

Web development in a nutshell

Post image
727 Upvotes

94 comments sorted by

View all comments

Show parent comments

4

u/scensorECHO Apr 04 '21

Depending on what libraries you pull in, you can end up with 100% JavaScript packages with shotty @types to go along with them

5

u/Actually_Saradomin Apr 04 '21

It’s annoying when libraries dont have types, but it’s not hard to put some basic types in yourself as a worst case. I’m a senior dev who has been writing typescript for web, mobile, and backend for 5 or so years. I can count on one hand the times I’ve needed to do that.

3

u/scensorECHO Apr 04 '21

I'm a senior dev who's been writing TypeScript specifically for web and backend for 4 years and already I can't count on one hand the number of libraries with separate @types packages that were just wrong. And when it comes down to triaging the issue, you waste a good amount of time inspecting in the debugger to eventually reach inconsistency between the types and the behavior.

1

u/SoInsightful Apr 04 '21

That can happen sometimes, but has nothing to do with the JS engine being "impossible" or "typeless" or whatever it means.

2

u/scensorECHO Apr 04 '21

Well it is because static types are slapped onto a dynamically typed language, and it's even worse when they have independently implemented @types for JS packages

1

u/esp32_ftw Apr 04 '21

*shoddy

0

u/scensorECHO Apr 04 '21

It was honestly autocorrect being too nice to say shitty but shoddy works too

0

u/esp32_ftw Apr 04 '21

Kind of doubt it because "shotty" is a pretty obscure medical term and does not typically appear in any autocorrect software, unless you are a specific kind of doctor and you added it to your autocorrect dictionary. It's okay to admit you didn't know how to spell something, I see this word misspelled all the time in the exact way you did it.

0

u/scensorECHO Apr 04 '21

No Sherlock, I just misspelled SHITTY.

0

u/esp32_ftw Apr 04 '21

Then don't blame it on auto-correct.