File size: 609 Bytes
bc20498 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
/**
Create an array of unique values, in order, from the input arrays.
@example
```
import arrayUnion = require('array-union');
arrayUnion([1, 1, 2, 3], [2, 3]);
//=> [1, 2, 3]
arrayUnion(['foo', 'foo', 'bar']);
//=> ['foo', 'bar']
arrayUnion(['π±', 'π¦', 'π»'], ['π¦', 'π']);
//=> ['π±', 'π¦', 'π»', 'π']
arrayUnion(['π±', 'π¦'], ['π»', 'π¦'], ['πΆ', 'π', 'π']);
//=> ['π±', 'π¦', 'π»', 'πΆ', 'π']
```
*/
declare function arrayUnion<ArgumentsType extends readonly unknown[]>(
...arguments: readonly ArgumentsType[]
): ArgumentsType;
export = arrayUnion;
|