Setting a default only when a key is missing was $a[‘k’] = $a[‘k’] ?? $v;, which evaluates the subscript twice and reads as a statement about itself. The…
|| falls through for every falsy value, so a default applied with it overrides a legitimate zero, an empty string and false. The third line is the one…
any switches the compiler off for that value and everything derived from it. unknown accepts anything and permits nothing until it has been narrowed. JSON.parse returns any, which…
3.7 shipped optional chaining in November and the objection got smaller. allowJs, checkJs and a per-file opt-in — and strictNullChecks, which is the flag that pays.
Since 7.2 count() warns on anything that is not an array or Countable, and the guard everybody wrote by hand is now in the standard library. A generator…
A JavaScript dependency without types is an implicit any, and under noImplicitAny it is a compile error — so the choice is a declaration or a suppression. Describing…