mirror of https://git.lenooby09.tech/LeNooby09/social-app.git
1export function choose<U, T extends Record<string, U>>( 2 value: keyof T, 3 choices: T, 4): U { 5 return choices[value] 6} 7 8export function dedupArray<T>(arr: T[]): T[] { 9 const s = new Set(arr) 10 return [...s] 11}