TypeScript seems to not correctly support array literals spread operator.
Array.from example worked
const uniq1 = (list: Iterable<any>): Array<any> => Array.from(new Set<any>(list))
Array spread example broken
const uniq2 = (list: Iterable<any>): Array<any> => [...new Set<any>(list)]
The second example return the following error: Type 'Set' is not an array type.
Set? I think it's your own type which is not iterable and that's why it's not working. Please include more code.