From 8dbc0b82f8d7aba06c05c12c65f54cde84e7c272 Mon Sep 17 00:00:00 2001 From: Jari Kolehmainen Date: Thu, 3 Mar 2022 19:26:56 +0200 Subject: [PATCH] Fix api-manager kubeobject types (#4959) * loosen api-manager kubeobject types Signed-off-by: Jari Kolehmainen * less any Signed-off-by: Jari Kolehmainen * less any Signed-off-by: Jari Kolehmainen * fix typings Signed-off-by: Jari Kolehmainen * fix typings Signed-off-by: Jari Kolehmainen --- src/common/k8s-api/api-manager.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/common/k8s-api/api-manager.ts b/src/common/k8s-api/api-manager.ts index d392673364..728ac8b61d 100644 --- a/src/common/k8s-api/api-manager.ts +++ b/src/common/k8s-api/api-manager.ts @@ -32,7 +32,7 @@ export class ApiManager { return iter.find(this.apis.values(), api => api.kind === kind && api.apiVersionWithGroup === apiVersion); } - registerApi(apiBase: string, api: KubeApi) { + registerApi(apiBase: string, api: KubeApi) { if (!api.apiBase) return; if (!this.apis.has(apiBase)) { @@ -46,13 +46,13 @@ export class ApiManager { } } - protected resolveApi(api?: string | KubeApi): KubeApi | undefined { + protected resolveApi(api?: string | KubeApi): KubeApi | undefined { if (!api) { return undefined; } if (typeof api === "string") { - return this.getApi(api) as KubeApi; + return this.getApi(api) as KubeApi; } return api; @@ -69,7 +69,7 @@ export class ApiManager { } @action - registerStore(store: KubeObjectStore, apis: KubeApi[] = [store.api]) { + registerStore(store: KubeObjectStore, apis: KubeApi[] = [store.api]) { apis.filter(Boolean).forEach(api => { if (api.apiBase) this.stores.set(api.apiBase, store); });