1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Fix type errors

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton 2022-11-16 15:14:04 -05:00
parent 022024f66f
commit fd1cb89d94
3 changed files with 12 additions and 4 deletions

View File

@ -7,6 +7,7 @@ import clusterStoreInjectable from "../../common/cluster-store/cluster-store.inj
import catalogEntityRegistryInjectable from "../catalog/entity-registry.injectable";
import clustersThatAreBeingDeletedInjectable from "./are-being-deleted.injectable";
import { ClusterManager } from "./manager";
import visibleClusterInjectable from "./visible-cluster.injectable";
const clusterManagerInjectable = getInjectable({
id: "cluster-manager",
@ -15,6 +16,7 @@ const clusterManagerInjectable = getInjectable({
store: di.inject(clusterStoreInjectable),
catalogEntityRegistry: di.inject(catalogEntityRegistryInjectable),
clustersThatAreBeingDeleted: di.inject(clustersThatAreBeingDeletedInjectable),
visibleCluster: di.inject(visibleClusterInjectable),
}),
});

View File

@ -5,7 +5,7 @@
import "../../common/ipc/cluster";
import type http from "http";
import type { ObservableSet } from "mobx";
import type { IObservableValue, ObservableSet } from "mobx";
import { action, makeObservable, observe, reaction, toJS } from "mobx";
import type { Cluster } from "../../common/cluster/cluster";
import logger from "../logger";
@ -18,7 +18,6 @@ import { once } from "lodash";
import type { ClusterStore } from "../../common/cluster-store/cluster-store";
import type { ClusterId } from "../../common/cluster-types";
import type { CatalogEntityRegistry } from "../catalog";
import type { ObservableValue } from "mobx/dist/internal";
const logPrefix = "[CLUSTER-MANAGER]:";
@ -28,7 +27,7 @@ interface Dependencies {
readonly store: ClusterStore;
readonly catalogEntityRegistry: CatalogEntityRegistry;
readonly clustersThatAreBeingDeleted: ObservableSet<ClusterId>;
readonly visibleCluster: ObservableValue<ClusterId | null>;
readonly visibleCluster: IObservableValue<ClusterId | null>;
}
export class ClusterManager {

View File

@ -3,11 +3,18 @@
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import { getInjectable } from "@ogre-tools/injectable";
import getClusterByIdInjectable from "../../../common/cluster-store/get-by-id.injectable";
import loggerInjectable from "../../../common/logger.injectable";
import { ClusterFrameHandler } from "./cluster-frame-handler";
import emitClusterVisibilityInjectable from "./emit-cluster-visibility.injectable";
const clusterFrameHandlerInjectable = getInjectable({
id: "cluster-frame-handler",
instantiate: () => new ClusterFrameHandler(),
instantiate: (di) => new ClusterFrameHandler({
emitClusterVisibility: di.inject(emitClusterVisibilityInjectable),
getClusterById: di.inject(getClusterByIdInjectable),
logger: di.inject(loggerInjectable),
}),
});
export default clusterFrameHandlerInjectable;