function ArraySubdocument(obj, parentArr, skipId, fields, index) {
  if (utils.isMongooseDocumentArray(parentArr)) {
    this.__parentArray = parentArr;
    this[documentArrayParent] = parentArr.$parent();
  } else {
    this.__parentArray = undefined;
    this[documentArrayParent] = undefined;
  }
  this.$setIndex(index);
  this.$__parent = this[documentArrayParent];

  let options;
  if (typeof skipId === 'object' && skipId != null) {
    options = { isNew: true, ...skipId };
    skipId = undefined;
  } else {
    options = { isNew: true };
  }

  Subdocument.call(this, obj, fields, this[documentArrayParent], skipId, options);
}
A constructor.

@param {Object} obj js object returned from the db
@param {MongooseDocumentArray} parentArr the parent array of this document
@param {Boolean} skipId
@param {Object} fields
@param {Number} index
@inherits Document
@api private