mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
chore: Fix type errors
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
parent
8991e5daa1
commit
f21e42d7e7
@ -45,7 +45,7 @@ const NonInjectedAddingOfPublicHelmRepository = observer(({
|
||||
isLoading={valuesAreLoading}
|
||||
isDisabled={valuesAreLoading}
|
||||
options={repositoryOptions}
|
||||
onChange={(...args) => void selectRepository(...args)}
|
||||
onChange={(value) => void selectRepository(value)}
|
||||
value={dereferencesPublicRepositories}
|
||||
formatOptionLabel={formatOptionLabel}
|
||||
controlShouldRenderValue={false}
|
||||
|
||||
@ -12,7 +12,7 @@ const emitTelemetryInjectable = getInjectable({
|
||||
instantiate: (di) => {
|
||||
const emitEvent = di.inject(emitEventInjectable);
|
||||
|
||||
return ({ action, params }: { action: string; params?: object }) => {
|
||||
return ({ action, params }: { action: string; params?: Record<string, unknown> }) => {
|
||||
emitEvent({
|
||||
destination: "auto-capture",
|
||||
action: "telemetry-from-business-action",
|
||||
|
||||
@ -21,6 +21,7 @@ import createListNamespacesInjectable from "../../common/cluster/list-namespaces
|
||||
import prometheusHandlerInjectable from "../cluster/prometheus-handler/prometheus-handler.injectable";
|
||||
import writeJsonSyncInjectable from "../../common/fs/write-json-sync.injectable";
|
||||
import addClusterInjectable from "../../features/cluster/storage/common/add.injectable";
|
||||
import assert from "assert";
|
||||
|
||||
describe("create clusters", () => {
|
||||
let cluster: Cluster;
|
||||
@ -75,11 +76,15 @@ describe("create clusters", () => {
|
||||
|
||||
const addCluster = di.inject(addClusterInjectable);
|
||||
|
||||
cluster = addCluster({
|
||||
const clusterResult = addCluster({
|
||||
id: "foo",
|
||||
contextName: "minikube",
|
||||
kubeConfigPath: "/minikube-config.yml",
|
||||
});
|
||||
|
||||
assert(clusterResult.isOk);
|
||||
|
||||
cluster = clusterResult.value;
|
||||
clusterConnection = di.inject(clusterConnectionInjectable, cluster);
|
||||
});
|
||||
|
||||
|
||||
@ -10,12 +10,11 @@ import type { Disposer } from "@k8slens/utilities";
|
||||
import { iter } from "@k8slens/utilities";
|
||||
import type { Logger } from "@k8slens/logger";
|
||||
import type { WatchKubeconfigFileChanges } from "./watch-file-changes.injectable";
|
||||
import type { KubeconfigSyncValue } from "../../../features/user-preferences/common/preferences-helpers";
|
||||
|
||||
interface KubeconfigSyncManagerDependencies {
|
||||
readonly directoryForKubeConfigs: string;
|
||||
readonly logger: Logger;
|
||||
readonly kubeconfigSyncs: ObservableMap<string, KubeconfigSyncValue>;
|
||||
readonly kubeconfigSyncs: ObservableMap<string, object>;
|
||||
watchKubeconfigFileChanges: WatchKubeconfigFileChanges;
|
||||
}
|
||||
|
||||
|
||||
@ -18,7 +18,7 @@ export class ShellRequestAuthenticator {
|
||||
const authToken = Uint8Array.from(await randomBytes(128));
|
||||
const forCluster = getOrInsertMap(this.tokens, clusterId);
|
||||
|
||||
forCluster.set(tabId, authToken);
|
||||
forCluster.set(tabId as string, authToken);
|
||||
|
||||
return authToken;
|
||||
});
|
||||
|
||||
@ -8,7 +8,7 @@ import type React from "react";
|
||||
|
||||
export interface WorkloadOverviewDetail {
|
||||
orderNumber: number;
|
||||
Component: React.ElementType<object>;
|
||||
Component: React.ElementType;
|
||||
enabled: IComputedValue<boolean>;
|
||||
}
|
||||
|
||||
|
||||
@ -65,8 +65,8 @@ export class PortForwardStore extends ItemStore<PortForwardItem> {
|
||||
);
|
||||
}
|
||||
|
||||
loadAll() {
|
||||
return this.loadItems(() => {
|
||||
async loadAll() {
|
||||
await this.loadItems(() => {
|
||||
const portForwards = this.getPortForwards();
|
||||
|
||||
this.dependencies.storage.set(portForwards);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user