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:
parent
318d7fbe2b
commit
2217b681e9
@ -7,11 +7,7 @@ import userStoreInjectable from "./user-store.injectable";
|
|||||||
|
|
||||||
const kubeconfigSyncsInjectable = getInjectable({
|
const kubeconfigSyncsInjectable = getInjectable({
|
||||||
id: "kubeconfig-syncs",
|
id: "kubeconfig-syncs",
|
||||||
instantiate: (di) => {
|
instantiate: (di) => di.inject(userStoreInjectable).syncKubeconfigEntries,
|
||||||
const store = di.inject(userStoreInjectable);
|
|
||||||
|
|
||||||
return store.syncKubeconfigEntries;
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
|
|
||||||
export default kubeconfigSyncsInjectable;
|
export default kubeconfigSyncsInjectable;
|
||||||
|
|||||||
@ -4,6 +4,8 @@
|
|||||||
*/
|
*/
|
||||||
import { getInjectable } from "@ogre-tools/injectable";
|
import { getInjectable } from "@ogre-tools/injectable";
|
||||||
import { merge } from "lodash";
|
import { merge } from "lodash";
|
||||||
|
import type { ObservableMap } from "mobx";
|
||||||
|
import { observable } from "mobx";
|
||||||
import homeDirectoryPathInjectable from "../os/home-directory-path.injectable";
|
import homeDirectoryPathInjectable from "../os/home-directory-path.injectable";
|
||||||
import joinPathsInjectable from "../path/join-paths.injectable";
|
import joinPathsInjectable from "../path/join-paths.injectable";
|
||||||
import { defaultThemeId } from "../vars";
|
import { defaultThemeId } from "../vars";
|
||||||
@ -109,8 +111,8 @@ const userStorePreferenceDescriptorsInjectable = getInjectable({
|
|||||||
return res.length ? res : undefined;
|
return res.length ? res : undefined;
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
syncKubeconfigEntries: getPreferenceDescriptor<KubeconfigSyncEntry[], Map<string, KubeconfigSyncValue>>({
|
syncKubeconfigEntries: getPreferenceDescriptor<KubeconfigSyncEntry[], ObservableMap<string, KubeconfigSyncValue>>({
|
||||||
fromStore: val => new Map(
|
fromStore: val => observable.map(
|
||||||
val?.map(({ filePath, ...rest }) => [filePath, rest])
|
val?.map(({ filePath, ...rest }) => [filePath, rest])
|
||||||
?? [[mainKubeFolderPath, {}]],
|
?? [[mainKubeFolderPath, {}]],
|
||||||
),
|
),
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user