When it comes to creating instances of custom objects and ensuring type-checking for arguments, return types, and generics, using a class is the way to go. However, if you don't need to create instances, interfaces provide a convenient option without the need to generate extra source code. They allow us to virtually type-check our code.
Both interfaces and classes define the structure of an object and can be used interchangeably in some scenarios. If we need to share a structural definition among multiple classes, we can define that structure in an interface and have each class implement it. This approach showcases the flexibility and power of TypeScript, offering robust object-oriented design combined with versatile type-checking capabilities.
In conclusion, when it comes to defining simple data types, interfaces are often the preferred solution.