What is the difference between ‘interface’ and ‘type’ in TypeScript?

TypeScript Associate Medium

TypeScript Associate — Medium

What is the difference between ‘interface’ and ‘type’ in TypeScript?

Key points

  • Interfaces support declaration merging
  • Type aliases do not allow reopening or extending
  • Declaration merging is a unique feature of interfaces in TypeScript

Ready to go further?

Related questions