News for hackers. Stuff that matters.
Re:Svelte and TypeScript by orange8 on Wednesday July 22, 2020 @06:45AM (#23915667)
My point is I never use null or worry about "strict null checking" or even what that is in the first place or even how it is configured.
Re:Svelte and TypeScript by spion on Thursday July 23, 2020 @06:36PM (#23933450)
Next time you get a "Cannot read property <x> of undefined" error at runtime, take a moment to trace why it happened, then read https://shinesolutions.com/2017/01/06/writing-safer-code-wit...
Re:Svelte and TypeScript by Vinnl on Wednesday July 22, 2020 @02:38PM (#23920170)
Well, good for you, bit you can run into the exact same problems with undefined (which you do use), and TypeScript still helps with those in the exact same way.

Which is to say: whether you use null or undefined is not really relevant to the point that was being made...

Re:Svelte and TypeScript by orange8 on Wednesday July 22, 2020 @04:15PM (#23921109)
Thank you. I use undefined very rarely, usually with a hacky looking: "typeof foo === 'undefined'". I'd still rather just type that though than having to setup up TS. Don't get me wrong, TS is great for the eco-system, for examples it powers the intellisense behind vscode which I use daily. I just do not need to use it directly, so good for me indeed.