static recommendVersion(ecLevel, mode, headerBits, dataBits) {
			// Hard part: need to know version to know how many bits length takes. But need to know how many
			// bits it takes to know version. First we take a guess at version by assuming version will be
			// the minimum, 1:
			const provisionalBitsNeeded = this.calculateBitsNeeded(mode, headerBits, dataBits, Version$1.getVersionForNumber(1));
			const provisionalVersion = this.chooseVersion(provisionalBitsNeeded, ecLevel);
			// Use that guess to calculate the right version. I am still not sure this works in 100% of cases.
			const bitsNeeded = this.calculateBitsNeeded(mode, headerBits, dataBits, provisionalVersion);
			return this.chooseVersion(bitsNeeded, ecLevel);
		}
Decides the smallest version of QR code that will contain all of the provided data.

@throws WriterException if the data cannot fit in any version