Yuki Takei 3 лет назад
Родитель
Сommit
0e3182097e

+ 2 - 2
packages/app/src/client/services/activate-plugin.ts

@@ -3,8 +3,8 @@ import { CustomWindow } from '~/interfaces/global';
 export class ActivatePluginService {
 
   static activateAll(): void {
-    const { activators } = window as CustomWindow;
-    Object.entries(activators).forEach(([, activator]) => {
+    const { pluginActivators } = window as CustomWindow;
+    Object.entries(pluginActivators).forEach(([, activator]) => {
       activator.activate();
     });
   }

+ 10 - 8
packages/app/src/interfaces/global.ts

@@ -6,12 +6,14 @@ import { IGraphViewer } from './graph-viewer';
 
 export type CustomWindow = Window
                         & typeof globalThis
-                        & { activators: {
-                          [key: string]: {
-                            activate: () => void,
-                            deactivate: () => void,
+                        & {
+                          pluginActivators: {
+                            [key: string]: {
+                              activate: () => void,
+                              deactivate: () => void,
+                            },
                           },
-                        } }
-                        & { growiFacade: GrowiFacade }
-                        & { globalEmitter: EventEmitter }
-                        & { GraphViewer: IGraphViewer };
+                          growiFacade: GrowiFacade,
+                          globalEmitter: EventEmitter,
+                          GraphViewer: IGraphViewer,
+                        }