keyedNestedConfig = (value, fn, customKeys) => {
	/* eslint-disable no-sequences */
	const result =
		value === undefined
			? {}
			: Object.keys(value).reduce(
					(obj, key) => (
						(obj[key] = (
							customKeys && key in customKeys ? customKeys[key] : fn
						)(value[key])),
						obj
					),
					/** @type {Record<string, R>} */ ({})
				);
	/* eslint-enable no-sequences */
	if (customKeys) {
		for (const key of Object.keys(customKeys)) {
			if (!(key in result)) {
				result[key] = customKeys[key](/** @type {T} */ ({}));
			}
		}
	}
	return result;
}
@template T
@template R
@param {Record<string, T>|undefined} value value or not
@param {(value: T) => R} fn nested handler
@param {Record<string, (value: T) => R>=} customKeys custom nested handler for some keys
@returns {Record<string, R>} result value