---
title: "Comment by Tarun Sharma on \"Mastering TypeScript: Interfaces, Generics, Unions, and More\" | Hashnode"
description: "Good breakdown of the interface vs type alias tradeoffs. One thing worth adding to the declaration merging section, that same feature is also a footgun in a lar"
url: "https://hashnode.com/posts/mastering-typescript-interfaces-generics-unions-and-more/6a8b6eaa95c7b8fd07abdf0f/comment/6a8bf17e4118d2b773ab8ec0"
---

[Discussion](https://hashnode.com/posts/mastering-typescript-interfaces-generics-unions-and-more/6a8b6eaa95c7b8fd07abdf0f)

Comment [Mastering TypeScript: Interfaces, Generics, Unions, and More](https://hashnode.com/posts/mastering-typescript-interfaces-generics-unions-and-more/6a8b6eaa95c7b8fd07abdf0f)

[Tarun Sharma](https://hashnode.com/@101beardo)

[Aug 24](https://hashnode.com/posts/mastering-typescript-interfaces-generics-unions-and-more/6a8b6eaa95c7b8fd07abdf0f/comment/6a8bf17e4118d2b773ab8ec0)

Good breakdown of the interface vs type alias tradeoffs. One thing worth adding to the declaration merging section, that same feature is also a footgun in a large codebase. Two files can declare the same interface name and merge silently, and if that's accidental rather than intentional it can hide a naming collision that a type alias would've caught immediately as a duplicate identifier error.
