mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Export JsonPatch type
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
parent
2a8bc8d0bf
commit
877027ae72
@ -83,6 +83,8 @@ export type KubeApiDataFrom<K extends KubeObject, A> = A extends KubeApi<K, infe
|
||||
: never
|
||||
: never;
|
||||
|
||||
export type JsonPatch = Patch;
|
||||
|
||||
export abstract class KubeObjectStore<
|
||||
K extends KubeObject = KubeObject,
|
||||
A extends KubeApi<K, D> = KubeApi<K, KubeJsonApiDataFor<K>>,
|
||||
@ -385,7 +387,7 @@ export abstract class KubeObjectStore<
|
||||
return newItem;
|
||||
}
|
||||
|
||||
async patch(item: K, patch: Patch): Promise<K> {
|
||||
async patch(item: K, patch: JsonPatch): Promise<K> {
|
||||
const rawItem = await this.api.patch(
|
||||
{
|
||||
name: item.getName(), namespace: item.getNs(),
|
||||
|
||||
@ -26,6 +26,8 @@ export {
|
||||
KubeObject,
|
||||
KubeStatus,
|
||||
type KubeObjectMetadata,
|
||||
type NamespaceScopedMetadata,
|
||||
type ClusterScopedMetadata,
|
||||
type BaseKubeJsonApiObjectMetadata,
|
||||
type KubeJsonApiObjectMetadata,
|
||||
type KubeStatusData,
|
||||
@ -33,6 +35,7 @@ export {
|
||||
|
||||
export {
|
||||
KubeObjectStore,
|
||||
type JsonPatch,
|
||||
type KubeObjectStoreLoadAllParams,
|
||||
type KubeObjectStoreLoadingParams,
|
||||
type KubeObjectStoreSubscribeParams,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user