text: /*
   * @Description: 类静态部分与实例部分
   * @Author: Cat
   * @Date: 2021-01-19 14:09:29
   * @LastEditTime: 2021-01-19 14:18:23
   * @LastEditor: Cat
   */
  function createClock(ctor, hour, minute) {
      return new ctor(hour, minute);
  }
  var DigitalClock = /** @class */ (function () {
      function DigitalClock(h, m) {
      }
      DigitalClock.prototype.tick = function () {
          console.log('beep beep');
      };
      return DigitalClock;
  }());
  var AnalogClock = /** @class */ (function () {
      function AnalogClock(h, m) {
      }
      AnalogClock.prototype.tick = function () {
          console.log('tick tock');
      };
      return AnalogClock;
  }());
  var digital = createClock(DigitalClock, 12, 17);
  var analog = createClock(AnalogClock, 7, 32);
  digital.tick();
  analog.tick();
  