Replacing types on interfaces

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
Alex Andreev committed 2021-06-19 15:54:15 +03:00
1 parent f8d2892a74
commit 1db1212ed9
3 files changed
+10 -9

No files matched your search

+2 -2
View File
@@ -23,9 +23,9 @@ import { navigate } from "../../renderer/navigation";
import { CatalogCategory, CatalogEntity, CatalogEntityMetadata, CatalogEntitySpec, CatalogEntityStatus } from "../catalog";
import { catalogCategoryRegistry } from "../catalog/catalog-category-registry";
type GeneralEntitySpec = {
interface GeneralEntitySpec extends CatalogEntitySpec {
path: string;
} & CatalogEntitySpec;
}
export class GeneralEntity extends CatalogEntity<CatalogEntityMetadata, CatalogEntityStatus, GeneralEntitySpec> {
public readonly apiVersion = "entity.k8slens.dev/v1alpha1";
@@ -30,7 +30,7 @@ import { app } from "electron";
import type { CatalogEntitySpec } from "../catalog/catalog-entity";
import { HotbarStore } from "../hotbar-store";
export type KubernetesClusterPrometheusMetrics = {
export interface KubernetesClusterPrometheusMetrics {
address?: {
namespace: string;
service: string;
@@ -38,16 +38,16 @@ export type KubernetesClusterPrometheusMetrics = {
prefix: string;
};
type?: string;
};
}
export type KubernetesClusterSpec = {
export interface KubernetesClusterSpec extends CatalogEntitySpec {
kubeconfigPath: string;
kubeconfigContext: string;
metrics?: {
source: string;
prometheus?: KubernetesClusterPrometheusMetrics;
}
} & CatalogEntitySpec;
}
export interface KubernetesClusterStatus extends CatalogEntityStatus {
phase: "connected" | "disconnected" | "deleting";
+4 -3
View File
@@ -147,13 +147,14 @@ export interface CatalogEntityAddMenuContext {
menuItems: CatalogEntityAddMenu[];
}
export type CatalogEntitySpec = {
export interface CatalogEntitySpec {
icon?: {
src?: string;
material?: string;
background?: string;
}
} & Record<string, any>;
};
[key: string]: any;
}
export interface CatalogEntityData<
Metadata extends CatalogEntityMetadata = CatalogEntityMetadata,