Skip to content

EasyConceptTypeScript

What is the difference between interface and type in TypeScript?

What a good answer covers

Both describe shapes. Interfaces can be extended and merged by declaration merging; type aliases can also name unions, intersections, tuples and mapped types. Use interface for public object shapes and type for unions and computed types.

More on TypeScript

Flashcards for this topic