Use Types vs. Interfaces

InstructorRares Matei

Share this video with your friends

Send Tweet

Type aliases and interfaces are often used interchangeably in TypeScript, the decision for using one or the other coming down to readability/conciseness. And they do share a lot of functional similarities too: as with interfaces, types can extend other types (by the use of the intersection operator), and they can also be implemented from or extended from by a class. But they also differ in an important way: your classes can’t implement and your interfaces cannot extend a union of types.