Examples of interface merging shown it is possible to merge interface in single file. But I cannot merge interfaces when they are in different files.
Note that I'm not augmenting any modules, no modules, just interface.
/types/index.d.ts
export interface A { baseline: string }
/someFile.ts
import {A} from './types/index'; // <-- Error "Import declaration conflicts with local declaration of 'A'"
import {FancyInterface} from './SomeClass'
interface A {
someAdditionalFlavor: FancyInterface
}
export default class ABC implements A {}
I am intended to use the same interface name here, because they are literally the same interface, but since I am sharing the base interface with other modules, which I can't add FancyInstance there.