I am using following code to get unique numbers:
let uniques = [ ...new Set([1, 2, 3, 1, 1]) ]; // [1, 2, 3]
However, typescript report following error: Type 'Set' is not an array type.
I am not typescript ninja, could someone tell me what is wrong here?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…