set(key_or_pairs, value_or_callback, callback) {
		let to_set = {};
		if (typeof key_or_pairs === "string") {
			to_set = {
				[key_or_pairs]: value_or_callback,
			};
		} else if (Array.isArray(key_or_pairs)) {
			throw new TypeError("Cannot set an array of keys (to what?)");
		} else {
			to_set = key_or_pairs;
			callback = /** @type {(error: Error) => void} */ (value_or_callback);
		}
		for (const key in to_set) {
			const value = to_set[key];
			try {
				localStorage.setItem(key, JSON.stringify(value));
			} catch (error) {
				error.quotaExceeded = error.code === 22 || error.name === "NS_ERROR_DOM_QUOTA_REACHED" || error.number === -2147024882;
				callback(error);
				return;
			}
		}
		return callback(null);
	}
See overrides in interface LocalStore.
@param {string | Record<string, string>} key_or_pairs
@param {string | ((error: Error) => void)} value_or_callback
@param {(error: Error) => void} [callback]