(config: config)
| 20 | * arktype reads one by identity, and so is any other instance, like a Date |
| 21 | */ |
| 22 | export const copyConfig = <config extends object>(config: config): config => { |
| 23 | const copy: Record<string, unknown> = {} |
| 24 | for (const k in config) { |
| 25 | const v = config[k] |
| 26 | copy[k] = k === "locale" ? v : copyPlain(v) |
| 27 | } |
| 28 | return copy as never |
| 29 | } |
| 30 | |
| 31 | /** |
| 32 | * whether a config changes nothing of what's applied, as when a test runner |
no test coverage detected