* Error on accessing private property through destructuring assignment, and mark property used * Factor out getTypeOfObjectLiteralDestructuringProperty
18 lines
249 B
TypeScript
18 lines
249 B
TypeScript
// @noUnusedLocals: true
|
|
|
|
class C {
|
|
private x = 0;
|
|
|
|
m(): number {
|
|
let x: number;
|
|
({ x } = this);
|
|
return x;
|
|
}
|
|
|
|
private f(): Function {
|
|
let f: Function;
|
|
({ f } = this);
|
|
return f;
|
|
}
|
|
}
|