Quantcast
Channel: Active questions tagged visual-studio-code - Stack Overflow
Viewing all articles
Browse latest Browse all 98406

the syntax requires an imported helper named __spreadArrays

$
0
0

When I'm trying to use spreading in typescript like:

.reduce((unique, x) => {
    unique.some(element => element.machineName === x.machineName) ? unique : [...unique, x];
}

I get warning with red marking from Visual Studio Code:

the syntax requires an imported helper named __spreadArrays

typescript version: "2.3.4"
target: "es5"

I think in later versions this issue is fixed, but right now I can't migrate. How can I fix it?

Note: Project gets compiled fine and works. But red underlying in VS Code in annoying.


Viewing all articles
Browse latest Browse all 98406

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>