How can I convert a Set to an Array in TypeScript How can I convert a Set to an Array in TypeScript arrays arrays

How can I convert a Set to an Array in TypeScript


You also can do

Array.from(my_set.values());


if you declare your set this way:

const mySet = new Set<string>();

you will be able to easily use:

let myArray = Array.from( mySet );