Topics

Jump to a topic.

Search questions

Find a question by title, tag, or summary.

Chapter 01

Type system basics

How TypeScript decides whether one type fits another, and the core building blocks: structural typing, any / unknown / never, literal types, object and function types.
6 questions
  1. 010What is the difference between type and interface?Coming soonCoremedium
  2. 020What is structural typing, and how does it differ from nominal typing?Coming soonCoremedium
  3. 030What is the difference between any, unknown, and never?Coming soonCoremedium
  4. 040What are literal types, and what does as const do?Coming soonmedium
  5. 050Why does TypeScript report an error on an object literal but not on a variable with the same shape?Coming soonmedium
  6. 060How do function types, overloads, and the void return type work?Coming soonmedium