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

Fix type error

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton 2022-03-28 14:12:53 -04:00
parent db899cf3eb
commit 37da7d00eb
2 changed files with 3 additions and 1 deletions

View File

@ -655,7 +655,7 @@ export class KubeApi<T extends KubeObject> {
if (event.type === "ERROR" && event.object.kind === "Status") { if (event.type === "ERROR" && event.object.kind === "Status") {
errorReceived = true; errorReceived = true;
return callback(null, new KubeStatus(event.object as any)); return callback(null, new KubeStatus(event.object));
} }
this.modifyWatchEvent(event); this.modifyWatchEvent(event);

View File

@ -4,11 +4,13 @@
*/ */
import type { KubeJsonApiData } from "./kube-json-api"; import type { KubeJsonApiData } from "./kube-json-api";
import type { KubeStatusData } from "./kube-object";
export type IKubeWatchEvent<T extends KubeJsonApiData> = { export type IKubeWatchEvent<T extends KubeJsonApiData> = {
type: "ADDED" | "MODIFIED" | "DELETED"; type: "ADDED" | "MODIFIED" | "DELETED";
object: T; object: T;
} | { } | {
type: "ERROR"; type: "ERROR";
object: KubeStatusData;
}; };