Concept Flow - Duck typing mental model in TypeScript
Start with an object
Check if object has required properties
Yes
Treat object as that type
Use object with expected methods/properties
End
Duck typing means if an object has the right properties, TypeScript treats it as that type without explicit inheritance.