移除中间人

refactorgram

manager = aPerson.manager;

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

image/svg+xml

manager = aPerson.department.manager;

相反的 隐藏委托