export class PluginManager { private installedComponents = {} as any; private installedGraphs = {} as any; public installComponent(componentName: string, component: any) { this.installedComponents[componentName] = component; } public installGraph(graphName: string, graph: any) { this.installedGraphs[graphName] = graph; } public getComponent(componentName: string) { return this.installedComponents[componentName]; } public getGraph(graphName: string) { return this.installedGraphs[graphName]; } } export interface Plugin { install: (pluginManager: PluginManager) => void; } export const pluginManager = new PluginManager();