(items: T)
| 267 | } |
| 268 | |
| 269 | export function deepCopyArray<T extends Array<any>>(items: T): T { |
| 270 | return items.map((item: T[number]) => { |
| 271 | if (isObject(item)) { |
| 272 | return Array.isArray(item) ? deepCopyArray(item) : deepCopy(item); |
| 273 | } |
| 274 | |
| 275 | return item; |
| 276 | }) as T; |
| 277 | } |
| 278 | |
| 279 | export function deepCopy<T extends Record<string, any>>(obj: T) { |
| 280 | const resultObj = {} as T; |
no test coverage detected