isRange(start /*int*/, end /*int*/, value) {
			if (end < start || start < 0 || end > this.size) {
				throw new IllegalArgumentException();
			}
			if (end === start) {
				return true; // empty range matches
			}
			end--; // will be easier to treat this as the last actually set bit -- inclusive
			const firstInt = Math.floor(start / 32);
			const lastInt = Math.floor(end / 32);
			const bits = this.bits;
			for (let i = firstInt; i <= lastInt; i++) {
				const firstBit = i > firstInt ? 0 : start & 0x1F;
				const lastBit = i < lastInt ? 31 : end & 0x1F;
				// Ones from firstBit to lastBit, inclusive
				const mask = (2 << lastBit) - (1 << firstBit) & 0xFFFFFFFF;
				// TYPESCRIPTPORT: & 0xFFFFFFFF added to discard anything after 32 bits, as ES has 53 bits
				// Return false if we're looking for 1s and the masked bits[i] isn't all 1s (is: that,
				// equals the mask, or we're looking for 0s and the masked portion is not all 0s
				if ((bits[i] & mask) !== (value ? mask : 0)) {
					return false;
				}
			}
			return true;
		}
Efficient method to check if a range of bits is set, or not set.

@param start start of range, inclusive.
@param end end of range, exclusive
@param value if true, checks that bits in range are set, otherwise checks that they are not set
@return true iff all bits are set or not set in range, according to value argument
@throws IllegalArgumentException if end is less than start or the range is not contained in the array