Commit 07d399f
Fix support for Node.js 4 (#2414)
As the code is transpiled to ES6, spread operator from TypeScript is transpiled to spread operator in JavaScript.
However this usage is not available in Node.js 4:
```TypeScript
let { normalizedPropertyName, projectConfigurations } = this.validateUpdatePropertyInfo(propertyName, propertyValues, configurations);
// Replaced with:
let data = this.validateUpdatePropertyInfo(propertyName, propertyValues, configurations),
normalizedPropertyName = data.normalizedPropertyName,
projectConfigurations = data.projectConfigurations;
```
This is limitation of Node.js 4 itself. Spread operator is not available there (it's available only for arrays, i.e.
```JavaScript
const arr = [ 1, 2, 3 ]
console.log([ 0, ...arr ]);
[ 0, 1, 2, 3 ]
```1 parent 68b4083 commit 07d399f
1 file changed
+5
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
30 | | - | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
31 | 34 | | |
32 | 35 | | |
33 | 36 | | |
| |||
0 commit comments