beginner30 minby DevFox

Structural typing: shapes, not names; excess property checks

See that TypeScript checks an object by its shape, its properties and their types, never by the name of its type, and why an object literal written straight into a call or a typed box may not bring a property the type does not know. Fix a misspelt optional property instead of hiding it in a box.

  • TypeScript
  • Fundamentals
Structural typing: shapes, not names; excess property checks. Read this lesson at .