mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-16 23:10:29 +00:00
definitions for _.union
This commit is contained in:
@@ -154,6 +154,8 @@ result = <number>_.sortedIndex(['twenty', 'thirty', 'fifty'], 'fourty', function
|
||||
return this.wordToNumber[word];
|
||||
}, sortedIndexDict);
|
||||
|
||||
result = <number[]>_.union([1, 2, 3], [101, 2, 1, 10], [2, 1]);
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////
|
||||
//WHAT'S LEFT
|
||||
////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Vendored
+9
-7
@@ -549,6 +549,14 @@ declare module _ {
|
||||
value: T,
|
||||
whereValue: Dictionary<any>): number;
|
||||
|
||||
/**
|
||||
* Creates an array of unique values, in order, of the provided arrays using strict
|
||||
* equality for comparisons, i.e. ===.
|
||||
* @param arrays The arrays to inspect.
|
||||
* @return Returns an array of composite values.
|
||||
**/
|
||||
export function union<T>(...arrays: List<T>[]): T[];
|
||||
|
||||
/* *************
|
||||
* Collections *
|
||||
************* */
|
||||
@@ -1136,13 +1144,7 @@ declare module _ {
|
||||
array: List<T>,
|
||||
...values: T[]): T[];
|
||||
|
||||
/**
|
||||
* Computes the union of the passed-in arrays: the list of unique items, in order, that are
|
||||
* present in one or more of the arrays.
|
||||
* @param arrays Array of arrays to compute the union of.
|
||||
* @return The union of elements within `arrays`.
|
||||
**/
|
||||
export function union<T>(...arrays: List<T>[]): T[];
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user