Fix merge conflicts

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
This commit is contained in:
Janne Savolainen committed 2021-12-04 12:20:42 +02:00
1 parent 98d63daef6
commit 1707a95eef
15 files changed
+57 -61

No files matched your search

+1 -5
View File
@@ -24,11 +24,7 @@ import { action, observable, makeObservable } from "mobx";
import { Singleton } from "../../common/utils";
import { LensExtension } from "../lens-extension";
export interface IBaseRegistry<T> {
add(items: T | T[], extension?: LensExtension): () => void;
}
export class BaseRegistry<T, I = T> extends Singleton implements IBaseRegistry<T> {
export class BaseRegistry<T, I = T> extends Singleton {
private items = observable.map<T, I>([], { deep: false });
constructor() {
@@ -20,7 +20,7 @@
*/
import type React from "react";
import { BaseRegistry, IBaseRegistry } from "./base-registry";
import { BaseRegistry } from "./base-registry";
export interface KubeObjectMenuComponents {
MenuItem: React.ComponentType<any>;
@@ -32,11 +32,8 @@ export interface KubeObjectMenuRegistration {
components: KubeObjectMenuComponents;
}
export interface IKubeObjectMenuRegistry extends IBaseRegistry<KubeObjectMenuRegistration> {
getItemsForKind(kind: string, apiVersion: string): any;
}
export class KubeObjectMenuRegistry extends BaseRegistry<KubeObjectMenuRegistration> implements IKubeObjectMenuRegistry {
export class KubeObjectMenuRegistry extends BaseRegistry<KubeObjectMenuRegistration> {
getItemsForKind = (kind: string, apiVersion: string) =>
this.getItems().filter((item) =>
item.kind === kind && item.apiVersions.includes(apiVersion),