function validateSourceType(sourceType) {
	if (
		typeof sourceType !== "string" ||
		!/^(?:script|module|commonjs)$/u.test(sourceType)
	) {
		throw new TypeError(
			'Key "sourceType": Expected "script", "module", or "commonjs".',
		);
	}
}
Validates the sourceType property.
@param {string} sourceType The value to check.
@returns {void}
@throws {TypeError} If the value is invalid.