TypeScript Version: 3.8.0-dev.20191228
Search Terms:
Code
class C{
#prop = 1;
method() {
const { #prop: prop } = this;
({ #prop: this.#prop } = this);
}
}
Expected behavior:
No error as the property is read by the destructuring binding and the destructuring assignment.
Actual behavior:
'#prop' is declared but its value is never read.(6133)
Playground Link: https://www.typescriptlang.org/play/?ts=3.8.0-dev.20191228&ssl=7&ssc=2&pln=1&pc=1#code/MYGwhgzhAEDCDeAoaLoGIAOAnA9h6AvNAIwDcyqAtgKYAuAFjgCYAUAlNEqt9MDgHYRandNjwAuaGPwBfQtAYBLCOR6oW8UbgySlEAHSZt0OUT1tVqGYhlA
Related Issues: #35934 /cc Max Heiber (@mheiber) Titian Cernicova-Dragomir (@dragomirtitian)
TypeScript Version: 3.8.0-dev.20191228
Search Terms:
Code
Expected behavior:
No error as the property is read by the destructuring binding and the destructuring assignment.
Actual behavior:
'#prop' is declared but its value is never read.(6133)Playground Link: https://www.typescriptlang.org/play/?ts=3.8.0-dev.20191228&ssl=7&ssc=2&pln=1&pc=1#code/MYGwhgzhAEDCDeAoaLoGIAOAnA9h6AvNAIwDcyqAtgKYAuAFjgCYAUAlNEqt9MDgHYRandNjwAuaGPwBfQtAYBLCOR6oW8UbgySlEAHSZt0OUT1tVqGYhlA
Related Issues: #35934 /cc Max Heiber (@mheiber) Titian Cernicova-Dragomir (@dragomirtitian)