mergeMaps = (a, b) => {
	if (!b || b.size === 0) return /** @type {Map<T, K>} */ (a);
	if (!a || a.size === 0) return /** @type {Map<T, K>} */ (b);
	/** @type {Map<T, K>} */
	const map = new Map(a);
	for (const [key, value] of b) {
		map.set(key, value);
	}
	return map;
}
@template T
@template K
@param {Map<T, K> | undefined} a source map
@param {Map<T, K> | undefined} b joining map
@returns {Map<T, K>} joined map