Organize some interfaces to communicate intent

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 0fc9fe626d
commit 550abfcc0d
2 files changed
+7 -8

No files matched your search

+4 -2
View File
@@ -37,10 +37,12 @@ import { ClusterMetadataKey, initialNodeShellImage, ClusterStatus } from "../com
import { disposer, storedKubeConfigFolder, toJS } from "../common/utils";
import type { Response } from "request";
export interface ICluster {
name: string
export interface IHasClusterName {
name: string;
}
export interface ICluster extends IHasClusterName {}
/**
* Cluster
*
@@ -20,18 +20,15 @@
*/
import { lifecycleEnum } from "@ogre-tools/injectable";
import type { ICluster } from "../../../../main/cluster";
import type { IHasClusterName } from "../../../../main/cluster";
import type { IInjectable } from "@ogre-tools/injectable";
import clusterInjectable from "./cluster.injectable";
interface IDependencies {
cluster: ICluster;
cluster: IHasClusterName;
}
const clusterNameInjectable: IInjectable<
string | undefined,
IDependencies
> = {
const clusterNameInjectable: IInjectable<string | undefined, IDependencies> = {
getDependencies: di => ({
cluster: di.inject(clusterInjectable),
}),