Elvis Nakamoto
All of typescript is about destroying bravery and replacing it with sad predictability. Whenever I have to convert a legacy JS codebase to TS and keep bumping into horrible bugs that somehow went undetected for years, I can feel my heart sinking a little more.
1 4
nasso.dev
i mean, even in rust the index operator assumes the index is valid and panics otherwise... i wish there was a way to do that in typescript/javascript (automatic bound checking)
2 3
Temirlan
I always thought Array.at() does that, but apparently it just returns undefined when out of bounds :/ I get that js was a lot about flexibility and recovering from errors, but Array.at() is relatively new, so I wonder why they went for the same behavior again
1
nasso.dev
there isn't much you can do.. it's better though, in typescript the return type is a union with undefined
1
Lars
You mean the christmas tree option. When I turn it on my IDE lights up.