mirror of
https://github.com/wavetermdev/backup.git
synced 2026-08-05 13:57:07 -07:00
fix types for GlobalModel / GlobalCommandRunner so references work
This commit is contained in:
@@ -8,7 +8,7 @@ import { GlobalModel } from "./global";
|
||||
class CommandRunner {
|
||||
private constructor() {}
|
||||
|
||||
static getInstance() {
|
||||
static getInstance(): CommandRunner {
|
||||
if (!(window as any).GlobalCommandRunner) {
|
||||
(window as any).GlobalCommandRunner = new CommandRunner();
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Model } from "./model";
|
||||
import { CommandRunner } from "./commandrunner";
|
||||
|
||||
const GlobalModel = Model.getInstance();
|
||||
const GlobalCommandRunner = CommandRunner.getInstance();
|
||||
const GlobalModel: Model = Model.getInstance();
|
||||
const GlobalCommandRunner: CommandRunner = CommandRunner.getInstance();
|
||||
export { GlobalModel, GlobalCommandRunner };
|
||||
|
||||
+1
-1
@@ -241,7 +241,7 @@ class Model {
|
||||
setTimeout(() => this.getClientDataLoop(1), 10);
|
||||
}
|
||||
|
||||
static getInstance() {
|
||||
static getInstance(): Model {
|
||||
if (!(window as any).GlobalModel) {
|
||||
(window as any).GlobalModel = new Model();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user