function union
union<T>(...lists: T[][]): T[]

Returns the union of multiple arrays.

Examples

Example 1

union([1,2,3], [2,3,4]); // [1,2,3,4]
union(['a','b','c'], ['b','c','d']); // ['a','b','c','d']

Type Parameters

Parameters

...lists: T[][]

Return Type

T[]

Usage

import { union } from ".";