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