typeListForEach = (type, f) => {
  let index = 0;
  let n = type._start;

  while (n !== null) {
    if (n.countable && !n.deleted) {
      const c = n.content.getContent();

      for (let i = 0; i < c.length; i++) {
        f(c[i], index++, type);
      }
    }

    n = n.right;
  }
}
Executes a provided function on once on overy element of this YArray.

@param {AbstractType<any>} type
@param {function(any,number,any):void} f A function to execute on every element of this YArray.

@private
@function