Closed
Description
TypeScript Version: 1.8.10
Code
// A *self-contained* demonstration of the problem follows...
var array = [1, 2, 3];
[this.test, this.test2, this.test3] = array;
Expected behavior:
for it to compile as _this.test = array[0], _this.test2 = array[1], _this.test3 = array[2];
Actual behavior:
it compiles as _this.test = array[0], this.test2 = array[1], this.test3 = array[2];
This is a problem because the this
scope does not match correctly that of the lambda.