TypeScript is a set-based language


TypeScript is a set-based language.

If I "lie" to TypeScript about the nature of a set of values, then TypeScript can't help me.

If something can be missing/null/undefined, I need to tell TypeScript.

Then the compiler helps me if I forget to handle the edge case. 👍

View original on X