TypeScript Version: 2.0.2 (and 2.1.0-dev.20160830)
Code
// A *self-contained* demonstration of the problem follows...
let _value: SomeType;
let _other: OtherType;
({ value: _value, other: _other } = someFunction());
Expected behavior:
_value should be set to the value value returned in the result of someFunction()
same with _other
(this works in 2.0.0 and 2.0.0-dev.20160628)
Actual behavior:
Throws errors:
error: cannot find name 'value'
error: cannot find name 'other'
TypeScript Version:
2.0.2(and2.1.0-dev.20160830)Code
Expected behavior:
_valueshould be set to the valuevaluereturned in the result ofsomeFunction()same with
_other(this works in
2.0.0and2.0.0-dev.20160628)Actual behavior:
Throws errors:
error: cannot find name 'value'error: cannot find name 'other'