// Merge but don't remove the duplicationsconst merge = (a, b) => a.concat(b);// Orconst merge = (a, b) => [...a, ...b];// Merge and remove the duplicationsconst merge = (a, b) => [...new Set(a.concat(b))];// Orconst merge = (a, b) => [...new Set([...a, ...b])];
// Merge but don't remove the duplicationsconst merge = <T,_>(a: T[], b: T[]): T[] => a.concat(b);// Orconst merge = <T,_>(a: T[], b: T[]): T[] => [...a, ...b];// Merge and remove the duplicationsconst merge = <T,_>(a: T[], b: T[]): T[] => [...new Set(a.concat(b))];// Orconst merge = <T,_>(a: T[], b: T[]): T[] => [...new Set([...a, ...b])];