News for hackers. Stuff that matters.
Re:An introduction to type programming in TypeScript by gmac on Wednesday February 02, 2022 @11:53AM (#30180150)
Don’t forget the nullish coalescing operator, ??, which is probably nicer than using || here.

https://www.typescriptlang.org/docs/handbook/release-notes/t...

Re:An introduction to type programming in TypeScript by lobstrosity420 on Wednesday February 02, 2022 @01:29PM (#30181735)
You're right, that is a much better choice for this situation!