function validateProtocolOptions(protocolOptions) {
  if (!protocolOptions) {
    throw new TypeError('protocolOptions not defined in options');
  }
  const version = protocolOptions.maxVersion;
  if (version && (typeof version !== 'number' || !types.protocolVersion.isSupported(version))) {
    throw new TypeError(util.format('protocolOptions.maxVersion provided (%s) is invalid', version));
  }
}
function validateProtocolOptions(protocolOptions) {
  if (!protocolOptions) {
    throw new TypeError('protocolOptions not defined in options');
  }
  const version = protocolOptions.maxVersion;
  if (version && (typeof version !== 'number' || !types.protocolVersion.isSupported(version))) {
    throw new TypeError(util.format('protocolOptions.maxVersion provided (%s) is invalid', version));
  }
}
function validateProtocolOptions ( protocolOptions ) { if ( ! protocolOptions ) { throw new TypeError ( 'protocolOptions not defined in options' ) ; } const version = protocolOptions . maxVersion ; if ( version && ( typeof version !== 'number' || ! types . protocolVersion . isSupported ( version ) ) ) { throw new TypeError ( util . format ( 'protocolOptions.maxVersion provided (%s) is invalid' , version ) ) ; } }
Validates the protocol options.
@param {ClientOptions.protocolOptions} protocolOptions
@private
Validates the protocol options .