class Foo { #client constructor(props) { ;([this.#client] = props); } getClient() { return this.#client; } } const foo = new Foo(['bar']); expect(foo.getClient()).toBe('bar');