What is declaration merging in TypeScript and which constructs support it?

TypeScript Associate Hard

TypeScript Associate — Hard

What is declaration merging in TypeScript and which constructs support it?

Key points

  • Declaration merging combines multiple declarations of the same name
  • Interfaces, namespaces, and function overloads support declaration merging
  • Type aliases do not support declaration merging

Ready to go further?

Related questions