Fix type error

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton committed 2022-03-29 10:49:47 -04:00
1 parent db899cf3eb
commit 37da7d00eb
2 files changed
+3 -1

No files matched your search

+1 -1
View File
@@ -655,7 +655,7 @@ export class KubeApi<T extends KubeObject> {
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);
+2
View File
@@ -4,11 +4,13 @@
*/
import type { KubeJsonApiData } from "./kube-json-api";
import type { KubeStatusData } from "./kube-object";
export type IKubeWatchEvent<T extends KubeJsonApiData> = {
type: "ADDED" | "MODIFIED" | "DELETED";
object: T;
} | {
type: "ERROR";
object: KubeStatusData;
};