error TS2802: Type ‘
Set<string>‘ can only be iterated through when using the ‘–downlevelIteration’ flag or with a ‘–target’ of ‘es2015’ or higher.
Broken Code ❌
Fixed Code ✔️
In order to resolve the issue, you need to use a higher target environment that is more recent than ES5, such as ES6 for example: