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.