diff --git a/src/common/k8s-api/api-manager.ts b/src/common/k8s-api/api-manager.ts index 1dec033db3..2480506d37 100644 --- a/src/common/k8s-api/api-manager.ts +++ b/src/common/k8s-api/api-manager.ts @@ -27,7 +27,11 @@ import type { KubeApi } from "./kube-api"; import type { KubeObject } from "./kube-object"; import { IKubeObjectRef, parseKubeApi, createKubeApiURL } from "./kube-api-parse"; -export class ApiManager { +export interface IGettableStore { + getStore>(api: string | KubeApi): TKubeObjectStore | undefined; +} + +export class ApiManager implements IGettableStore { private apis = observable.map>(); private stores = observable.map>(); diff --git a/src/renderer/components/kube-object-menu/kube-object-menu.tsx b/src/renderer/components/kube-object-menu/kube-object-menu.tsx index 2116221f03..c7ec3d473a 100644 --- a/src/renderer/components/kube-object-menu/kube-object-menu.tsx +++ b/src/renderer/components/kube-object-menu/kube-object-menu.tsx @@ -26,8 +26,8 @@ import { MenuActions, MenuActionsProps } from "../menu/menu-actions"; import identity from "lodash/identity"; import type { KubeObjectMenuRegistry } from "../../../extensions/registries"; -import type { ApiManager } from "../../../common/k8s-api/api-manager"; import type { CatalogEntityRegistry } from "../../api/catalog-entity-registry"; +import type { IGettableStore } from "../../../common/k8s-api/api-manager"; export interface KubeObjectMenuProps extends MenuActionsProps { @@ -37,7 +37,7 @@ export interface KubeObjectMenuProps extends MenuActionsProps { } interface KubeObjectMenuDependencies extends KubeObjectMenuProps{ - apiManager: ApiManager, + apiManager: IGettableStore, hideDetails: Function, editResourceTab: Function, catalogEntityRegistry: CatalogEntityRegistry,