function readRecordLabel(bufferReader, name) {
  const start = bufferReader.index;
  const { value, type } = readTypeAndMaybeValue(bufferReader, name);
  if (type === 'selector' || type === 'string' || type === 'bytestring') {
    // @ts-expect-error type system is not smart enough
    return { value, type };
  }
  throw Error(
    `Unexpected type ${quote(type)}, Syrup record labels must be strings, selectors, or bytestrings at index ${start} of ${name}`,
  );
}
@param {BufferReader} bufferReader
@param {string} name
@returns {{value: string, type: 'selector'} | {value: Uint8Array, type: 'bytestring'} | {value: string, type: 'string'}}
see https://github.com/ocapn/syrup/issues/22