function genTypePartial(gen, field, fieldIndex, ref) {
    return field.resolvedType.group
        ? gen("types[%d].encode(%s,w.uint32(%d)).uint32(%d)", fieldIndex, ref, (field.id << 3 | 3) >>> 0, (field.id << 3 | 4) >>> 0)
        : gen("types[%d].encode(%s,w.uint32(%d).fork()).ldelim()", fieldIndex, ref, (field.id << 3 | 2) >>> 0);
}
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
@returns {Codegen} Codegen instance
@ignore