跳转到内容

去重

ts
/**
 * 数组去重
 */
export function unique<T extends any[]>(arr: T): T {
  return [...new Set(arr)] as T
}