Although examples have demonstrated the merging of interfaces in a single file, I am facing challenges when trying to merge interfaces that are located in different files.
I want to clarify that I am not extending any modules, just interfaces.
/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 {}
My intention is to use the same interface name here because they represent identical interfaces. However, since I need to share the base interface with other modules, I cannot include FancyInstance there.