mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Fix incorrect typing in test
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
This commit is contained in:
parent
7938e9c4ef
commit
53dc2c853d
@ -24,7 +24,11 @@ import { action, observable, makeObservable } from "mobx";
|
||||
import { Singleton } from "../../common/utils";
|
||||
import { LensExtension } from "../lens-extension";
|
||||
|
||||
export class BaseRegistry<T, I = T> extends Singleton {
|
||||
export interface IBaseRegistry<T> {
|
||||
add(items: T | T[], extension?: LensExtension): () => void;
|
||||
}
|
||||
|
||||
export class BaseRegistry<T, I = T> extends Singleton implements IBaseRegistry<T> {
|
||||
private items = observable.map<T, I>([], { deep: false });
|
||||
|
||||
constructor() {
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
*/
|
||||
|
||||
import type React from "react";
|
||||
import { BaseRegistry } from "./base-registry";
|
||||
import { BaseRegistry, IBaseRegistry } from "./base-registry";
|
||||
|
||||
export interface KubeObjectMenuComponents {
|
||||
MenuItem: React.ComponentType<any>;
|
||||
@ -32,7 +32,7 @@ export interface KubeObjectMenuRegistration {
|
||||
components: KubeObjectMenuComponents;
|
||||
}
|
||||
|
||||
export interface IKubeObjectMenuRegistry {
|
||||
export interface IKubeObjectMenuRegistry extends IBaseRegistry<KubeObjectMenuRegistration> {
|
||||
getItemsForKind(kind: string, apiVersion: string): any;
|
||||
}
|
||||
|
||||
|
||||
@ -292,7 +292,7 @@ const addDynamicMenuItem = ({
|
||||
apiVersions,
|
||||
kind,
|
||||
}: {
|
||||
di: any;
|
||||
di: IConfigurableDependencyInjectionContainer;
|
||||
apiVersions: string[];
|
||||
kind: string;
|
||||
}) => {
|
||||
@ -304,7 +304,7 @@ const addDynamicMenuItem = ({
|
||||
components: { MenuItem: MenuItemComponent },
|
||||
};
|
||||
|
||||
const kubeObjectMenuRegistry: KubeObjectMenuRegistry = di.inject(
|
||||
const kubeObjectMenuRegistry = di.inject(
|
||||
kubeObjectMenuRegistryInjectable,
|
||||
);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user