Concept: Type Compatibility
Concept Check Medium
Question
How does TypeScript determine if type A is assignable to type B?
Hint
TypeScript uses structural typing — shape matters, not name.
Explanation
TypeScript uses structural subtyping: A is assignable to B if A has at least all the properties that B requires, with compatible types. This is 'duck typing' at the type level. For example, { name: string; age: number } is assignable to { name: string } because it has all required properties of the target.
Look up unfamiliar terms
A beginner-friendly glossary explains jargon in plain English — variables, functions, DOM, Promise, and more.
Decode error messages
Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.
Build real projects
Apply what you learned by building guided projects with starter code and solutions.