X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftypings%2Futils.ts;h=1abb4f73e3a4747ee6930b648f21b005a5d8d9da;hb=8424c4026afd7304880a4ce8138a04ffb3d8c938;hp=4b5cf4d7e14d37b88fcb1706bc8845da3419ad75;hpb=1ca9f7c3f7afac2af4c4c25b98426731f7e789c6;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/typings/utils.ts b/server/typings/utils.ts index 4b5cf4d7e..1abb4f73e 100644 --- a/server/typings/utils.ts +++ b/server/typings/utils.ts @@ -11,3 +11,12 @@ export type PickWith = { export type PickWithOpt = { [P in KT]?: T[P] extends V ? V : never } + +// https://github.com/krzkaczor/ts-essentials Rocks! +export type DeepPartial = { + [P in keyof T]?: T[P] extends Array + ? Array> + : T[P] extends ReadonlyArray + ? ReadonlyArray> + : DeepPartial +};