diff --git a/src/common/k8s-api/kube-api.ts b/src/common/k8s-api/kube-api.ts index 151e89f03d..54231b3947 100644 --- a/src/common/k8s-api/kube-api.ts +++ b/src/common/k8s-api/kube-api.ts @@ -655,7 +655,7 @@ export class KubeApi { if (event.type === "ERROR" && event.object.kind === "Status") { errorReceived = true; - return callback(null, new KubeStatus(event.object as any)); + return callback(null, new KubeStatus(event.object)); } this.modifyWatchEvent(event); diff --git a/src/common/k8s-api/kube-watch-event.ts b/src/common/k8s-api/kube-watch-event.ts index 8d9aac66bb..7332576560 100644 --- a/src/common/k8s-api/kube-watch-event.ts +++ b/src/common/k8s-api/kube-watch-event.ts @@ -4,11 +4,13 @@ */ import type { KubeJsonApiData } from "./kube-json-api"; +import type { KubeStatusData } from "./kube-object"; export type IKubeWatchEvent = { type: "ADDED" | "MODIFIED" | "DELETED"; object: T; } | { type: "ERROR"; + object: KubeStatusData; };