Skip to content

Commit 1997dfd

Browse files
authored
Merge pull request #1002 from emeraldsanto/master
maintenance: added types to `KubeConfig#loadFromOptions` input
2 parents b30b3b9 + 3b28fed commit 1997dfd

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/config.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,12 @@ export class KubeConfig {
180180
this.currentContext = obj['current-context'];
181181
}
182182

183-
public loadFromOptions(options: any): void {
183+
public loadFromOptions(options: {
184+
clusters: Cluster[];
185+
contexts: Context[];
186+
currentContext: Context['name'];
187+
users: User[];
188+
}): void {
184189
this.clusters = options.clusters;
185190
this.contexts = options.contexts;
186191
this.users = options.users;

src/config_types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export interface Cluster {
2121
readonly caData?: string;
2222
caFile?: string;
2323
readonly server: string;
24-
readonly skipTLSVerify: boolean;
24+
readonly skipTLSVerify?: boolean;
2525
readonly tlsServerName?: string;
2626
}
2727

0 commit comments

Comments
 (0)