code: function genTypePartial(gen, field, fieldIndex, ref) {
    return field.resolvedType.group ?
      gen('types[%i].encode(%s,w.uint32(%i)).uint32(%i)', fieldIndex, ref, (field.id << 3 | 3) >>> 0, (field.id << 3 | 4) >>> 0) :
      gen('types[%i].encode(%s,w.uint32(%i).fork()).ldelim()', fieldIndex, ref, (field.id << 3 | 2) >>> 0);
  }
docs: Generates a partial message type encoder.
  @param {Codegen} gen Codegen instance
  @param {Field} field Reflected field
  @param {number} fieldIndex Field index
  @param {string} ref Variable reference
  @return {Codegen} Codegen instance
  @ignore