How can I convert Set (for example, {2,4,6}) in Array [2, 4, 6] to TypeScript without writing a loop explicitly?
I tried the following methods, they all work in JavaScript, but none of them work on TypeScript
[...set] // ERR: "Type 'Set<{}>' is not an array type" in typescript Array.from(set) // ERR: Property 'from' does not exist on type 'ArrayConstructor'
arrays set typescript
thanhpk
source share