(raw: string | null)
| 10 | // ==================== Helpers ==================== |
| 11 | |
| 12 | function parseAliases(raw: string | null): string[] { |
| 13 | if (!raw) return [] |
| 14 | try { |
| 15 | const parsed = JSON.parse(raw) |
| 16 | if (!Array.isArray(parsed)) return [] |
| 17 | return parsed.filter((item): item is string => typeof item === 'string' && item.trim().length > 0) |
| 18 | } catch { |
| 19 | return [] |
| 20 | } |
| 21 | } |
| 22 | |
| 23 | // ==================== Public API ==================== |
| 24 |