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

Update version of injectable for disambiguous typing

Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
This commit is contained in:
Janne Savolainen 2021-11-16 13:51:44 +02:00
parent d203c40c77
commit 98d63daef6

View File

@ -19,18 +19,26 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
import { KubeObjectMenu, KubeObjectMenuDependencies } from "./kube-object-menu";
import React from "react";
import {
KubeObjectMenu,
KubeObjectMenuDependencies,
KubeObjectMenuProps,
} from "./kube-object-menu";
import type { KubeObject } from "../../../common/k8s-api/kube-object";
import type { IComponentInjectable } from "@ogre-tools/injectable";
import type { IInjectable } from "@ogre-tools/injectable";
import apiManagerInjectable from "./dependencies/apiManager.injectable";
import clusterNameInjectable from "./dependencies/clusterName.injectable";
import clusterNameInjectable from "./dependencies/clusterName.injectable";
import kubeObjectMenuRegistryInjectable from "./dependencies/kubeObjectMenuRegistry.injectable";
import editResourceTabInjectable from "./dependencies/editResourceTab.injectable";
import hideDetailsInjectable from "./dependencies/hideDetails.injectable";
const KubeObjectMenuInjectable: IComponentInjectable<
typeof KubeObjectMenu,
KubeObjectMenuDependencies<KubeObject>
const KubeObjectMenuInjectable: IInjectable<
JSX.Element,
KubeObjectMenuDependencies<KubeObject>,
KubeObjectMenuProps<KubeObject>
> = {
getDependencies: di => ({
clusterName: di.inject(clusterNameInjectable),
@ -40,7 +48,9 @@ const KubeObjectMenuInjectable: IComponentInjectable<
hideDetails: di.inject(hideDetailsInjectable),
}),
instantiate: KubeObjectMenu,
instantiate: (dependencies, props) => (
<KubeObjectMenu<KubeObject> {...dependencies} {...props} />
),
};
export default KubeObjectMenuInjectable;