diff --git a/src/lib/utils/commons.ts b/src/lib/utils/commons.ts index b3c68dfbb5..0cf3618f37 100644 --- a/src/lib/utils/commons.ts +++ b/src/lib/utils/commons.ts @@ -13,7 +13,6 @@ export function clamp(value: number, min: number, max: number): number { // Can remove once we upgrade to TypesScript >= 3.5 export type Omit = Pick>; - /** * Replaces all properties on any type as optional, includes nested types * @@ -38,8 +37,8 @@ export type Omit = Pick>; export type RecursivePartial = { [P in keyof T]?: T[P] extends (infer U)[] ? RecursivePartial[] - : T[P] extends readonly (infer U)[] // eslint-disable-line prettier/prettier - ? readonly RecursivePartial[] + : T[P] extends ReadonlyArray // eslint-disable-line @typescript-eslint/array-type + ? ReadonlyArray> // eslint-disable-line @typescript-eslint/array-type : RecursivePartial };