隐藏委托

refactorgram

manager = aPerson.department.manager;

image/svg+xml

manager = aPerson.manager;

class Person {
  get manager() {return this.department.manager;}

的逆向操作是 移除中间人