Level 1M2Lesson 2.6

beginner40 minby DevFox

Inference: when TypeScript knows the type and when to write it yourself

See how TypeScript works out a box’s type from its first value and from every operator and method, why a const box shows its value as a literal type while a let box shows the kind, and when writing the type yourself catches a first value of the wrong kind. Read every type in TaskKit on hover.

  • Fundamentals
  • TypeScript
Inference: when TypeScript knows the type and when to write it yourself. Read this lesson at .