export type RequiredProps = T & { [P in K]-?: T[P]; }; export const getLongest = (words: string[]) => Math.max(...words.map(({ length }) => length)); export const scase = (text: string) => `${text[0].toUpperCase()}${text.slice(1).toLowerCase()}`; export const uniqify = (arr: T[]) => [...new Set(arr)];