function createWebpackErrorWithCause(message, options) {
	const error = new WebpackError(message, options);

	if (typeof error.cause === "undefined") {
		/** @type {WebpackErrorWithCause} */
		(error).cause = options.cause;
	}

	return error;
}
@param {string} message message
@param {{ cause: unknown }} options options
@returns {WebpackErrorWithCause} error with cause