<!-- 🚨 STOP 🚨 STOP 🚨 STOP 🚨 Half of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker. Even if you think you've found a *bug*, please read the FAQ first, especially the Common "Bugs" That Aren't Bugs section! Please help us by doing the following steps before logging an issue: * Search: https://github.com/Microsoft/TypeScript/search?type=Issues * Read the FAQ: https://github.com/Microsoft/TypeScript/wiki/FAQ Please fill in the *entire* template below. --> <!-- Please try to reproduce the issue with the latest published version. It may have already been fixed. For npm: `typescript@next` This is also the 'Nightly' version in the playground: http://www.typescriptlang.org/play/?ts=Nightly --> **TypeScript Version:** 3.9.6 <!-- Search terms you tried before logging this (so others can find this issue more easily) --> **Search Terms:** keyof declaration merging ts2339 **Code** ```ts // module-A interface Data { foo: string } export const keys = new Set<keyof Data>(['foo']) ``` **Expected behavior:** ```ts // emitted module-A/index.d.ts export interface Data { foo: string; } export declare const keys: Set<keyof Data>; ``` **Actual behavior:** ```ts // emitted module-A/index.d.ts export interface Data { foo: string; } export declare const keys: Set<"foo">; ``` ```ts // module-B declare module 'module-A' { interface Data { bar: number } } keys.add('bar') // error here (ts2339) ``` **Playground Link:** <!-- A link to a TypeScript Playground "Share" link which demonstrates this behavior --> **Related Issues:** <!-- Did you find other bugs that looked similar? -->