Interfaces are good for specifying the shape of an object, eg for a person object, Type is for those data items that can not be represented as objects as well as objects.
It's specifically intended for defining object shapes, including classes. It can also be used for extending other interfaces and defining contracts for objects.
Interfaces can be extended to create new interfaces, allowing for easy reuse and modification
It works better with classes since a class can implement an interface.
Interfaces support declaration merging, meaning you can define multiple parts of an interface across your code, and TypeScript will combine them into one.
Use interface when you are primarily dealing with object shapes and need features like declaration merging or integration with classes.
It's more versatile and can alias not just object shapes, but other types like primitives, unions, intersections, and more.
Types can also be extended using intersections, but it's not as explicit as interface inheritance.
Types can alias more complex types like union types, tuples, or primitives, which interfaces cannot do.
Types do not support declaration merging. Once a type is defined, it cannot be redefined
Use type when you need to define more complex types like unions, intersections, or primitives.