Introduction
Interfaces help us describe the shape of data clearly. They make sure different parts of a program agree on what data looks like.
When you want to make sure an object has certain properties before using it.
When different parts of your program need to share the same data structure.
When you want to catch mistakes early by checking data types.
When you want to write code that is easier to understand and maintain.
When you want to describe the shape of complex objects or functions.