X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftypings%2Futils.ts;h=24d43b2587007611a1836bc3a881e562e243f5c3;hb=66a36740044242568ae7868842eb36a920b21544;hp=4b5cf4d7e14d37b88fcb1706bc8845da3419ad75;hpb=5c5e587307a27e173333789b5b5167d35f468b01;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/typings/utils.ts b/server/typings/utils.ts index 4b5cf4d7e..24d43b258 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 +}