mirror of
https://github.com/hanzoai/babel.git
synced 2026-09-24 16:56:45 +00:00
18 lines
326 B
JavaScript
18 lines
326 B
JavaScript
class Foo {
|
|
#client
|
|
|
|
constructor(props) {
|
|
this.#client = 1;
|
|
;([this.x = this.#client, this.#client, this.y = this.#client] = props);
|
|
}
|
|
|
|
getClient() {
|
|
return this.#client;
|
|
}
|
|
}
|
|
|
|
const foo = new Foo([undefined, 'bar']);
|
|
expect(foo.getClient()).toBe('bar');
|
|
expect(foo.x).toBe(1);
|
|
expect(foo.y).toBe('bar');
|