docs: function InheritDefinitionFeature(definition) {
      var superType = getSuperType(definition.type);
      var superDef = undefined;
      var _loop_1 = function () {
          var e_1, _a;
          if (isComponentDef(definition)) {
              superDef = superType.ngComponentDef || superType.ngDirectiveDef;
          }
          else {
              if (superType.ngComponentDef) {
                  throw new Error('Directives cannot inherit Components');
              }
              superDef = superType.ngDirectiveDef;
          }
          if (superDef) {
              // Merge inputs and outputs
              fillProperties(definition.inputs, superDef.inputs);
              fillProperties(definition.declaredInputs, superDef.declaredInputs);
              fillProperties(definition.outputs, superDef.outputs);
              // Merge hostBindings
              var prevHostBindings_1 = definition.hostBindings;
              var superHostBindings_1 = superDef.hostBindings;
              if (superHostBindings_1) {
                  if (prevHostBindings_1) {
                      definition.hostBindings = function (directiveIndex, elementIndex) {
                          superHostBindings_1(directiveIndex, elementIndex);
                          prevHostBindings_1(directiveIndex, elementIndex);
                      };
                  }
                  else {
                      definition.hostBindings = superHostBindings_1;
                  }
              }
              // Inherit hooks
              // Assume super class inheritance feature has already run.
              definition.afterContentChecked =
                  definition.afterContentChecked || superDef.afterContentChecked;
              definition.afterContentInit = definition.afterContentInit || superDef.afterContentInit;
              definition.afterViewChecked = definition.afterViewChecked || superDef.afterViewChecked;
              definition.afterViewInit = definition.afterViewInit || superDef.afterViewInit;
              definition.doCheck = definition.doCheck || superDef.doCheck;
              definition.onDestroy = definition.onDestroy || superDef.onDestroy;
              definition.onInit = definition.onInit || superDef.onInit;
              // Run parent features
              var features = superDef.features;
              if (features) {
                  try {
                      for (var features_1 = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__values"])(features), features_1_1 = features_1.next(); !features_1_1.done; features_1_1 = features_1.next()) {
                          var feature = features_1_1.value;
                          if (feature && feature !== InheritDefinitionFeature) {
                              feature(definition);
                          }
                      }
                  }
                  catch (e_1_1) { e_1 = { error: e_1_1 }; }
                  finally {
                      try {
                          if (features_1_1 && !features_1_1.done && (_a = features_1.return)) _a.call(features_1);
                      }
                      finally { if (e_1) throw e_1.error; }
                  }
              }
          }
          else {
              // Even if we don't have a definition, check the type for the hooks and use those if need be
              var superPrototype = superType.prototype;
              if (superPrototype) {
                  definition.afterContentChecked =
                      definition.afterContentChecked || superPrototype.afterContentChecked;
                  definition.afterContentInit =
                      definition.afterContentInit || superPrototype.afterContentInit;
                  definition.afterViewChecked =
                      definition.afterViewChecked || superPrototype.afterViewChecked;
                  definition.afterViewInit = definition.afterViewInit || superPrototype.afterViewInit;
                  definition.doCheck = definition.doCheck || superPrototype.doCheck;
                  definition.onDestroy = definition.onDestroy || superPrototype.onDestroy;
                  definition.onInit = definition.onInit || superPrototype.onInit;
              }
          }
          superType = Object.getPrototypeOf(superType);
      };
      while (superType && !superDef) {
          _loop_1();
      }
  }