Hacker News new | ask | show | jobs
by yuretz 1760 days ago
> I get back an empty string without runtime errors. If I get an empty string during dev in my UI, I know to go handle the case,

Well, in your example, with default params, you get back an "undefined undefined", not an empty string, so even simple code is sometimes easy to get wrong. Proper amount of typing actually helps a lot to avoid it.

1 comments

IMO, same thing. If I see that, I'm going to know what to fix. Still not a sell that I need to add in TypeScript. I get the why, but it's often overkill.