beginner35 minby DevFox

Narrowing with the in operator

Tell objects of different shapes apart with the in operator, like cards on the fridge where only a chore card has a space for minutes. See which type TypeScript gives the value on each side of the check, add up a week of chores, learn why an optional property lands on both sides, and why !== undefined cannot be the check.

  • TypeScript
  • Fundamentals
Narrowing with the `in` operator. Read this lesson at .