(value: unknown)
| 80 | } |
| 81 | |
| 82 | function toStringArrayOrUndefined(value: unknown): readonly string[] | undefined { |
| 83 | if (value === undefined || value === null) return undefined; |
| 84 | if (!Array.isArray(value)) return undefined; |
| 85 | const out: string[] = []; |
| 86 | for (const item of value) { |
| 87 | if (typeof item !== 'string') return undefined; |
| 88 | out.push(item); |
| 89 | } |
| 90 | return out; |
| 91 | } |
| 92 | |
| 93 | function toModelEntry(value: unknown): CustomRegistryModelEntry | undefined { |
| 94 | if (!isRecord(value)) return undefined; |
no test coverage detected