---
title: "Discussion on \"A Second `interface Config` in Another File Just Changed Your Type: TypeScript Declaration Merging, Tested\" | Hashnode"
description: "Discussion on \"A Second `interface Config` in Another File Just Changed Your Type: TypeScript Declaration Merging, Tested\". Here's a bug that looks impossible at first. settings.ts compiles on its own:\n// settings.ts\ninterface Config { apiUrl: string }\nconst cfg: Config = { apiUrl: \"/api\" };\n\nThen someone adds an unrelated"
url: "https://hashnode.com/posts/a-second-interface-config-in-another-file-just-changed-your-type-typescript-declaration-merging-tested/6af159d79c7abce20a963afc"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [A Second \`interface Config\` in Another File Just Changed Your Type: TypeScript Declaration Merging, Tested](https://ankitkhoiwal.hashnode.dev/a-second-interface-config-in-another-file-just-changed-your-type-typescript-declaration-merging-tested?utm_source=hashnode&utm_medium=feed)

Here's a bug that looks impossible at first. settings.ts compiles on its own: // settings.ts interface Config { apiUrl: string } const cfg: Config = { apiUrl: "/api" }; Then someone adds an unrelated

Nov 9 · 5 min read · ankitkhoiwal.hashnode.dev  
Read the article

-   [#typescript](https://hashnode.com/tag/typescript)
-   [#javascript](https://hashnode.com/tag/javascript)
-   [#web-development](https://hashnode.com/tag/web-development)
-   [#programming-languages](https://hashnode.com/tag/programming-languages)

## Written by

[Blogs World](https://hashnode.com/@blogs-world)

@blogs-world

  
[View profile](https://hashnode.com/@blogs-world)

Beyond the code, a story

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
