mirror of
https://github.com/wavetermdev/waveterm.git
synced 2024-12-21 16:38:23 +01:00
fix types for GlobalModel / GlobalCommandRunner so references work
This commit is contained in:
parent
2a4d85430a
commit
07abaa92fa
@ -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 };
|
||||
|
@ -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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user