function validateLanguageOptions(languageOptions) {
	if (!isNonArrayObject(languageOptions)) {
		throw new TypeError("Expected an object.");
	}

	const {
		ecmaVersion,
		sourceType,
		globals,
		parser,
		parserOptions,
		...otherOptions
	} = languageOptions;

	if ("ecmaVersion" in languageOptions) {
		validateEcmaVersion(ecmaVersion);
	}

	if ("sourceType" in languageOptions) {
		validateSourceType(sourceType);
	}

	if ("globals" in languageOptions) {
		validateGlobals(globals);
	}

	if ("parser" in languageOptions) {
		validateParser(parser);
	}

	if ("parserOptions" in languageOptions) {
		if (!isNonArrayObject(parserOptions)) {
			throw new TypeError('Key "parserOptions": Expected an object.');
		}
	}

	const otherOptionKeys = Object.keys(otherOptions);

	if (otherOptionKeys.length > 0) {
		throw new TypeError(`Unexpected key "${otherOptionKeys[0]}" found.`);
	}
}
Validates the language options.
@param {Object} languageOptions The language options to validate.
@returns {void}
@throws {TypeError} If the language options are invalid.