mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Revert breaking change to KubeObjectStore constructor
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
parent
fb4dca8e58
commit
4d408e6e30
@ -90,7 +90,7 @@ export abstract class KubeObjectStore<
|
||||
> extends ItemStore<K> {
|
||||
static readonly defaultContext = observable.box<ClusterContext>(); // TODO: support multiple cluster contexts
|
||||
|
||||
public readonly api: A;
|
||||
public readonly api!: A;
|
||||
public readonly limit: number | undefined;
|
||||
public readonly bufferSize: number;
|
||||
@observable private loadedNamespaces: string[] | undefined = undefined;
|
||||
@ -103,9 +103,18 @@ export abstract class KubeObjectStore<
|
||||
return when(() => Boolean(this.loadedNamespaces));
|
||||
}
|
||||
|
||||
constructor(api: A, opts?: KubeObjectStoreOptions) {
|
||||
constructor(api: A, opts?: KubeObjectStoreOptions);
|
||||
/**
|
||||
* @deprecated Supply API instance through constructor
|
||||
*/
|
||||
constructor();
|
||||
constructor(api?: A, opts?: KubeObjectStoreOptions) {
|
||||
super();
|
||||
this.api = api;
|
||||
|
||||
if (api) {
|
||||
this.api = api;
|
||||
}
|
||||
|
||||
this.limit = opts?.limit;
|
||||
this.bufferSize = opts?.bufferSize ?? 50_000;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user