RPC not working with getters

The error says that bar is not a function. I'm looking to call WORKER.foo.bar() instead of WORKER.foo().bar().
class Foo extends RpcTarget {
  bar() {
    return "baz"
  }
}

class WorkerEntrypoint {
  get foo() {
    return new Foo()
  }
}
Was this page helpful?