How can I convert a Set to an Array in TypeScript
Fix
- Use tsconfig.json with
"lib": ["es6"]
More
- Google
lib
option. - I wrote some docs too : https://basarat.gitbooks.io/typescript/content/docs/types/lib.d.ts.html#lib-option
if you declare your set this way:
const mySet = new Set<string>();
you will be able to easily use:
let myArray = Array.from( mySet );