writeSyncStep2 = (encoder, doc, encodedStateVector) => {
  encoding.writeVarUint(encoder, messageYjsSyncStep2);
  encoding.writeVarUint8Array(encoder, Y.encodeStateAsUpdate(doc, encodedStateVector));
}
@param {encoding.Encoder} encoder
@param {Y.Doc} doc
@param {Uint8Array} [encodedStateVector]