MCPcopy Create free account
hub / github.com/arktypeio/arktype / makeRootAndArrayPropertiesMutable

Function makeRootAndArrayPropertiesMutable

ark/schema/shared/utils.ts:23–28  ·  view source on GitHub ↗
(
	o: o
)

Source from the content-addressed store, hash-verified

21import type { ArkErrors } from "./errors.ts"
22
23export 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
30export type makeRootAndArrayPropertiesMutable<inner> = {
31 -readonly [k in keyof inner]: inner[k] extends array | undefined ?

Callers 3

parseTupleLiteralFunction · 0.90
withoutKeysOfMethod · 0.90
filterKeysMethod · 0.90

Calls 1

flatMorphFunction · 0.90

Tested by

no test coverage detected