export function choose>( value: keyof T, choices: T, ): U { return choices[value] } export function dedupArray(arr: T[]): T[] { const s = new Set(arr) return [...s] }