* Enable `destructuringPrivate` plugiin * Add tests * Add changelog * Add more tests
13 lines
234 B
JavaScript
13 lines
234 B
JavaScript
class Foo {
|
|
#x = 1;
|
|
constructor() {
|
|
console.log(this.#x); // => 1
|
|
const { #x: x } = this;
|
|
console.log(x); // => 1
|
|
}
|
|
equals({ #x: otherX }) {
|
|
const { #x: currentX } = this;
|
|
return currentX === otherX;
|
|
}
|
|
}
|