docs: function callLifecycleHooksChildrenFirst(view, lifecycles) {
      if (!(view.def.nodeFlags & lifecycles)) {
          return;
      }
      var nodes = view.def.nodes;
      var initIndex = 0;
      for (var i = 0; i < nodes.length; i++) {
          var nodeDef = nodes[i];
          var parent_1 = nodeDef.parent;
          if (!parent_1 && nodeDef.flags & lifecycles) {
              // matching root node (e.g. a pipe)
              callProviderLifecycles(view, i, nodeDef.flags & lifecycles, initIndex++);
          }
          if ((nodeDef.childFlags & lifecycles) === 0) {
              // no child matches one of the lifecycles
              i += nodeDef.childCount;
          }
          while (parent_1 && (parent_1.flags & 1 /* TypeElement */) &&
              i === parent_1.nodeIndex + parent_1.childCount) {
              // last child of an element
              if (parent_1.directChildFlags & lifecycles) {
                  initIndex = callElementProvidersLifecycles(view, parent_1, lifecycles, initIndex);
              }
              parent_1 = parent_1.parent;
          }
      }
  }