1
0
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:
Sebastian Malton 2022-07-06 12:53:00 -04:00
parent 2a8bc8d0bf
commit 877027ae72
2 changed files with 6 additions and 1 deletions

View File

@ -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(),

View File

@ -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,