Potasse

TypeScript, properly

The type system as it actually behaves — narrowing, variance, and the operators people reach for without quite knowing why.

Try a card

TypeScript, properly1 of 3

What can you do with an unknown value that you cannot do with any?

Say it in your head first.

Questions

  1. 01What can you do with an unknown value that you cannot do with any?
  2. 02What does satisfies do that a type annotation does not?
  3. 03What makes a union discriminated?
  4. 04Why is readonly string[] not assignable to string[]?
  5. 05What does infer do inside a conditional type?
  6. 06What is declaration merging?
  7. 07How does strictNullChecks change the meaning of every other type?
  8. 08What does keyof { a: 1; b: 2 } evaluate to?

…and 6 more cards. The answers are yours to find.