( o: o )
| 21 | import type { ArkErrors } from "./errors.ts" |
| 22 | |
| 23 | export const makeRootAndArrayPropertiesMutable = <o extends object>( |
| 24 | o: o |
| 25 | ): makeRootAndArrayPropertiesMutable<o> => |
| 26 | // this cast should not be required, but it seems TS is referencing |
| 27 | // the wrong parameters here? |
| 28 | flatMorph(o as never, (k, v) => [k, isArray(v) ? [...v] : v]) as never |
| 29 | |
| 30 | export type makeRootAndArrayPropertiesMutable<inner> = { |
| 31 | -readonly [k in keyof inner]: inner[k] extends array | undefined ? |
no test coverage detected