code: function defineDelegates(cls, prototype) {
    const names = Object.getOwnPropertyNames(prototype);
    names.forEach(name => {
      const descriptor = Object.getOwnPropertyDescriptor(prototype, name);
      if (!descriptor) {
        return;
      }
      const delegate = createDelegate(name, descriptor);
      if (delegate) {
        Object.defineProperty(cls.prototype, name, delegate);
      }
    });
  }
docs: Define delegates for the given class for each property/method on the indicated prototype.