I am working on building plugins for a browser-based application where I'm building a typescript environment to reduce likelihood of breaking the application. For each plugin, I need to define configuration options - there is a based type for config, but each plugin can define their own unique options.
I need something like what I have below, but the problem is that this is affecting all plugins in my repo, not the single plugin I want it to affect. How can I restrict the type to only one plugin? Each plugin is a separate folder.
declare module "@/Type" {
interface VisionSymbolConfig { // if using this in Plugin A, all is good. But now Plugin B complains that it doesn't implement the interface
Height: number;
Width: number;
FontSize: number;
LinkText: string;
NewTab: boolean;
Color: string;
TextColor: string;
BorderColor: string;
}
interface VisionScope {
LinkLocation: string;
LinkTarget: string;
LinkText: string;
getSymbolStyles: () => any;
}
}