* Mark references to dynamically-named properties as used * Avoid showing the symbol ID * Use symbolToString instead of showSymbol
14 lines
215 B
TypeScript
14 lines
215 B
TypeScript
// @noUnusedLocals: true
|
|
// @lib: es6
|
|
|
|
const x = Symbol("x");
|
|
const y = Symbol("y");
|
|
class C {
|
|
private [x]: number;
|
|
private [y]: number;
|
|
m() {
|
|
this[x] = 0; // write-only
|
|
this[y];
|
|
}
|
|
}
|