1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Use PartialDeep for patch type.

Signed-off-by: Panu Horsmalahti <phorsmalahti@mirantis.com>
This commit is contained in:
Panu Horsmalahti 2021-11-25 09:40:02 +02:00
parent f02018c1e7
commit 9e9baba659

View File

@ -37,6 +37,7 @@ import type { RequestInit } from "node-fetch";
import AbortController from "abort-controller";
import { Agent, AgentOptions } from "https";
import type { Patch } from "rfc6902";
import type { PartialDeep } from "type-fest";
export interface IKubeApiOptions<T extends KubeObject> {
/**
@ -526,7 +527,7 @@ export class KubeApi<T extends KubeObject> {
return parsed;
}
async patch(desc: ResourceDescriptor, data?: Partial<T> | Patch, strategy: KubeApiPatchType = "strategic"): Promise<T | null> {
async patch(desc: ResourceDescriptor, data?: PartialDeep<T> | Patch, strategy: KubeApiPatchType = "strategic"): Promise<T | null> {
await this.checkPreferredVersion();
const apiUrl = this.getUrl(desc);