Fix build type errors

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton committed 2023-01-10 15:18:12 -05:00
1 parent 14f50a3f58
commit 6d0e5277aa
3 files changed
+9 -9

No files matched your search

+1 -4
View File
@@ -5,7 +5,6 @@
import { getInjectable } from "@ogre-tools/injectable";
import FormData from "form-data";
import type { Cluster } from "../common/cluster/cluster";
import { withTimeout } from "../common/fetch/timeout-controller";
import type { RequestMetricsParams } from "../common/k8s-api/endpoints/metrics.api/request-metrics.injectable";
import k8sRequestInjectable from "./k8s-request.injectable";
@@ -30,12 +29,10 @@ const getMetricsInjectable = getInjectable({
body.append(key, value);
}
const controller = withTimeout(60 * 1000); // 1 minute timeout
return k8sRequest(cluster, metricsPath, {
signal: controller.signal,
method: "POST",
body,
timeout: 60 * 1000,
});
};
},
@@ -13,11 +13,10 @@ const getVisibleWindowsInjectable = getInjectable({
instantiate: (di) => {
const getAllLensWindows = () => di.injectMany(applicationWindowInjectionToken);
return () =>
pipeline(
getAllLensWindows(),
filter((lensWindow) => !!lensWindow.isVisible),
);
return () => pipeline(
getAllLensWindows(),
filter((lensWindow) => !!lensWindow.isVisible),
);
},
});
@@ -29,6 +29,8 @@ describe("message-to-channel", () => {
start: async () => {},
close: () => {},
isVisible: true,
canGoBack: () => false,
canGoForward: () => false,
},
{
@@ -40,6 +42,8 @@ describe("message-to-channel", () => {
start: async () => {},
close: () => {},
isVisible: true,
canGoBack: () => false,
canGoForward: () => false,
},
]);