News for hackers. Stuff that matters.
Re:Svelte and TypeScript by mekster on Wednesday July 22, 2020 @08:28AM (#23916208)
null and undefined are very different. Not sure how you leave null out of your code.

You never interact with database? You're not supposed to pass undefined as NULL value.

And a variable that is waiting to be defined is very different from a value that received null as a result.

Dealing all those mixed up as falsy is a bad design.

Re:Svelte and TypeScript by orange8 on Wednesday July 22, 2020 @04:18PM (#23921134)
I've already mentioned this above, please look up falsy and truthy values in JS. Null, false, 0, undefined and "" can be treated pretty much the same in 99% of your JS code. JS is after-all still a dynamic language, and there is nothing stopping you from making use of its dynamic features.