lodash: Reduce number of files (#23672)

This commit is contained in:
Andy
2018-02-15 13:25:49 -08:00
committed by GitHub
parent b949172739
commit 81b3b60696
324 changed files with 17251 additions and 17567 deletions
-37
View File
@@ -1,37 +0,0 @@
import _ = require("../index");
declare module "../index" {
interface LoDashStatic {
/**
* Creates an array of elements split into groups the length of size. If collection can’t be split evenly, the
* final chunk will be the remaining elements.
*
* @param array The array to process.
* @param size The length of each chunk.
* @return Returns the new array containing chunks.
*/
chunk<T>(
array: List<T> | null | undefined,
size?: number
): T[][];
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.chunk
*/
chunk<T>(
this: LoDashImplicitWrapper<List<T> | null | undefined>,
size?: number,
): LoDashImplicitWrapper<T[][]>;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.chunk
*/
chunk<T>(
this: LoDashExplicitWrapper<List<T> | null | undefined>,
size?: number,
): LoDashExplicitWrapper<T[][]>;
}
}
-27
View File
@@ -1,27 +0,0 @@
import _ = require("../index");
declare module "../index" {
interface LoDashStatic {
/**
* Creates an array with all falsey values removed. The values false, null, 0, "", undefined, and NaN are
* falsey.
*
* @param array The array to compact.
* @return Returns the new array of filtered values.
*/
compact<T>(array: List<T | null | undefined | false | "" | 0> | null | undefined): T[];
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.compact
*/
compact<T>(this: LoDashImplicitWrapper<List<T | null | undefined | false | "" | 0> | null | undefined>): LoDashImplicitWrapper<T[]>;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.compact
*/
compact<T>(this: LoDashExplicitWrapper<List<T | null | undefined | false | "" | 0> | null | undefined>): LoDashExplicitWrapper<T[]>;
}
}
-39
View File
@@ -1,39 +0,0 @@
import _ = require("../index");
declare module "../index" {
interface LoDashStatic {
/**
* Creates a new array concatenating `array` with any additional arrays
* and/or values.
*
* @category Array
* @param array The array to concatenate.
* @param [values] The values to concatenate.
* @returns Returns the new concatenated array.
* @example
*
* var array = [1];
* var other = _.concat(array, 2, [3], [[4]]);
*
* console.log(other);
* // => [1, 2, 3, [4]]
*
* console.log(array);
* // => [1]
*/
concat<T>(array: Many<T>, ...values: Array<Many<T>>): T[];
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.compact
*/
concat<T>(this: LoDashImplicitWrapper<Many<T>>, ...values: Array<Many<T>>): LoDashImplicitWrapper<T[]>;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.compact
*/
concat<T>(this: LoDashExplicitWrapper<Many<T>>, ...values: Array<Many<T>>): LoDashExplicitWrapper<T[]>;
}
}
-37
View File
@@ -1,37 +0,0 @@
import _ = require("../index");
declare module "../index" {
interface LoDashStatic {
/**
* Creates an array of unique array values not included in the other provided arrays using SameValueZero for
* equality comparisons.
*
* @param array The array to inspect.
* @param values The arrays of values to exclude.
* @return Returns the new array of filtered values.
*/
difference<T>(
array: List<T> | null | undefined,
...values: Array<List<T>>
): T[];
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.difference
*/
difference<T>(
this: LoDashImplicitWrapper<List<T> | null | undefined>,
...values: Array<List<T>>
): LoDashImplicitWrapper<T[]>;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.difference
*/
difference<T>(
this: LoDashExplicitWrapper<List<T> | null | undefined>,
...values: Array<List<T>>
): LoDashExplicitWrapper<T[]>;
}
}
-243
View File
@@ -1,243 +0,0 @@
import _ = require("../index");
declare module "../index" {
interface LoDashStatic {
/**
* This method is like _.difference except that it accepts iteratee which is invoked for each element of array
* and values to generate the criterion by which uniqueness is computed. The iteratee is invoked with one
* argument: (value).
*
* @param array The array to inspect.
* @param values The values to exclude.
* @param iteratee The iteratee invoked per element.
* @returns Returns the new array of filtered values.
*/
differenceBy<T1, T2>(
array: List<T1> | null | undefined,
values: List<T2>,
iteratee: ValueIteratee<T1 | T2>
): T1[];
/**
* @see _.differenceBy
*/
differenceBy<T1, T2, T3>(
array: List<T1> | null | undefined,
values1: List<T2>,
values2: List<T3>,
iteratee: ValueIteratee<T1 | T2 | T3>
): T1[];
/**
* @see _.differenceBy
*/
differenceBy<T1, T2, T3, T4>(
array: List<T1> | null | undefined,
values1: List<T2>,
values2: List<T3>,
values3: List<T4>,
iteratee: ValueIteratee<T1 | T2 | T3 | T4>
): T1[];
/**
* @see _.differenceBy
*/
differenceBy<T1, T2, T3, T4, T5>(
array: List<T1> | null | undefined,
values1: List<T2>,
values2: List<T3>,
values3: List<T4>,
values4: List<T5>,
iteratee: ValueIteratee<T1 | T2 | T3 | T4 | T5>
): T1[];
/**
* @see _.differenceBy
*/
differenceBy<T1, T2, T3, T4, T5, T6>(
array: List<T1> | null | undefined,
values1: List<T2>,
values2: List<T3>,
values3: List<T4>,
values4: List<T5>,
values5: List<T6>,
iteratee: ValueIteratee<T1 | T2 | T3 | T4 | T5 | T6>
): T1[];
/**
* @see _.differenceBy
*/
differenceBy<T1, T2, T3, T4, T5, T6, T7>(
array: List<T1> | null | undefined,
values1: List<T2>,
values2: List<T3>,
values3: List<T4>,
values4: List<T5>,
values5: List<T6>,
...values: Array<List<T7> | ValueIteratee<T1 | T2 | T3 | T4 | T5 | T6 | T7>>
): T1[];
/**
* @see _.differenceBy
*/
differenceBy<T>(
array: List<T> | null | undefined,
...values: Array<List<T>>
): T[];
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.differenceBy
*/
differenceBy<T1, T2>(
this: LoDashImplicitWrapper<List<T1> | null | undefined>,
values: List<T2>,
iteratee: ValueIteratee<T1 | T2>
): LoDashImplicitWrapper<T1[]>;
/**
* @see _.differenceBy
*/
differenceBy<T1, T2, T3>(
this: LoDashImplicitWrapper<List<T1> | null | undefined>,
values1: List<T2>,
values2: List<T3>,
iteratee: ValueIteratee<T1 | T2 | T3>
): LoDashImplicitWrapper<T1[]>;
/**
* @see _.differenceBy
*/
differenceBy<T1, T2, T3, T4>(
this: LoDashImplicitWrapper<List<T1> | null | undefined>,
values1: List<T2>,
values2: List<T3>,
values3: List<T4>,
iteratee: ValueIteratee<T1 | T2 | T3 | T4>
): LoDashImplicitWrapper<T1[]>;
/**
* @see _.differenceBy
*/
differenceBy<T1, T2, T3, T4, T5>(
this: LoDashImplicitWrapper<List<T1> | null | undefined>,
values1: List<T2>,
values2: List<T3>,
values3: List<T4>,
values4: List<T5>,
iteratee: ValueIteratee<T1 | T2 | T3 | T4 | T5>
): LoDashImplicitWrapper<T1[]>;
/**
* @see _.differenceBy
*/
differenceBy<T1, T2, T3, T4, T5, T6>(
this: LoDashImplicitWrapper<List<T1> | null | undefined>,
values1: List<T2>,
values2: List<T3>,
values3: List<T4>,
values4: List<T5>,
values5: List<T6>,
iteratee: ValueIteratee<T1 | T2 | T3 | T4 | T5 | T6>
): LoDashImplicitWrapper<T1[]>;
/**
* @see _.differenceBy
*/
differenceBy<T1, T2, T3, T4, T5, T6, T7>(
this: LoDashImplicitWrapper<List<T1> | null | undefined>,
values1: List<T2>,
values2: List<T3>,
values3: List<T4>,
values4: List<T5>,
values5: List<T6>,
...values: Array<List<T7> | ValueIteratee<T1 | T2 | T3 | T4 | T5 | T6 | T7>>
): LoDashImplicitWrapper<T1[]>;
/**
* @see _.differenceBy
*/
differenceBy<T>(
this: LoDashImplicitWrapper<List<T> | null | undefined>,
...values: Array<List<T>>
): LoDashImplicitWrapper<T[]>;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.differenceBy
*/
differenceBy<T1, T2>(
this: LoDashExplicitWrapper<List<T1> | null | undefined>,
values: List<T2>,
iteratee: ValueIteratee<T1 | T2>
): LoDashExplicitWrapper<T1[]>;
/**
* @see _.differenceBy
*/
differenceBy<T1, T2, T3>(
this: LoDashExplicitWrapper<List<T1> | null | undefined>,
values1: List<T2>,
values2: List<T3>,
iteratee: ValueIteratee<T1 | T2 | T3>
): LoDashExplicitWrapper<T1[]>;
/**
* @see _.differenceBy
*/
differenceBy<T1, T2, T3, T4>(
this: LoDashExplicitWrapper<List<T1> | null | undefined>,
values1: List<T2>,
values2: List<T3>,
values3: List<T4>,
iteratee: ValueIteratee<T1 | T2 | T3 | T4>
): LoDashExplicitWrapper<T1[]>;
/**
* @see _.differenceBy
*/
differenceBy<T1, T2, T3, T4, T5>(
this: LoDashExplicitWrapper<List<T1> | null | undefined>,
values1: List<T2>,
values2: List<T3>,
values3: List<T4>,
values4: List<T5>,
iteratee: ValueIteratee<T1 | T2 | T3 | T4 | T5>
): LoDashExplicitWrapper<T1[]>;
/**
* @see _.differenceBy
*/
differenceBy<T1, T2, T3, T4, T5, T6>(
this: LoDashExplicitWrapper<List<T1> | null | undefined>,
values1: List<T2>,
values2: List<T3>,
values3: List<T4>,
values4: List<T5>,
values5: List<T6>,
iteratee: ValueIteratee<T1 | T2 | T3 | T4 | T5 | T6>
): LoDashExplicitWrapper<T1[]>;
/**
* @see _.differenceBy
*/
differenceBy<T1, T2, T3, T4, T5, T6, T7>(
this: LoDashExplicitWrapper<List<T1> | null | undefined>,
values1: List<T2>,
values2: List<T3>,
values3: List<T4>,
values4: List<T5>,
values5: List<T6>,
...values: Array<List<T7> | ValueIteratee<T1 | T2 | T3 | T4 | T5 | T6 | T7>>
): LoDashExplicitWrapper<T1[]>;
/**
* @see _.differenceBy
*/
differenceBy<T>(
this: LoDashExplicitWrapper<List<T> | null | undefined>,
...values: Array<List<T>>
): LoDashExplicitWrapper<T[]>;
}
}
-132
View File
@@ -1,132 +0,0 @@
import _ = require("../index");
declare module "../index" {
interface LoDashStatic {
/**
* Creates an array of unique `array` values not included in the other
* provided arrays using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
* for equality comparisons.
*
* @category Array
* @param [values] The arrays to inspect.
* @param [comparator] The comparator invoked per element.
* @returns Returns the new array of filtered values.
* @example
*
* var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
* _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual);
* // => [{ 'x': 2, 'y': 1 }]
*/
differenceWith<T1, T2>(
array: List<T1> | null | undefined,
values: List<T2>,
comparator: Comparator2<T1, T2>
): T1[];
/**
* @see _.differenceWith
*/
differenceWith<T1, T2, T3>(
array: List<T1> | null | undefined,
values1: List<T2>,
values2: List<T3>,
comparator: Comparator2<T1, T2 | T3>
): T1[];
/**
* @see _.differenceWith
*/
differenceWith<T1, T2, T3, T4>(
array: List<T1> | null | undefined,
values1: List<T2>,
values2: List<T3>,
...values: Array<List<T4> | Comparator2<T1, T2 | T3 | T4>>
): T1[];
/**
* @see _.differenceWith
*/
differenceWith<T>(
array: List<T> | null | undefined,
...values: Array<List<T>>
): T[];
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.differenceWith
*/
differenceWith<T1, T2>(
this: LoDashImplicitWrapper<List<T1> | null | undefined>,
values: List<T2>,
comparator: Comparator2<T1, T2>
): LoDashImplicitWrapper<T1[]>;
/**
* @see _.differenceWith
*/
differenceWith<T1, T2, T3>(
this: LoDashImplicitWrapper<List<T1> | null | undefined>,
values1: List<T2>,
values2: List<T3>,
comparator: Comparator2<T1, T2 | T3>
): LoDashImplicitWrapper<T1[]>;
/**
* @see _.differenceWith
*/
differenceWith<T1, T2, T3, T4>(
this: LoDashImplicitWrapper<List<T1> | null | undefined>,
values1: List<T2>,
values2: List<T3>,
...values: Array<List<T4> | Comparator2<T1, T2 | T3 | T4>>
): LoDashImplicitWrapper<T1[]>;
/**
* @see _.differenceWith
*/
differenceWith<T>(
this: LoDashImplicitWrapper<List<T> | null | undefined>,
...values: Array<List<T>>
): LoDashImplicitWrapper<T[]>;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.differenceWith
*/
differenceWith<T1, T2>(
this: LoDashExplicitWrapper<List<T1> | null | undefined>,
values: List<T2>,
comparator: Comparator2<T1, T2>
): LoDashExplicitWrapper<T1[]>;
/**
* @see _.differenceWith
*/
differenceWith<T1, T2, T3>(
this: LoDashExplicitWrapper<List<T1> | null | undefined>,
values1: List<T2>,
values2: List<T3>,
comparator: Comparator2<T1, T2 | T3>
): LoDashExplicitWrapper<T1[]>;
/**
* @see _.differenceWith
*/
differenceWith<T1, T2, T3, T4>(
this: LoDashExplicitWrapper<List<T1> | null | undefined>,
values1: List<T2>,
values2: List<T3>,
...values: Array<List<T4> | Comparator2<T1, T2 | T3 | T4>>
): LoDashExplicitWrapper<T1[]>;
/**
* @see _.differenceWith
*/
differenceWith<T>(
this: LoDashExplicitWrapper<List<T> | null | undefined>,
...values: Array<List<T>>
): LoDashExplicitWrapper<T[]>;
}
}
-27
View File
@@ -1,27 +0,0 @@
import _ = require("../index");
declare module "../index" {
interface LoDashStatic {
/**
* Creates a slice of array with n elements dropped from the beginning.
*
* @param array The array to query.
* @param n The number of elements to drop.
* @return Returns the slice of array.
*/
drop<T>(array: List<T> | null | undefined, n?: number): T[];
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.drop
*/
drop<T>(this: LoDashImplicitWrapper<List<T> | null | undefined>, n?: number): LoDashImplicitWrapper<T[]>;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.drop
*/
drop<T>(this: LoDashExplicitWrapper<List<T> | null | undefined>, n?: number): LoDashExplicitWrapper<T[]>;
}
}
-30
View File
@@ -1,30 +0,0 @@
import _ = require("../index");
declare module "../index" {
interface LoDashStatic {
/**
* Creates a slice of array with n elements dropped from the end.
*
* @param array The array to query.
* @param n The number of elements to drop.
* @return Returns the slice of array.
*/
dropRight<T>(
array: List<T> | null | undefined,
n?: number
): T[];
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.dropRight
*/
dropRight<T>(this: LoDashImplicitWrapper<List<T> | null | undefined>, n?: number): LoDashImplicitWrapper<T[]>;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.dropRight
*/
dropRight<T>(this: LoDashExplicitWrapper<List<T> | null | undefined>, n?: number): LoDashExplicitWrapper<T[]>;
}
}
-47
View File
@@ -1,47 +0,0 @@
import _ = require("../index");
declare module "../index" {
interface LoDashStatic {
/**
* Creates a slice of array excluding elements dropped from the end. Elements are dropped until predicate
* returns falsey. The predicate is bound to thisArg and invoked with three arguments: (value, index, array).
*
* If a property name is provided for predicate the created _.property style callback returns the property
* value of the given element.
*
* If a value is also provided for thisArg the created _.matchesProperty style callback returns true for
* elements that have a matching property value, else false.
*
* If an object is provided for predicate the created _.matches style callback returns true for elements that
* match the properties of the given object, else false.
*
* @param array The array to query.
* @param predicate The function invoked per iteration.
* @param thisArg The this binding of predicate.
* @return Returns the slice of array.
*/
dropRightWhile<T>(
array: List<T> | null | undefined,
predicate?: ListIteratee<T>
): T[];
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.dropRightWhile
*/
dropRightWhile<T>(
this: LoDashImplicitWrapper<List<T> | null | undefined>,
predicate?: ListIteratee<T>
): LoDashImplicitWrapper<T[]>;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.dropRightWhile
*/
dropRightWhile<T>(
this: LoDashExplicitWrapper<List<T> | null | undefined>,
predicate?: ListIteratee<T>
): LoDashExplicitWrapper<T[]>;
}
}
-47
View File
@@ -1,47 +0,0 @@
import _ = require("../index");
declare module "../index" {
interface LoDashStatic {
/**
* Creates a slice of array excluding elements dropped from the beginning. Elements are dropped until predicate
* returns falsey. The predicate is bound to thisArg and invoked with three arguments: (value, index, array).
*
* If a property name is provided for predicate the created _.property style callback returns the property
* value of the given element.
*
* If a value is also provided for thisArg the created _.matchesProperty style callback returns true for
* elements that have a matching property value, else false.
*
* If an object is provided for predicate the created _.matches style callback returns true for elements that
* have the properties of the given object, else false.
*
* @param array The array to query.
* @param predicate The function invoked per iteration.
* @param thisArg The this binding of predicate.
* @return Returns the slice of array.
*/
dropWhile<T>(
array: List<T> | null | undefined,
predicate?: ListIteratee<T>
): T[];
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.dropWhile
*/
dropWhile<T>(
this: LoDashImplicitWrapper<List<T> | null | undefined>,
predicate?: ListIteratee<T>
): LoDashImplicitWrapper<T[]>;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.dropWhile
*/
dropWhile<T>(
this: LoDashExplicitWrapper<List<T> | null | undefined>,
predicate?: ListIteratee<T>
): LoDashExplicitWrapper<T[]>;
}
}
-124
View File
@@ -1,124 +0,0 @@
import _ = require("../index");
declare module "../index" {
interface LoDashStatic {
/**
* Fills elements of array with value from start up to, but not including, end.
*
* Note: This method mutates array.
*
* @param array The array to fill.
* @param value The value to fill array with.
* @param start The start position.
* @param end The end position.
* @return Returns array.
*/
fill<T>(
array: any[] | null | undefined,
value: T
): T[];
/**
* @see _.fill
*/
fill<T>(
array: List<any> | null | undefined,
value: T
): List<T>;
/**
* @see _.fill
*/
fill<T, U>(
array: U[] | null | undefined,
value: T,
start?: number,
end?: number
): Array<T | U>;
/**
* @see _.fill
*/
fill<T, U>(
array: List<U> | null | undefined,
value: T,
start?: number,
end?: number
): List<T | U>;
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.fill
*/
fill<T>(
this: LoDashImplicitWrapper<any[] | null | undefined>,
value: T
): LoDashImplicitWrapper<T[]>;
/**
* @see _.fill
*/
fill<T>(
this: LoDashImplicitWrapper<List<any> | null | undefined>,
value: T
): LoDashImplicitWrapper<List<T>>;
/**
* @see _.fill
*/
fill<T, U>(
this: LoDashImplicitWrapper<U[] | null | undefined>,
value: T,
start?: number,
end?: number
): LoDashImplicitWrapper<Array<T | U>>;
/**
* @see _.fill
*/
fill<T, U>(
this: LoDashImplicitWrapper<List<U> | null | undefined>,
value: T,
start?: number,
end?: number
): LoDashImplicitWrapper<List<T | U>>;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.fill
*/
fill<T>(
this: LoDashExplicitWrapper<any[] | null | undefined>,
value: T
): LoDashExplicitWrapper<T[]>;
/**
* @see _.fill
*/
fill<T>(
this: LoDashExplicitWrapper<List<any> | null | undefined>,
value: T
): LoDashExplicitWrapper<List<T>>;
/**
* @see _.fill
*/
fill<T, U>(
this: LoDashExplicitWrapper<U[] | null | undefined>,
value: T,
start?: number,
end?: number
): LoDashExplicitWrapper<Array<T | U>>;
/**
* @see _.fill
*/
fill<T, U>(
this: LoDashExplicitWrapper<List<U> | null | undefined>,
value: T,
start?: number,
end?: number
): LoDashExplicitWrapper<List<T | U>>;
}
}
-50
View File
@@ -1,50 +0,0 @@
import _ = require("../index");
declare module "../index" {
interface LoDashStatic {
/**
* This method is like _.find except that it returns the index of the first element predicate returns truthy
* for instead of the element itself.
*
* If a property name is provided for predicate the created _.property style callback returns the property
* value of the given element.
*
* If a value is also provided for thisArg the created _.matchesProperty style callback returns true for
* elements that have a matching property value, else false.
*
* If an object is provided for predicate the created _.matches style callback returns true for elements that
* have the properties of the given object, else false.
*
* @param array The array to search.
* @param predicate The function invoked per iteration.
* @param fromIndex The index to search from.
* @return Returns the index of the found element, else -1.
*/
findIndex<T>(
array: List<T> | null | undefined,
predicate?: ListIterateeCustom<T, boolean>,
fromIndex?: number
): number;
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.findIndex
*/
findIndex<T>(
this: LoDashImplicitWrapper<List<T> | null | undefined>,
predicate?: ListIterateeCustom<T, boolean>,
fromIndex?: number
): number;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.findIndex
*/
findIndex<T>(
this: LoDashExplicitWrapper<List<T> | null | undefined>,
predicate?: ListIterateeCustom<T, boolean>,
fromIndex?: number
): LoDashExplicitWrapper<number>;
}
}
-49
View File
@@ -1,49 +0,0 @@
import _ = require("../index");
declare module "../index" {
interface LoDashStatic {
/**
* This method is like _.findIndex except that it iterates over elements of collection from right to left.
*
* If a property name is provided for predicate the created _.property style callback returns the property
* value of the given element.
*
* If a value is also provided for thisArg the created _.matchesProperty style callback returns true for
* elements that have a matching property value, else false.
*
* If an object is provided for predicate the created _.matches style callback returns true for elements that
* have the properties of the given object, else false.
*
* @param array The array to search.
* @param predicate The function invoked per iteration.
* @param fromIndex The index to search from.
* @return Returns the index of the found element, else -1.
*/
findLastIndex<T>(
array: List<T> | null | undefined,
predicate?: ListIterateeCustom<T, boolean>,
fromIndex?: number
): number;
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.findLastIndex
*/
findLastIndex<T>(
this: LoDashImplicitWrapper<List<T> | null | undefined>,
predicate?: ListIterateeCustom<T, boolean>,
fromIndex?: number
): number;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.findLastIndex
*/
findLastIndex<T>(
this: LoDashExplicitWrapper<List<T> | null | undefined>,
predicate?: ListIterateeCustom<T, boolean>,
fromIndex?: number
): LoDashExplicitWrapper<number>;
}
}
-23
View File
@@ -1,23 +0,0 @@
import _ = require("../index");
declare module "../index" {
interface LoDashStatic {
first: typeof _.head; // tslint:disable-line:no-unnecessary-qualifier
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.head
*/
first<T>(this: LoDashImplicitWrapper<List<T> | null | undefined>): T | undefined;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.head
*/
first<T>(this: LoDashExplicitWrapper<List<T> | null | undefined>): LoDashExplicitWrapper<T | undefined>;
}
interface RecursiveArray<T> extends Array<T|RecursiveArray<T>> {}
interface ListOfRecursiveArraysOrValues<T> extends List<T|RecursiveArray<T>> {}
}
-43
View File
@@ -1,43 +0,0 @@
import _ = require("../index");
declare module "../index" {
interface LoDashStatic {
/**
* Flattens a nested array. If isDeep is true the array is recursively flattened, otherwise it’s only
* flattened a single level.
*
* @param array The array to flatten.
* @param isDeep Specify a deep flatten.
* @return Returns the new flattened array.
*/
flatten<T>(array: ListOfRecursiveArraysOrValues<T> | null | undefined, isDeep: boolean): T[];
/**
* @see _.flatten
*/
flatten<T>(array: List<Many<T>> | null | undefined): T[];
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.flatten
*/
flatten<T>(this: LoDashImplicitWrapper<ListOfRecursiveArraysOrValues<T> | null | undefined>, isDeep: boolean): LoDashImplicitWrapper<T[]>;
/**
* @see _.flatten
*/
flatten<T>(this: LoDashImplicitWrapper<List<Many<T>> | null | undefined>): LoDashImplicitWrapper<T[]>;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.flatten
*/
flatten<T>(this: LoDashExplicitWrapper<ListOfRecursiveArraysOrValues<T> | null | undefined>, isDeep: boolean): LoDashExplicitWrapper<T[]>;
/**
* @see _.flatten
*/
flatten<T>(this: LoDashExplicitWrapper<List<Many<T>> | null | undefined>): LoDashExplicitWrapper<T[]>;
}
}
-26
View File
@@ -1,26 +0,0 @@
import _ = require("../index");
declare module "../index" {
interface LoDashStatic {
/**
* Recursively flattens a nested array.
*
* @param array The array to recursively flatten.
* @return Returns the new flattened array.
*/
flattenDeep<T>(array: ListOfRecursiveArraysOrValues<T> | null | undefined): T[];
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.flattenDeep
*/
flattenDeep<T>(this: LoDashImplicitWrapper<ListOfRecursiveArraysOrValues<T> | null | undefined>): LoDashImplicitWrapper<T[]>;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.flattenDeep
*/
flattenDeep<T>(this: LoDashExplicitWrapper<ListOfRecursiveArraysOrValues<T> | null | undefined>): LoDashExplicitWrapper<T[]>;
}
}
-27
View File
@@ -1,27 +0,0 @@
import _ = require("../index");
declare module "../index" {
interface LoDashStatic {
/**
* Recursively flatten array up to depth times.
*
* @param array The array to recursively flatten.
* @param number The maximum recursion depth.
* @return Returns the new flattened array.
*/
flattenDepth<T>(array: ListOfRecursiveArraysOrValues<T> | null | undefined, depth?: number): T[];
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.flattenDeep
*/
flattenDepth<T>(this: LoDashImplicitWrapper<ListOfRecursiveArraysOrValues<T> | null | undefined>, depth?: number): LoDashImplicitWrapper<T[]>;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.flattenDeep
*/
flattenDepth<T>(this: LoDashExplicitWrapper<ListOfRecursiveArraysOrValues<T> | null | undefined>, depth?: number): LoDashExplicitWrapper<T[]>;
}
}
-59
View File
@@ -1,59 +0,0 @@
import _ = require("../index");
declare module "../index" {
interface LoDashStatic {
/**
* The inverse of `_.toPairs`; this method returns an object composed
* from key-value `pairs`.
*
* @category Array
* @param pairs The key-value pairs.
* @returns Returns the new object.
* @example
*
* _.fromPairs([['fred', 30], ['barney', 40]]);
* // => { 'fred': 30, 'barney': 40 }
*/
fromPairs<T>(
pairs: List<[PropertyName, T]> | null | undefined
): Dictionary<T>;
/**
@see _.fromPairs
*/
fromPairs(
pairs: List<any[]> | null | undefined
): Dictionary<any>;
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.fromPairs
*/
fromPairs<T>(
this: LoDashImplicitWrapper<List<[PropertyName, T]> | null | undefined>
): LoDashImplicitWrapper<Dictionary<T>>;
/**
@see _.fromPairs
*/
fromPairs(
this: LoDashImplicitWrapper<List<any[]> | null | undefined>
): LoDashImplicitWrapper<Dictionary<any>>;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.fromPairs
*/
fromPairs<T>(
this: LoDashExplicitWrapper<List<[PropertyName, T]> | null | undefined>
): LoDashExplicitWrapper<Dictionary<T>>;
/**
@see _.fromPairs
*/
fromPairs(
this: LoDashExplicitWrapper<List<any[]> | null | undefined>
): LoDashExplicitWrapper<Dictionary<any>>;
}
}
-28
View File
@@ -1,28 +0,0 @@
import _ = require("../index");
declare module "../index" {
interface LoDashStatic {
/**
* Gets the first element of array.
*
* @alias _.first
*
* @param array The array to query.
* @return Returns the first element of array.
*/
head<T>(array: List<T> | null | undefined): T | undefined;
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.head
*/
head<T>(this: LoDashImplicitWrapper<List<T> | null | undefined>): T | undefined;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.head
*/
head<T>(this: LoDashExplicitWrapper<List<T> | null | undefined>): LoDashExplicitWrapper<T | undefined>;
}
}
-53
View File
@@ -1,53 +0,0 @@
import _ = require("../index");
declare module "../index" {
interface LoDashStatic {
/**
* Gets the index at which the first occurrence of `value` is found in `array`
* using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
* for equality comparisons. If `fromIndex` is negative, it's used as the offset
* from the end of `array`. If `array` is sorted providing `true` for `fromIndex`
* performs a faster binary search.
*
* @category Array
* @param array The array to search.
* @param value The value to search for.
* @param [fromIndex=0] The index to search from.
* @returns Returns the index of the matched value, else `-1`.
* @example
*
* _.indexOf([1, 2, 1, 2], 2);
* // => 1
*
* // using `fromIndex`
* _.indexOf([1, 2, 1, 2], 2, 2);
* // => 3
*/
indexOf<T>(
array: List<T> | null | undefined,
value: T,
fromIndex?: boolean|number
): number;
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.indexOf
*/
indexOf<T>(
this: LoDashImplicitWrapper<List<T> | null | undefined>,
value: T,
fromIndex?: boolean|number
): number;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.indexOf
*/
indexOf<T>(
this: LoDashExplicitWrapper<List<T> | null | undefined>,
value: T,
fromIndex?: boolean|number
): LoDashExplicitWrapper<number>;
}
}
-26
View File
@@ -1,26 +0,0 @@
import _ = require("../index");
declare module "../index" {
interface LoDashStatic {
/**
* Gets all but the last element of array.
*
* @param array The array to query.
* @return Returns the slice of array.
*/
initial<T>(array: List<T> | null | undefined): T[];
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.initial
*/
initial<T>(this: LoDashImplicitWrapper<List<T> | null | undefined>): LoDashImplicitWrapper<T[]>;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.initial
*/
initial<T>(this: LoDashExplicitWrapper<List<T> | null | undefined>): LoDashExplicitWrapper<T[]>;
}
}
-33
View File
@@ -1,33 +0,0 @@
import _ = require("../index");
declare module "../index" {
interface LoDashStatic {
/**
* Creates an array of unique values that are included in all of the provided arrays using SameValueZero for
* equality comparisons.
*
* @param arrays The arrays to inspect.
* @return Returns the new array of shared values.
*/
intersection<T>(...arrays: Array<List<T>>): T[];
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.intersection
*/
intersection<T>(
this: LoDashImplicitWrapper<List<T>>,
...arrays: Array<List<T>>
): LoDashImplicitWrapper<T[]>;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.intersection
*/
intersection<T>(
this: LoDashExplicitWrapper<List<T>>,
...arrays: Array<List<T>>
): LoDashExplicitWrapper<T[]>;
}
}
-134
View File
@@ -1,134 +0,0 @@
import _ = require("../index");
declare module "../index" {
interface LoDashStatic {
/**
* This method is like `_.intersection` except that it accepts `iteratee`
* which is invoked for each element of each `arrays` to generate the criterion
* by which uniqueness is computed. The iteratee is invoked with one argument: (value).
*
* @category Array
* @param [arrays] The arrays to inspect.
* @param [iteratee=_.identity] The iteratee invoked per element.
* @returns Returns the new array of shared values.
* @example
*
* _.intersectionBy([2.1, 1.2], [4.3, 2.4], Math.floor);
* // => [2.1]
*
* // using the `_.property` iteratee shorthand
* _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
* // => [{ 'x': 1 }]
*/
intersectionBy<T1, T2>(
array: List<T1> | null,
values: List<T2>,
iteratee: ValueIteratee<T1 | T2>
): T1[];
/**
* @see _.intersectionBy
*/
intersectionBy<T1, T2, T3>(
array: List<T1> | null,
values1: List<T2>,
values2: List<T3>,
iteratee: ValueIteratee<T1 | T2 | T3>
): T1[];
/**
* @see _.intersectionBy
*/
intersectionBy<T1, T2, T3, T4>(
array: List<T1> | null | undefined,
values1: List<T2>,
values2: List<T3>,
...values: Array<List<T4> | ValueIteratee<T1 | T2 | T3 | T4>>
): T1[];
/**
* @see _.intersectionBy
*/
intersectionBy<T>(
array?: List<T> | null,
...values: Array<List<T>>
): T[];
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.intersectionBy
*/
intersectionBy<T1, T2>(
this: LoDashImplicitWrapper<List<T1> | null | undefined>,
values: List<T2>,
iteratee: ValueIteratee<T1 | T2>
): LoDashImplicitWrapper<T1[]>;
/**
* @see _.intersectionBy
*/
intersectionBy<T1, T2, T3>(
this: LoDashImplicitWrapper<List<T1> | null | undefined>,
values1: List<T2>,
values2: List<T3>,
iteratee: ValueIteratee<T1 | T2 | T3>
): LoDashImplicitWrapper<T1[]>;
/**
* @see _.intersectionBy
*/
intersectionBy<T1, T2, T3, T4>(
this: LoDashImplicitWrapper<List<T1> | null | undefined>,
values1: List<T2>,
values2: List<T3>,
...values: Array<List<T4> | ValueIteratee<T1 | T2 | T3 | T4>>
): LoDashImplicitWrapper<T1[]>;
/**
* @see _.intersectionBy
*/
intersectionBy<T>(
this: LoDashImplicitWrapper<List<T> | null | undefined>,
...values: Array<List<T>>
): LoDashImplicitWrapper<T[]>;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.intersectionBy
*/
intersectionBy<T1, T2>(
this: LoDashExplicitWrapper<List<T1> | null | undefined>,
values: List<T2>,
iteratee: ValueIteratee<T1 | T2>
): LoDashExplicitWrapper<T1[]>;
/**
* @see _.intersectionBy
*/
intersectionBy<T1, T2, T3>(
this: LoDashExplicitWrapper<List<T1> | null | undefined>,
values1: List<T2>,
values2: List<T3>,
iteratee: ValueIteratee<T1 | T2 | T3>
): LoDashExplicitWrapper<T1[]>;
/**
* @see _.intersectionBy
*/
intersectionBy<T1, T2, T3, T4>(
this: LoDashExplicitWrapper<List<T1> | null | undefined>,
values1: List<T2>,
values2: List<T3>,
...values: Array<List<T4> | ValueIteratee<T1 | T2 | T3 | T4>>
): LoDashExplicitWrapper<T1[]>;
/**
* @see _.intersectionBy
*/
intersectionBy<T>(
this: LoDashExplicitWrapper<List<T> | null | undefined>,
...values: Array<List<T>>
): LoDashExplicitWrapper<T[]>;
}
}
-133
View File
@@ -1,133 +0,0 @@
import _ = require("../index");
declare module "../index" {
interface LoDashStatic {
/**
* Creates an array of unique `array` values not included in the other
* provided arrays using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
* for equality comparisons.
*
* @category Array
* @param [values] The arrays to inspect.
* @param [comparator] The comparator invoked per element.
* @returns Returns the new array of filtered values.
* @example
*
* var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
* var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
* _.intersectionWith(objects, others, _.isEqual);
* // => [{ 'x': 1, 'y': 2 }]
*/
intersectionWith<T1, T2>(
array: List<T1> | null | undefined,
values: List<T2>,
comparator: Comparator2<T1, T2>
): T1[];
/**
* @see _.intersectionWith
*/
intersectionWith<T1, T2, T3>(
array: List<T1> | null | undefined,
values1: List<T2>,
values2: List<T3>,
comparator: Comparator2<T1, T2 | T3>
): T1[];
/**
* @see _.intersectionWith
*/
intersectionWith<T1, T2, T3, T4>(
array: List<T1> | null | undefined,
values1: List<T2>,
values2: List<T3>,
...values: Array<List<T4> | Comparator2<T1, T2 | T3 | T4>>
): T1[];
/**
* @see _.intersectionWith
*/
intersectionWith<T>(
array?: List<T> | null,
...values: Array<List<T>>
): T[];
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.intersectionWith
*/
intersectionWith<T1, T2>(
this: LoDashImplicitWrapper<List<T1> | null | undefined>,
values: List<T2>,
comparator: Comparator2<T1, T2>
): LoDashImplicitWrapper<T1[]>;
/**
* @see _.intersectionWith
*/
intersectionWith<T1, T2, T3>(
this: LoDashImplicitWrapper<List<T1> | null | undefined>,
values1: List<T2>,
values2: List<T3>,
comparator: Comparator2<T1, T2 | T3>
): LoDashImplicitWrapper<T1[]>;
/**
* @see _.intersectionWith
*/
intersectionWith<T1, T2, T3, T4>(
this: LoDashImplicitWrapper<List<T1> | null | undefined>,
values1: List<T2>,
values2: List<T3>,
...values: Array<List<T4> | Comparator2<T1, T2 | T3 | T4>>,
): LoDashImplicitWrapper<T1[]>;
/**
* @see _.intersectionWith
*/
intersectionWith<T>(
this: LoDashImplicitWrapper<List<T> | null | undefined>,
...values: Array<List<T>>
): LoDashImplicitWrapper<T[]>;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.intersectionWith
*/
intersectionWith<T1, T2>(
this: LoDashExplicitWrapper<List<T1> | null | undefined>,
values: List<T2>,
comparator: Comparator2<T1, T2>
): LoDashExplicitWrapper<T1[]>;
/**
* @see _.intersectionWith
*/
intersectionWith<T1, T2, T3>(
this: LoDashExplicitWrapper<List<T1> | null | undefined>,
values1: List<T2>,
values2: List<T3>,
comparator: Comparator2<T1, T2 | T3>
): LoDashExplicitWrapper<T1[]>;
/**
* @see _.intersectionWith
*/
intersectionWith<T1, T2, T3, T4>(
this: LoDashExplicitWrapper<List<T1> | null | undefined>,
values1: List<T2>,
values2: List<T3>,
...values: Array<List<T4> | Comparator2<T1, T2 | T3 | T4>>,
): LoDashExplicitWrapper<T1[]>;
/**
* @see _.intersectionWith
*/
intersectionWith<T>(
this: LoDashExplicitWrapper<List<T> | null | undefined>,
...values: Array<List<T>>
): LoDashExplicitWrapper<T[]>;
}
}
-30
View File
@@ -1,30 +0,0 @@
import _ = require("../index");
declare module "../index" {
interface LoDashStatic {
/**
* Converts all elements in `array` into a string separated by `separator`.
*
* @param array The array to convert.
* @param separator The element separator.
* @returns Returns the joined string.
*/
join(
array: List<any> | null | undefined,
separator?: string
): string;
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.join
*/
join(separator?: string): string;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.join
*/
join(separator?: string): LoDashExplicitWrapper<string>;
}
}
-26
View File
@@ -1,26 +0,0 @@
import _ = require("../index");
declare module "../index" {
interface LoDashStatic {
/**
* Gets the last element of array.
*
* @param array The array to query.
* @return Returns the last element of array.
*/
last<T>(array: List<T> | null | undefined): T | undefined;
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.last
*/
last<T>(this: LoDashImplicitWrapper<List<T> | null | undefined>): T | undefined;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.last
*/
last<T>(this: LoDashExplicitWrapper<List<T> | null | undefined>): LoDashExplicitWrapper<T | undefined>;
}
}
-40
View File
@@ -1,40 +0,0 @@
import _ = require("../index");
declare module "../index" {
interface LoDashStatic {
/**
* This method is like _.indexOf except that it iterates over elements of array from right to left.
*
* @param array The array to search.
* @param value The value to search for.
* @param fromIndex The index to search from or true to perform a binary search on a sorted array.
* @return Returns the index of the matched value, else -1.
*/
lastIndexOf<T>(
array: List<T> | null | undefined,
value: T,
fromIndex?: true|number
): number;
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.indexOf
*/
lastIndexOf<T>(
this: LoDashImplicitWrapper<List<T> | null | undefined>,
value: T,
fromIndex?: true|number
): number;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.indexOf
*/
lastIndexOf<T>(
this: LoDashExplicitWrapper<List<T> | null | undefined>,
value: T,
fromIndex?: true|number
): LoDashExplicitWrapper<number>;
}
}
-36
View File
@@ -1,36 +0,0 @@
import _ = require("../index");
declare module "../index" {
interface LoDashStatic {
/**
* Gets the element at index `n` of `array`. If `n` is negative, the nth element from the end is returned.
*
* @param array array The array to query.
* @param value The index of the element to return.
* @return Returns the nth element of `array`.
*/
nth<T>(
array: List<T> | null | undefined,
n?: number
): T | undefined;
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.nth
*/
nth<T>(
this: LoDashImplicitWrapper<List<T> | null | undefined>,
n?: number
): T | undefined;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.nth
*/
nth<T>(
this: LoDashExplicitWrapper<List<T> | null | undefined>,
n?: number
): LoDashExplicitWrapper<T | undefined>;
}
}
-46
View File
@@ -1,46 +0,0 @@
import _ = require("../index");
declare module "../index" {
interface LoDashStatic {
/**
* Removes all provided values from array using SameValueZero for equality comparisons.
*
* Note: Unlike _.without, this method mutates array.
*
* @param array The array to modify.
* @param values The values to remove.
* @return Returns array.
*/
pull<T>(
array: T[],
...values: T[]
): T[];
/**
* @see _.pull
*/
pull<T>(
array: List<T>,
...values: T[]
): List<T>;
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.pull
*/
pull<T>(
this: LoDashImplicitWrapper<List<T>>,
...values: T[]
): this;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.pull
*/
pull<T>(
this: LoDashExplicitWrapper<List<T>>,
...values: T[]
): this;
}
}
-54
View File
@@ -1,54 +0,0 @@
import _ = require("../index");
declare module "../index" {
interface LoDashStatic {
/**
* This method is like `_.pull` except that it accepts an array of values to remove.
*
* **Note:** Unlike `_.difference`, this method mutates `array`.
*
* @category Array
* @param array The array to modify.
* @param values The values to remove.
* @returns Returns `array`.
* @example
*
* var array = [1, 2, 3, 1, 2, 3];
*
* _.pull(array, [2, 3]);
* console.log(array);
* // => [1, 1]
*/
pullAll<T>(
array: T[],
values?: List<T>,
): T[];
/**
* @see _.pullAll
*/
pullAll<T>(
array: List<T>,
values?: List<T>,
): List<T>;
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.pullAll
*/
pullAll<T>(
this: LoDashImplicitWrapper<List<T>>,
values?: List<T>
): this;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.pullAll
*/
pullAll<T>(
this: LoDashExplicitWrapper<List<T>>,
values?: List<T>
): this;
}
}
-77
View File
@@ -1,77 +0,0 @@
import _ = require("../index");
declare module "../index" {
interface LoDashStatic {
/**
* This method is like `_.pullAll` except that it accepts `iteratee` which is
* invoked for each element of `array` and `values` to to generate the criterion
* by which uniqueness is computed. The iteratee is invoked with one argument: (value).
*
* **Note:** Unlike `_.differenceBy`, this method mutates `array`.
*
* @category Array
* @param array The array to modify.
* @param values The values to remove.
* @param [iteratee=_.identity] The iteratee invoked per element.
* @returns Returns `array`.
* @example
*
* var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }];
*
* _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x');
* console.log(array);
* // => [{ 'x': 2 }]
*/
pullAllBy<T>(
array: T[],
values?: List<T>,
iteratee?: ValueIteratee<T>
): T[];
/**
* @see _.pullAllBy
*/
pullAllBy<T>(
array: List<T>,
values?: List<T>,
iteratee?: ValueIteratee<T>
): List<T>;
/**
* @see _.pullAllBy
*/
pullAllBy<T1, T2>(
array: T1[],
values: List<T2>,
iteratee: ValueIteratee<T1 | T2>
): T1[];
/**
* @see _.pullAllBy
*/
pullAllBy<T1, T2>(
array: List<T1>,
values: List<T2>,
iteratee: ValueIteratee<T1 | T2>
): List<T1>;
}
interface LoDashWrapper<TValue> {
/**
* @see _.pullAllBy
*/
pullAllBy<T>(
this: LoDashWrapper<List<T>>,
values?: List<T>,
iteratee?: ValueIteratee<T>
): this;
/**
* @see _.pullAllBy
*/
pullAllBy<T1, T2>(
this: LoDashWrapper<List<T1>>,
values: List<T2>,
iteratee: ValueIteratee<T1 | T2>
): this;
}
}
-77
View File
@@ -1,77 +0,0 @@
import _ = require("../index");
declare module "../index" {
interface LoDashStatic {
/**
* This method is like `_.pullAll` except that it accepts `comparator` which is
* invoked to compare elements of array to values. The comparator is invoked with
* two arguments: (arrVal, othVal).
*
* **Note:** Unlike `_.differenceWith`, this method mutates `array`.
*
* @category Array
* @param array The array to modify.
* @param values The values to remove.
* @param [iteratee=_.identity] The iteratee invoked per element.
* @returns Returns `array`.
* @example
*
* var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }];
*
* _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual);
* console.log(array);
* // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }]
*/
pullAllWith<T>(
array: T[],
values?: List<T>,
comparator?: Comparator<T>
): T[];
/**
* @see _.pullAllWith
*/
pullAllWith<T>(
array: List<T>,
values?: List<T>,
comparator?: Comparator<T>
): List<T>;
/**
* @see _.pullAllWith
*/
pullAllWith<T1, T2>(
array: T1[],
values: List<T2>,
comparator: Comparator2<T1, T2>
): T1[];
/**
* @see _.pullAllWith
*/
pullAllWith<T1, T2>(
array: List<T1>,
values: List<T2>,
comparator: Comparator2<T1, T2>
): List<T1>;
}
interface LoDashWrapper<TValue> {
/**
* @see _.pullAllWith
*/
pullAllWith<T>(
this: LoDashWrapper<List<T>>,
values?: List<T>,
comparator?: Comparator<T>
): this;
/**
* @see _.pullAllWith
*/
pullAllWith<T1, T2>(
this: LoDashWrapper<List<T1>>,
values: List<T2>,
comparator: Comparator2<T1, T2>
): this;
}
}
-34
View File
@@ -1,34 +0,0 @@
import _ = require("../index");
declare module "../index" {
interface LoDashStatic {
/**
* Removes elements from array corresponding to the given indexes and returns an array of the removed elements.
* Indexes may be specified as an array of indexes or as individual arguments.
*
* Note: Unlike _.at, this method mutates array.
*
* @param array The array to modify.
* @param indexes The indexes of elements to remove, specified as individual indexes or arrays of indexes.
* @return Returns the new array of removed elements.
*/
pullAt<T>(
array: T[],
...indexes: Array<Many<number>>
): T[];
/**
* @see _.pullAt
*/
pullAt<T>(
array: List<T>,
...indexes: Array<Many<number>>
): List<T>;
}
interface LoDashWrapper<TValue> {
/**
* @see _.pullAt
*/
pullAt(...indexes: Array<Many<number>>): this;
}
}
-49
View File
@@ -1,49 +0,0 @@
import _ = require("../index");
declare module "../index" {
interface LoDashStatic {
/**
* Removes all elements from array that predicate returns truthy for and returns an array of the removed
* elements. The predicate is bound to thisArg and invoked with three arguments: (value, index, array).
*
* If a property name is provided for predicate the created _.property style callback returns the property
* value of the given element.
*
* If a value is also provided for thisArg the created _.matchesProperty style callback returns true for
* elements that have a matching property value, else false.
*
* If an object is provided for predicate the created _.matches style callback returns true for elements that
* have the properties of the given object, else false.
*
* Note: Unlike _.filter, this method mutates array.
*
* @param array The array to modify.
* @param predicate The function invoked per iteration.
* @param thisArg The this binding of predicate.
* @return Returns the new array of removed elements.
*/
remove<T>(
array: List<T>,
predicate?: ListIteratee<T>
): T[];
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.remove
*/
remove<T>(
this: LoDashImplicitWrapper<List<T>>,
predicate?: ListIteratee<T>
): LoDashImplicitWrapper<T[]>;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.remove
*/
remove<T>(
this: LoDashExplicitWrapper<List<T>>,
predicate?: ListIteratee<T>
): LoDashExplicitWrapper<T[]>;
}
}
-27
View File
@@ -1,27 +0,0 @@
import _ = require("../index");
declare module "../index" {
interface LoDashStatic {
/**
* Reverses `array` so that the first element becomes the last, the second
* element becomes the second to last, and so on.
*
* **Note:** This method mutates `array` and is based on
* [`Array#reverse`](https://mdn.io/Array/reverse).
*
* @category Array
* @returns Returns `array`.
* @example
*
* var array = [1, 2, 3];
*
* _.reverse(array);
* // => [3, 2, 1]
*
* console.log(array);
* // => [3, 2, 1]
*/
reverse<TList extends List<any>>(
array: TList,
): TList;
}
}
-40
View File
@@ -1,40 +0,0 @@
import _ = require("../index");
declare module "../index" {
interface LoDashStatic {
/**
* Creates a slice of array from start up to, but not including, end.
*
* @param array The array to slice.
* @param start The start position.
* @param end The end position.
* @return Returns the slice of array.
*/
slice<T>(
array: List<T> | null | undefined,
start?: number,
end?: number
): T[];
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.slice
*/
slice<T>(
this: LoDashImplicitWrapper<List<T> | null | undefined>,
start?: number,
end?: number
): LoDashImplicitWrapper<T[]>;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.slice
*/
slice<T>(
this: LoDashExplicitWrapper<List<T> | null | undefined>,
start?: number,
end?: number
): LoDashExplicitWrapper<T[]>;
}
}
-45
View File
@@ -1,45 +0,0 @@
import _ = require("../index");
declare module "../index" {
interface LoDashStatic {
/**
* Uses a binary search to determine the lowest index at which `value` should
* be inserted into `array` in order to maintain its sort order.
*
* @category Array
* @param array The sorted array to inspect.
* @param value The value to evaluate.
* @returns Returns the index at which `value` should be inserted into `array`.
* @example
*
* _.sortedIndex([30, 50], 40);
* // => 1
*
* _.sortedIndex([4, 5], 4);
* // => 0
*/
sortedIndex<T>(
array: List<T> | null | undefined,
value: T
): number;
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.sortedIndex
*/
sortedIndex<T>(
this: LoDashImplicitWrapper<List<T> | null | undefined>,
value: T
): number;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.sortedIndex
*/
sortedIndex<T>(
this: LoDashExplicitWrapper<List<T> | null | undefined>,
value: T
): LoDashExplicitWrapper<number>;
}
}
-97
View File
@@ -1,97 +0,0 @@
import _ = require("../index");
declare module "../index" {
interface LoDashStatic {
/**
* Uses a binary search to determine the lowest index at which `value` should
* be inserted into `array` in order to maintain its sort order.
*
* @category Array
* @param array The sorted array to inspect.
* @param value The value to evaluate.
* @returns Returns the index at which `value` should be inserted into `array`.
* @example
*
* _.sortedIndex([30, 50], 40);
* // => 1
*
* _.sortedIndex([4, 5], 4);
* // => 0
*/
sortedIndex<T>(
array: List<T> | null | undefined,
value: T
): number;
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.sortedIndex
*/
sortedIndex<T>(
this: LoDashImplicitWrapper<List<T> | null | undefined>,
value: T
): number;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.sortedIndex
*/
sortedIndex<T>(
this: LoDashExplicitWrapper<List<T> | null | undefined>,
value: T
): LoDashExplicitWrapper<number>;
}
// _.sortedIndexBy
interface LoDashStatic {
/**
* This method is like `_.sortedIndex` except that it accepts `iteratee`
* which is invoked for `value` and each element of `array` to compute their
* sort ranking. The iteratee is invoked with one argument: (value).
*
* @category Array
* @param array The sorted array to inspect.
* @param value The value to evaluate.
* @param [iteratee=_.identity] The iteratee invoked per element.
* @returns Returns the index at which `value` should be inserted into `array`.
* @example
*
* var dict = { 'thirty': 30, 'forty': 40, 'fifty': 50 };
*
* _.sortedIndexBy(['thirty', 'fifty'], 'forty', _.propertyOf(dict));
* // => 1
*
* // using the `_.property` iteratee shorthand
* _.sortedIndexBy([{ 'x': 4 }, { 'x': 5 }], { 'x': 4 }, 'x');
* // => 0
*/
sortedIndexBy<T>(
array: List<T> | null | undefined,
value: T,
iteratee?: ValueIteratee<T>
): number;
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.sortedIndexBy
*/
sortedIndexBy<T>(
this: LoDashImplicitWrapper<List<T> | null | undefined>,
value: T,
iteratee?: ValueIteratee<T>
): number;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.sortedIndexBy
*/
sortedIndexBy<T>(
this: LoDashExplicitWrapper<List<T> | null | undefined>,
value: T,
iteratee?: ValueIteratee<T>
): LoDashExplicitWrapper<number>;
}
}
-42
View File
@@ -1,42 +0,0 @@
import _ = require("../index");
declare module "../index" {
interface LoDashStatic {
/**
* This method is like `_.indexOf` except that it performs a binary
* search on a sorted `array`.
*
* @category Array
* @param array The array to search.
* @param value The value to search for.
* @returns Returns the index of the matched value, else `-1`.
* @example
*
* _.sortedIndexOf([1, 1, 2, 2], 2);
* // => 2
*/
sortedIndexOf<T>(
array: List<T> | null | undefined,
value: T
): number;
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.sortedIndexOf
*/
sortedIndexOf<T>(
this: LoDashImplicitWrapper<List<T> | null | undefined>,
value: T
): number;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.sortedIndexOf
*/
sortedIndexOf<T>(
this: LoDashExplicitWrapper<List<T> | null | undefined>,
value: T
): LoDashExplicitWrapper<number>;
}
}
-43
View File
@@ -1,43 +0,0 @@
import _ = require("../index");
declare module "../index" {
interface LoDashStatic {
/**
* This method is like `_.sortedIndex` except that it returns the highest
* index at which `value` should be inserted into `array` in order to
* maintain its sort order.
*
* @category Array
* @param array The sorted array to inspect.
* @param value The value to evaluate.
* @returns Returns the index at which `value` should be inserted into `array`.
* @example
*
* _.sortedLastIndex([4, 5], 4);
* // => 1
*/
sortedLastIndex<T>(
array: List<T> | null | undefined,
value: T
): number;
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.sortedLastIndex
*/
sortedLastIndex<T>(
this: LoDashImplicitWrapper<List<T> | null | undefined>,
value: T
): number;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.sortedLastIndex
*/
sortedLastIndex<T>(
this: LoDashExplicitWrapper<List<T> | null | undefined>,
value: T
): LoDashExplicitWrapper<number>;
}
}
-48
View File
@@ -1,48 +0,0 @@
import _ = require("../index");
declare module "../index" {
interface LoDashStatic {
/**
* This method is like `_.sortedLastIndex` except that it accepts `iteratee`
* which is invoked for `value` and each element of `array` to compute their
* sort ranking. The iteratee is invoked with one argument: (value).
*
* @category Array
* @param array The sorted array to inspect.
* @param value The value to evaluate.
* @param [iteratee=_.identity] The iteratee invoked per element.
* @returns Returns the index at which `value` should be inserted into `array`.
* @example
*
* // using the `_.property` iteratee shorthand
* _.sortedLastIndexBy([{ 'x': 4 }, { 'x': 5 }], { 'x': 4 }, 'x');
* // => 1
*/
sortedLastIndexBy<T>(
array: List<T> | null | undefined,
value: T,
iteratee: ValueIteratee<T>
): number;
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.sortedLastIndexBy
*/
sortedLastIndexBy<T>(
this: LoDashImplicitWrapper<List<T> | null | undefined>,
value: T,
iteratee: ValueIteratee<T>
): number;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.sortedLastIndexBy
*/
sortedLastIndexBy<T>(
this: LoDashExplicitWrapper<List<T> | null | undefined>,
value: T,
iteratee: ValueIteratee<T>
): LoDashExplicitWrapper<number>;
}
}
-42
View File
@@ -1,42 +0,0 @@
import _ = require("../index");
declare module "../index" {
interface LoDashStatic {
/**
* This method is like `_.lastIndexOf` except that it performs a binary
* search on a sorted `array`.
*
* @category Array
* @param array The array to search.
* @param value The value to search for.
* @returns Returns the index of the matched value, else `-1`.
* @example
*
* _.sortedLastIndexOf([1, 1, 2, 2], 2);
* // => 3
*/
sortedLastIndexOf<T>(
array: List<T> | null | undefined,
value: T
): number;
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.sortedLastIndexOf
*/
sortedLastIndexOf<T>(
this: LoDashImplicitWrapper<List<T> | null | undefined>,
value: T
): number;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.sortedLastIndexOf
*/
sortedLastIndexOf<T>(
this: LoDashExplicitWrapper<List<T> | null | undefined>,
value: T
): LoDashExplicitWrapper<number>;
}
}
-34
View File
@@ -1,34 +0,0 @@
import _ = require("../index");
declare module "../index" {
interface LoDashStatic {
/**
* This method is like `_.uniq` except that it's designed and optimized
* for sorted arrays.
*
* @category Array
* @param array The array to inspect.
* @returns Returns the new duplicate free array.
* @example
*
* _.sortedUniq([1, 1, 2]);
* // => [1, 2]
*/
sortedUniq<T>(
array: List<T> | null | undefined
): T[];
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.sortedUniq
*/
sortedUniq<T>(this: LoDashImplicitWrapper<List<T> | null | undefined>): LoDashImplicitWrapper<T[]>;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.sortedUniq
*/
sortedUniq<T>(this: LoDashExplicitWrapper<List<T> | null | undefined>): LoDashExplicitWrapper<T[]>;
}
}
-66
View File
@@ -1,66 +0,0 @@
import _ = require("../index");
declare module "../index" {
interface LoDashStatic {
/**
* This method is like `_.uniqBy` except that it's designed and optimized
* for sorted arrays.
*
* @category Array
* @param array The array to inspect.
* @param [iteratee] The iteratee invoked per element.
* @returns Returns the new duplicate free array.
* @example
*
* _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor);
* // => [1.1, 2.2]
*/
sortedUniqBy(
array: string | null | undefined,
iteratee: StringIterator<NotVoid>
): string[];
/**
* @see _.sortedUniqBy
*/
sortedUniqBy<T>(
array: List<T> | null | undefined,
iteratee: ListIteratee<T>
): T[];
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.sortedUniqBy
*/
sortedUniqBy(
this: LoDashImplicitWrapper<string | null | undefined>,
iteratee: StringIterator<NotVoid>
): LoDashImplicitWrapper<string[]>;
/**
* @see _.sortedUniqBy
*/
sortedUniqBy<T>(
this: LoDashImplicitWrapper<List<T> | null | undefined>,
iteratee: ListIteratee<T>
): LoDashImplicitWrapper<T[]>;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.sortedUniqBy
*/
sortedUniqBy(
this: LoDashExplicitWrapper<string | null | undefined>,
iteratee: StringIterator<NotVoid>
): LoDashExplicitWrapper<string[]>;
/**
* @see _.sortedUniqBy
*/
sortedUniqBy<T>(
this: LoDashExplicitWrapper<List<T> | null | undefined>,
iteratee: ListIteratee<T>
): LoDashExplicitWrapper<T[]>;
}
}
-26
View File
@@ -1,26 +0,0 @@
import _ = require("../index");
declare module "../index" {
interface LoDashStatic {
/**
* Gets all but the first element of array.
*
* @param array The array to query.
* @return Returns the slice of array.
*/
tail<T>(array: List<T> | null | undefined): T[];
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.tail
*/
tail<T>(this: LoDashImplicitWrapper<List<T> | null | undefined>): LoDashImplicitWrapper<T[]>;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.tail
*/
tail<T>(this: LoDashExplicitWrapper<List<T> | null | undefined>): LoDashExplicitWrapper<T[]>;
}
}
-36
View File
@@ -1,36 +0,0 @@
import _ = require("../index");
declare module "../index" {
interface LoDashStatic {
/**
* Creates a slice of array with n elements taken from the beginning.
*
* @param array The array to query.
* @param n The number of elements to take.
* @return Returns the slice of array.
*/
take<T>(
array: List<T> | null | undefined,
n?: number
): T[];
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.take
*/
take<T>(
this: LoDashImplicitWrapper<List<T> | null | undefined>,
n?: number
): LoDashImplicitWrapper<T[]>;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.take
*/
take<T>(
this: LoDashExplicitWrapper<List<T> | null | undefined>,
n?: number
): LoDashExplicitWrapper<T[]>;
}
}
-36
View File
@@ -1,36 +0,0 @@
import _ = require("../index");
declare module "../index" {
interface LoDashStatic {
/**
* Creates a slice of array with n elements taken from the end.
*
* @param array The array to query.
* @param n The number of elements to take.
* @return Returns the slice of array.
*/
takeRight<T>(
array: List<T> | null | undefined,
n?: number
): T[];
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.takeRight
*/
takeRight<T>(
this: LoDashImplicitWrapper<List<T> | null | undefined>,
n?: number
): LoDashImplicitWrapper<T[]>;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.takeRight
*/
takeRight<T>(
this: LoDashExplicitWrapper<List<T> | null | undefined>,
n?: number
): LoDashExplicitWrapper<T[]>;
}
}
-47
View File
@@ -1,47 +0,0 @@
import _ = require("../index");
declare module "../index" {
interface LoDashStatic {
/**
* Creates a slice of array with elements taken from the end. Elements are taken until predicate returns
* falsey. The predicate is bound to thisArg and invoked with three arguments: (value, index, array).
*
* If a property name is provided for predicate the created _.property style callback returns the property
* value of the given element.
*
* If a value is also provided for thisArg the created _.matchesProperty style callback returns true for
* elements that have a matching property value, else false.
*
* If an object is provided for predicate the created _.matches style callback returns true for elements that
* have the properties of the given object, else false.
*
* @param array The array to query.
* @param predicate The function invoked per iteration.
* @param thisArg The this binding of predicate.
* @return Returns the slice of array.
*/
takeRightWhile<T>(
array: List<T> | null | undefined,
predicate?: ListIteratee<T>
): T[];
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.takeRightWhile
*/
takeRightWhile<T>(
this: LoDashImplicitWrapper<List<T> | null | undefined>,
predicate?: ListIteratee<T>
): LoDashImplicitWrapper<T[]>;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.takeRightWhile
*/
takeRightWhile<T>(
this: LoDashExplicitWrapper<List<T> | null | undefined>,
predicate?: ListIteratee<T>
): LoDashExplicitWrapper<T[]>;
}
}
-47
View File
@@ -1,47 +0,0 @@
import _ = require("../index");
declare module "../index" {
interface LoDashStatic {
/**
* Creates a slice of array with elements taken from the beginning. Elements are taken until predicate returns
* falsey. The predicate is bound to thisArg and invoked with three arguments: (value, index, array).
*
* If a property name is provided for predicate the created _.property style callback returns the property
* value of the given element.
*
* If a value is also provided for thisArg the created _.matchesProperty style callback returns true for
* elements that have a matching property value, else false.
*
* If an object is provided for predicate the created _.matches style callback returns true for elements that
* have the properties of the given object, else false.
*
* @param array The array to query.
* @param predicate The function invoked per iteration.
* @param thisArg The this binding of predicate.
* @return Returns the slice of array.
*/
takeWhile<T>(
array: List<T> | null | undefined,
predicate?: ListIteratee<T>
): T[];
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.takeWhile
*/
takeWhile<T>(
this: LoDashImplicitWrapper<List<T> | null | undefined>,
predicate?: ListIteratee<T>
): LoDashImplicitWrapper<T[]>;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.takeWhile
*/
takeWhile<T>(
this: LoDashExplicitWrapper<List<T> | null | undefined>,
predicate?: ListIteratee<T>
): LoDashExplicitWrapper<T[]>;
}
}
-33
View File
@@ -1,33 +0,0 @@
import _ = require("../index");
declare module "../index" {
interface LoDashStatic {
/**
* Creates an array of unique values, in order, from all of the provided arrays using SameValueZero for
* equality comparisons.
*
* @param arrays The arrays to inspect.
* @return Returns the new array of combined values.
*/
union<T>(...arrays: Array<List<T> | null | undefined>): T[];
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.union
*/
union<T>(
this: LoDashImplicitWrapper<List<T> | null | undefined>,
...arrays: Array<List<T> | null | undefined>
): LoDashImplicitWrapper<T[]>;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.union
*/
union<T>(
this: LoDashExplicitWrapper<List<T> | null | undefined>,
...arrays: Array<List<T> | null | undefined>
): LoDashExplicitWrapper<T[]>;
}
}
-164
View File
@@ -1,164 +0,0 @@
import _ = require("../index");
declare module "../index" {
interface LoDashStatic {
/**
* This method is like `_.union` except that it accepts `iteratee` which is
* invoked for each element of each `arrays` to generate the criterion by which
* uniqueness is computed. The iteratee is invoked with one argument: (value).
*
* @param arrays The arrays to inspect.
* @param iteratee The iteratee invoked per element.
* @return Returns the new array of combined values.
*/
unionBy<T>(
arrays: List<T> | null | undefined,
iteratee?: ValueIteratee<T>
): T[];
/**
* @see _.unionBy
*/
unionBy<T>(
arrays1: List<T> | null | undefined,
arrays2: List<T> | null | undefined,
iteratee?: ValueIteratee<T>
): T[];
/**
* @see _.unionBy
*/
unionBy<T>(
arrays1: List<T> | null | undefined,
arrays2: List<T> | null | undefined,
arrays3: List<T> | null | undefined,
iteratee?: ValueIteratee<T>
): T[];
/**
* @see _.unionBy
*/
unionBy<T>(
arrays1: List<T> | null | undefined,
arrays2: List<T> | null | undefined,
arrays3: List<T> | null | undefined,
arrays4: List<T> | null | undefined,
iteratee?: ValueIteratee<T>
): T[];
/**
* @see _.unionBy
*/
unionBy<T>(
arrays1: List<T> | null | undefined,
arrays2: List<T> | null | undefined,
arrays3: List<T> | null | undefined,
arrays4: List<T> | null | undefined,
arrays5: List<T> | null | undefined,
...iteratee: Array<ValueIteratee<T> | List<T> | null | undefined>
): T[];
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.unionBy
*/
unionBy<T>(
this: LoDashImplicitWrapper<List<T> | null | undefined>,
iteratee?: ValueIteratee<T>
): LoDashImplicitWrapper<T[]>;
/**
* @see _.unionBy
*/
unionBy<T>(
this: LoDashImplicitWrapper<List<T> | null | undefined>,
arrays2: List<T> | null | undefined,
iteratee?: ValueIteratee<T>
): LoDashImplicitWrapper<T[]>;
/**
* @see _.unionBy
*/
unionBy<T>(
this: LoDashImplicitWrapper<List<T> | null | undefined>,
arrays2: List<T> | null | undefined,
arrays3: List<T> | null | undefined,
iteratee?: ValueIteratee<T>
): LoDashImplicitWrapper<T[]>;
/**
* @see _.unionBy
*/
unionBy<T>(
this: LoDashImplicitWrapper<List<T> | null | undefined>,
arrays2: List<T> | null | undefined,
arrays3: List<T> | null | undefined,
arrays4: List<T> | null | undefined,
iteratee?: ValueIteratee<T>
): LoDashImplicitWrapper<T[]>;
/**
* @see _.unionBy
*/
unionBy<T>(
this: LoDashImplicitWrapper<List<T> | null | undefined>,
arrays2: List<T> | null | undefined,
arrays3: List<T> | null | undefined,
arrays4: List<T> | null | undefined,
arrays5: List<T> | null | undefined,
...iteratee: Array<ValueIteratee<T> | List<T> | null | undefined>
): LoDashImplicitWrapper<T[]>;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.unionBy
*/
unionBy<T>(
this: LoDashExplicitWrapper<List<T> | null | undefined>,
iteratee?: ValueIteratee<T>
): LoDashExplicitWrapper<T[]>;
/**
* @see _.unionBy
*/
unionBy<T>(
this: LoDashExplicitWrapper<List<T> | null | undefined>,
arrays2: List<T> | null | undefined,
iteratee?: ValueIteratee<T>
): LoDashExplicitWrapper<T[]>;
/**
* @see _.unionBy
*/
unionBy<T>(
this: LoDashExplicitWrapper<List<T> | null | undefined>,
arrays2: List<T> | null | undefined,
arrays3: List<T> | null | undefined,
iteratee?: ValueIteratee<T>
): LoDashExplicitWrapper<T[]>;
/**
* @see _.unionBy
*/
unionBy<T>(
this: LoDashExplicitWrapper<List<T> | null | undefined>,
arrays2: List<T> | null | undefined,
arrays3: List<T> | null | undefined,
arrays4: List<T> | null | undefined,
iteratee?: ValueIteratee<T>
): LoDashExplicitWrapper<T[]>;
/**
* @see _.unionBy
*/
unionBy<T>(
this: LoDashExplicitWrapper<List<T> | null | undefined>,
arrays2: List<T> | null | undefined,
arrays3: List<T> | null | undefined,
arrays4: List<T> | null | undefined,
arrays5: List<T> | null | undefined,
...iteratee: Array<ValueIteratee<T> | List<T> | null | undefined>
): LoDashExplicitWrapper<T[]>;
}
}
-103
View File
@@ -1,103 +0,0 @@
import _ = require("../index");
declare module "../index" {
interface LoDashStatic {
/**
* This method is like `_.union` except that it accepts `comparator` which
* is invoked to compare elements of `arrays`. The comparator is invoked
* with two arguments: (arrVal, othVal).
*
* @category Array
* @param [arrays] The arrays to inspect.
* @param [comparator] The comparator invoked per element.
* @returns Returns the new array of combined values.
* @example
*
* var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
* var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
*
* _.unionWith(objects, others, _.isEqual);
* // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]
*/
unionWith<T>(
arrays: List<T> | null | undefined,
comparator?: Comparator<T>
): T[];
/**
* @see _.unionBy
*/
unionWith<T>(
arrays: List<T> | null | undefined,
arrays2: List<T> | null | undefined,
comparator?: Comparator<T>
): T[];
/**
* @see _.unionWith
*/
unionWith<T>(
arrays: List<T> | null | undefined,
arrays2: List<T> | null | undefined,
arrays3: List<T> | null | undefined,
...comparator: Array<Comparator<T> | List<T> | null | undefined>
): T[];
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.unionWith
*/
unionWith<T>(
this: LoDashImplicitWrapper<List<T> | null | undefined>,
comparator?: Comparator<T>
): LoDashImplicitWrapper<T[]>;
/**
* @see _.unionWith
*/
unionWith<T>(
this: LoDashImplicitWrapper<List<T> | null | undefined>,
arrays2: List<T> | null | undefined,
comparator?: Comparator<T>
): LoDashImplicitWrapper<T[]>;
/**
* @see _.unionWith
*/
unionWith<T>(
this: LoDashImplicitWrapper<List<T> | null | undefined>,
arrays2: List<T> | null | undefined,
arrays3: List<T> | null | undefined,
...comparator: Array<Comparator<T> | List<T> | null | undefined>
): LoDashImplicitWrapper<T[]>;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.unionWith
*/
unionWith<T>(
this: LoDashExplicitWrapper<List<T> | null | undefined>,
comparator?: Comparator<T>
): LoDashExplicitWrapper<T[]>;
/**
* @see _.unionWith
*/
unionWith<T>(
this: LoDashExplicitWrapper<List<T> | null | undefined>,
arrays2: List<T> | null | undefined,
comparator?: Comparator<T>
): LoDashExplicitWrapper<T[]>;
/**
* @see _.unionWith
*/
unionWith<T>(
this: LoDashExplicitWrapper<List<T> | null | undefined>,
arrays2: List<T> | null | undefined,
arrays3: List<T> | null | undefined,
...comparator: Array<Comparator<T> | List<T> | null | undefined>
): LoDashExplicitWrapper<T[]>;
}
}
-36
View File
@@ -1,36 +0,0 @@
import _ = require("../index");
declare module "../index" {
interface LoDashStatic {
/**
* Creates a duplicate-free version of an array, using
* [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
* for equality comparisons, in which only the first occurrence of each element
* is kept.
*
* @category Array
* @param array The array to inspect.
* @returns Returns the new duplicate free array.
* @example
*
* _.uniq([2, 1, 2]);
* // => [2, 1]
*/
uniq<T>(
array: List<T> | null | undefined
): T[];
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.uniq
*/
uniq<T>(this: LoDashImplicitWrapper<List<T> | null | undefined>): LoDashImplicitWrapper<T[]>;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.uniq
*/
uniq<T>(this: LoDashExplicitWrapper<List<T> | null | undefined>): LoDashExplicitWrapper<T[]>;
}
}
-71
View File
@@ -1,71 +0,0 @@
import _ = require("../index");
declare module "../index" {
interface LoDashStatic {
/**
* This method is like `_.uniq` except that it accepts `iteratee` which is
* invoked for each element in `array` to generate the criterion by which
* uniqueness is computed. The iteratee is invoked with one argument: (value).
*
* @category Array
* @param array The array to inspect.
* @param [iteratee=_.identity] The iteratee invoked per element.
* @returns Returns the new duplicate free array.
* @example
*
* _.uniqBy([2.1, 1.2, 2.3], Math.floor);
* // => [2.1, 1.2]
*
* // using the `_.property` iteratee shorthand
* _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');
* // => [{ 'x': 1 }, { 'x': 2 }]
*/
uniqBy(
array: string | null | undefined,
iteratee: StringIterator<NotVoid>
): string[];
/**
* @see _.uniqBy
*/
uniqBy<T>(
array: List<T> | null | undefined,
iteratee: ListIteratee<T>
): T[];
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.uniqBy
*/
uniqBy(
this: LoDashImplicitWrapper<string | null | undefined>,
iteratee: StringIterator<NotVoid>
): LoDashImplicitWrapper<string[]>;
/**
* @see _.uniqBy
*/
uniqBy<T>(
this: LoDashImplicitWrapper<List<T> | null | undefined>,
iteratee: ListIteratee<T>
): LoDashImplicitWrapper<T[]>;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.uniqBy
*/
uniqBy(
this: LoDashExplicitWrapper<string | null | undefined>,
iteratee: StringIterator<NotVoid>
): LoDashExplicitWrapper<string[]>;
/**
* @see _.uniqBy
*/
uniqBy<T>(
this: LoDashExplicitWrapper<List<T> | null | undefined>,
iteratee: ListIteratee<T>
): LoDashExplicitWrapper<T[]>;
}
}
-45
View File
@@ -1,45 +0,0 @@
import _ = require("../index");
declare module "../index" {
interface LoDashStatic {
/**
* This method is like `_.uniq` except that it accepts `comparator` which
* is invoked to compare elements of `array`. The comparator is invoked with
* two arguments: (arrVal, othVal).
*
* @category Array
* @param array The array to inspect.
* @param [comparator] The comparator invoked per element.
* @returns Returns the new duplicate free array.
* @example
*
* var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }];
*
* _.uniqWith(objects, _.isEqual);
* // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]
*/
uniqWith<T>(
array: List<T> | null | undefined,
comparator?: Comparator<T>
): T[];
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.uniqWith
*/
uniqWith<T>(
this: LoDashImplicitWrapper<List<T> | null | undefined>,
comparator?: Comparator<T>
): LoDashImplicitWrapper<T[]>;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.uniqWith
*/
uniqWith<T>(
this: LoDashExplicitWrapper<List<T> | null | undefined>,
comparator?: Comparator<T>
): LoDashExplicitWrapper<T[]>;
}
}
-27
View File
@@ -1,27 +0,0 @@
import _ = require("../index");
declare module "../index" {
interface LoDashStatic {
/**
* This method is like _.zip except that it accepts an array of grouped elements and creates an array
* regrouping the elements to their pre-zip configuration.
*
* @param array The array of grouped elements to process.
* @return Returns the new array of regrouped elements.
*/
unzip<T>(array: T[][] | List<List<T>> | null | undefined): T[][];
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.unzip
*/
unzip<T>(this: LoDashImplicitWrapper<T[][] | List<List<T>> | null | undefined>): LoDashImplicitWrapper<T[][]>;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.unzip
*/
unzip<T>(this: LoDashExplicitWrapper<T[][] | List<List<T>> | null | undefined>): LoDashExplicitWrapper<T[][]>;
}
}
-60
View File
@@ -1,60 +0,0 @@
import _ = require("../index");
declare module "../index" {
interface LoDashStatic {
/**
* This method is like _.unzip except that it accepts an iteratee to specify how regrouped values should be
* combined. The iteratee is bound to thisArg and invoked with four arguments: (accumulator, value, index,
* group).
*
* @param array The array of grouped elements to process.
* @param iteratee The function to combine regrouped values.
* @param thisArg The this binding of iteratee.
* @return Returns the new array of regrouped elements.
*/
unzipWith<T, TResult>(
array: List<List<T>> | null | undefined,
iteratee: (...values: T[]) => TResult
): TResult[];
/**
* @see _.unzipWith
*/
unzipWith<T>(
array: List<List<T>> | null | undefined
): T[][];
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.unzipWith
*/
unzipWith<T, TResult>(
this: LoDashImplicitWrapper<List<List<T>> | null | undefined>,
iteratee: (...values: T[]) => TResult
): LoDashImplicitWrapper<TResult[]>;
/**
* @see _.unzipWith
*/
unzipWith<T>(
this: LoDashImplicitWrapper<List<List<T>> | null | undefined>
): LoDashImplicitWrapper<T[][]>;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.unzipWith
*/
unzipWith<T, TResult>(
this: LoDashExplicitWrapper<List<List<T>> | null | undefined>,
iteratee: (...values: T[]) => TResult
): LoDashExplicitWrapper<TResult[]>;
/**
* @see _.unzipWith
*/
unzipWith<T>(
this: LoDashExplicitWrapper<List<List<T>> | null | undefined>
): LoDashExplicitWrapper<T[][]>;
}
}
-36
View File
@@ -1,36 +0,0 @@
import _ = require("../index");
declare module "../index" {
interface LoDashStatic {
/**
* Creates an array excluding all provided values using SameValueZero for equality comparisons.
*
* @param array The array to filter.
* @param values The values to exclude.
* @return Returns the new array of filtered values.
*/
without<T>(
array: List<T> | null | undefined,
...values: T[]
): T[];
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.without
*/
without<T>(
this: LoDashImplicitWrapper<List<T> | null | undefined>,
...values: T[]
): LoDashImplicitWrapper<T[]>;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.without
*/
without<T>(
this: LoDashExplicitWrapper<List<T> | null | undefined>,
...values: T[]
): LoDashExplicitWrapper<T[]>;
}
}
-32
View File
@@ -1,32 +0,0 @@
import _ = require("../index");
declare module "../index" {
interface LoDashStatic {
/**
* Creates an array of unique values that is the symmetric difference of the provided arrays.
*
* @param arrays The arrays to inspect.
* @return Returns the new array of values.
*/
xor<T>(...arrays: Array<List<T> | null | undefined>): T[];
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.xor
*/
xor<T>(
this: LoDashImplicitWrapper<List<T> | null | undefined>,
...arrays: Array<List<T> | null | undefined>
): LoDashImplicitWrapper<T[]>;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.xor
*/
xor<T>(
this: LoDashExplicitWrapper<List<T> | null | undefined>,
...arrays: Array<List<T> | null | undefined>
): LoDashExplicitWrapper<T[]>;
}
}
-104
View File
@@ -1,104 +0,0 @@
import _ = require("../index");
declare module "../index" {
interface LoDashStatic {
/**
* This method is like `_.xor` except that it accepts `iteratee` which is
* invoked for each element of each `arrays` to generate the criterion by which
* uniqueness is computed. The iteratee is invoked with one argument: (value).
*
* @category Array
* @param [arrays] The arrays to inspect.
* @param [iteratee=_.identity] The iteratee invoked per element.
* @returns Returns the new array of values.
* @example
*
* _.xorBy([2.1, 1.2], [4.3, 2.4], Math.floor);
* // => [1.2, 4.3]
*
* // using the `_.property` iteratee shorthand
* _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
* // => [{ 'x': 2 }]
*/
xorBy<T>(
arrays: List<T> | null | undefined,
iteratee?: ValueIteratee<T>
): T[];
/**
* @see _.xorBy
*/
xorBy<T>(
arrays: List<T> | null | undefined,
arrays2: List<T> | null | undefined,
iteratee?: ValueIteratee<T>
): T[];
/**
* @see _.xorBy
*/
xorBy<T>(
arrays: List<T> | null | undefined,
arrays2: List<T> | null | undefined,
arrays3: List<T> | null | undefined,
...iteratee: Array<ValueIteratee<T> | List<T> | null | undefined>
): T[];
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.xor
*/
xorBy<T>(
this: LoDashImplicitWrapper<List<T> | null | undefined>,
iteratee?: ValueIteratee<T>
): LoDashImplicitWrapper<T[]>;
/**
* @see _.xorBy
*/
xorBy<T>(
this: LoDashImplicitWrapper<List<T> | null | undefined>,
arrays2: List<T> | null | undefined,
iteratee?: ValueIteratee<T>
): LoDashImplicitWrapper<T[]>;
/**
* @see _.xorBy
*/
xorBy<T>(
this: LoDashImplicitWrapper<List<T> | null | undefined>,
arrays2: List<T> | null | undefined,
arrays3: List<T> | null | undefined,
...iteratee: Array<ValueIteratee<T> | List<T> | null | undefined>
): LoDashImplicitWrapper<T[]>;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.xorBy
*/
xorBy<T>(
this: LoDashExplicitWrapper<List<T> | null | undefined>,
iteratee?: ValueIteratee<T>
): LoDashExplicitWrapper<T[]>;
/**
* @see _.xorBy
*/
xorBy<T>(
this: LoDashExplicitWrapper<List<T> | null | undefined>,
arrays2: List<T> | null | undefined,
iteratee?: ValueIteratee<T>
): LoDashExplicitWrapper<T[]>;
/**
* @see _.xorBy
*/
xorBy<T>(
this: LoDashExplicitWrapper<List<T> | null | undefined>,
arrays2: List<T> | null | undefined,
arrays3: List<T> | null | undefined,
...iteratee: Array<ValueIteratee<T> | List<T> | null | undefined>
): LoDashExplicitWrapper<T[]>;
}
}
-103
View File
@@ -1,103 +0,0 @@
import _ = require("../index");
declare module "../index" {
interface LoDashStatic {
/**
* This method is like `_.xor` except that it accepts `comparator` which is
* invoked to compare elements of `arrays`. The comparator is invoked with
* two arguments: (arrVal, othVal).
*
* @category Array
* @param [arrays] The arrays to inspect.
* @param [comparator] The comparator invoked per element.
* @returns Returns the new array of values.
* @example
*
* var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
* var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
*
* _.xorWith(objects, others, _.isEqual);
* // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]
*/
xorWith<T>(
arrays: List<T> | null | undefined,
comparator?: Comparator<T>
): T[];
/**
* @see _.xorWith
*/
xorWith<T>(
arrays: List<T> | null | undefined,
arrays2: List<T> | null | undefined,
comparator?: Comparator<T>
): T[];
/**
* @see _.xorWith
*/
xorWith<T>(
arrays: List<T> | null | undefined,
arrays2: List<T> | null | undefined,
arrays3: List<T> | null | undefined,
...comparator: Array<Comparator<T> | List<T> | null | undefined>
): T[];
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.xorWith
*/
xorWith<T>(
this: LoDashImplicitWrapper<List<T> | null | undefined>,
comparator?: Comparator<T>
): LoDashImplicitWrapper<T[]>;
/**
* @see _.xorWith
*/
xorWith<T>(
this: LoDashImplicitWrapper<List<T> | null | undefined>,
arrays2: List<T> | null | undefined,
comparator?: Comparator<T>
): LoDashImplicitWrapper<T[]>;
/**
* @see _.xorWith
*/
xorWith<T>(
this: LoDashImplicitWrapper<List<T> | null | undefined>,
arrays2: List<T> | null | undefined,
arrays3: List<T> | null | undefined,
...comparator: Array<Comparator<T> | List<T> | null | undefined>
): LoDashImplicitWrapper<T[]>;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.xorWith
*/
xorWith<T>(
this: LoDashExplicitWrapper<List<T> | null | undefined>,
comparator?: Comparator<T>
): LoDashExplicitWrapper<T[]>;
/**
* @see _.xorWith
*/
xorWith<T>(
this: LoDashExplicitWrapper<List<T> | null | undefined>,
arrays2: List<T> | null | undefined,
comparator?: Comparator<T>
): LoDashExplicitWrapper<T[]>;
/**
* @see _.xorWith
*/
xorWith<T>(
this: LoDashExplicitWrapper<List<T> | null | undefined>,
arrays2: List<T> | null | undefined,
arrays3: List<T> | null | undefined,
...comparator: Array<Comparator<T> | List<T> | null | undefined>
): LoDashExplicitWrapper<T[]>;
}
}
-129
View File
@@ -1,129 +0,0 @@
import _ = require("../index");
declare module "../index" {
interface LoDashStatic {
/**
* Creates an array of grouped elements, the first of which contains the first elements of the given arrays,
* the second of which contains the second elements of the given arrays, and so on.
*
* @param arrays The arrays to process.
* @return Returns the new array of grouped elements.
*/
zip<T1, T2>(arrays1: List<T1>, arrays2: List<T2>): Array<[T1 | undefined, T2 | undefined]>;
/**
* @see _.zip
*/
zip<T1, T2, T3>(arrays1: List<T1>, arrays2: List<T2>, arrays3: List<T3>): Array<[T1 | undefined, T2 | undefined, T3 | undefined]>;
/**
* @see _.zip
*/
zip<T1, T2, T3, T4>(arrays1: List<T1>, arrays2: List<T2>, arrays3: List<T3>, arrays4: List<T4>): Array<[T1 | undefined, T2 | undefined, T3 | undefined, T4 | undefined]>;
/**
* @see _.zip
*/
zip<T1, T2, T3, T4, T5>(arrays1: List<T1>, arrays2: List<T2>, arrays3: List<T3>, arrays4: List<T4>, arrays5: List<T5>): Array<[T1 | undefined, T2 | undefined, T3 | undefined, T4 | undefined, T5 | undefined]>;
/**
* @see _.zip
*/
zip<T>(...arrays: Array<List<T> | null | undefined>): (T | undefined)[][];
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.zip
*/
zip<T1, T2>(
this: LoDashImplicitWrapper<List<T1>>,
arrays2: List<T2>,
): LoDashImplicitWrapper<Array<[T1 | undefined, T2 | undefined]>>;
/**
* @see _.zip
*/
zip<T1, T2, T3>(
this: LoDashImplicitWrapper<List<T1>>,
arrays2: List<T2>,
arrays3: List<T3>,
): LoDashImplicitWrapper<Array<[T1 | undefined, T2 | undefined, T3 | undefined]>>;
/**
* @see _.zip
*/
zip<T1, T2, T3, T4>(
this: LoDashImplicitWrapper<List<T1>>,
arrays2: List<T2>,
arrays3: List<T3>,
arrays4: List<T4>,
): LoDashImplicitWrapper<Array<[T1 | undefined, T2 | undefined, T3 | undefined, T4 | undefined]>>;
/**
* @see _.zip
*/
zip<T1, T2, T3, T4, T5>(
this: LoDashImplicitWrapper<List<T1>>,
arrays2: List<T2>,
arrays3: List<T3>,
arrays4: List<T4>,
arrays5: List<T5>,
): LoDashImplicitWrapper<Array<[T1 | undefined, T2 | undefined, T3 | undefined, T4 | undefined, T5 | undefined]>>;
/**
* @see _.zip
*/
zip<T>(
this: LoDashImplicitWrapper<List<T> | null | undefined>,
...arrays: Array<List<T> | null | undefined>
): LoDashImplicitWrapper<Array<Array<T | undefined>>>;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.zip
*/
zip<T1, T2>(
this: LoDashExplicitWrapper<List<T1>>,
arrays2: List<T2>,
): LoDashExplicitWrapper<Array<[T1 | undefined, T2 | undefined]>>;
/**
* @see _.zip
*/
zip<T1, T2, T3>(
this: LoDashExplicitWrapper<List<T1>>,
arrays2: List<T2>,
arrays3: List<T3>,
): LoDashExplicitWrapper<Array<[T1 | undefined, T2 | undefined, T3 | undefined]>>;
/**
* @see _.zip
*/
zip<T1, T2, T3, T4>(
this: LoDashExplicitWrapper<List<T1>>,
arrays2: List<T2>,
arrays3: List<T3>,
arrays4: List<T4>,
): LoDashExplicitWrapper<Array<[T1 | undefined, T2 | undefined, T3 | undefined, T4 | undefined]>>;
/**
* @see _.zip
*/
zip<T1, T2, T3, T4, T5>(
this: LoDashExplicitWrapper<List<T1>>,
arrays2: List<T2>,
arrays3: List<T3>,
arrays4: List<T4>,
arrays5: List<T5>,
): LoDashExplicitWrapper<Array<[T1 | undefined, T2 | undefined, T3 | undefined, T4 | undefined, T5 | undefined]>>;
/**
* @see _.zip
*/
zip<T>(
this: LoDashExplicitWrapper<List<T> | null | undefined>,
...arrays: Array<List<T> | null | undefined>
): LoDashExplicitWrapper<Array<Array<T | undefined>>>;
}
}
-58
View File
@@ -1,58 +0,0 @@
import _ = require("../index");
declare module "../index" {
interface LoDashStatic {
/**
* This method is like _.fromPairs except that it accepts two arrays, one of property
* identifiers and one of corresponding values.
*
* @param props The property names.
* @param values The property values.
* @return Returns the new object.
*/
zipObject<T>(
props: List<PropertyName>,
values: List<T>
): Dictionary<T>;
/**
* @see _.zipObject
*/
zipObject(
props?: List<PropertyName>
): Dictionary<undefined>;
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.zipObject
*/
zipObject<T>(
this: LoDashImplicitWrapper<List<PropertyName>>,
values: List<T>
): LoDashImplicitWrapper<Dictionary<T>>;
/**
* @see _.zipObject
*/
zipObject(
this: LoDashImplicitWrapper<List<PropertyName>>
): LoDashImplicitWrapper<Dictionary<undefined>>;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.zipObject
*/
zipObject<T>(
this: LoDashExplicitWrapper<List<PropertyName>>,
values: List<T>
): LoDashExplicitWrapper<Dictionary<T>>;
/**
* @see _.zipObject
*/
zipObject(
this: LoDashExplicitWrapper<List<PropertyName>>
): LoDashExplicitWrapper<Dictionary<undefined>>;
}
}
-36
View File
@@ -1,36 +0,0 @@
import _ = require("../index");
declare module "../index" {
interface LoDashStatic {
/**
* This method is like _.zipObject except that it supports property paths.
*
* @param paths The property names.
* @param values The property values.
* @return Returns the new object.
*/
zipObjectDeep(
paths?: List<PropertyPath>,
values?: List<any>
): object;
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.zipObjectDeep
*/
zipObjectDeep(
this: LoDashImplicitWrapper<List<PropertyPath>>,
values?: List<any>
): LoDashImplicitWrapper<object>;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.zipObjectDeep
*/
zipObjectDeep(
this: LoDashExplicitWrapper<List<PropertyPath>>,
values?: List<any>
): LoDashExplicitWrapper<object>;
}
}
-187
View File
@@ -1,187 +0,0 @@
import _ = require("../index");
declare module "../index" {
interface LoDashStatic {
/**
* This method is like _.zip except that it accepts an iteratee to specify how grouped values should be
* combined. The iteratee is bound to thisArg and invoked with four arguments: (accumulator, value, index,
* group).
* @param [arrays] The arrays to process.
* @param [iteratee] The function to combine grouped values.
* @param [thisArg] The `this` binding of `iteratee`.
* @return Returns the new array of grouped elements.
*/
zipWith<T, TResult>(
arrays: List<T>,
iteratee: (value1: T) => TResult
): TResult[];
/**
* @see _.zipWith
*/
zipWith<T1, T2, TResult>(
arrays1: List<T1>,
arrays2: List<T2>,
iteratee: (value1: T1, value2: T2) => TResult
): TResult[];
/**
* @see _.zipWith
*/
zipWith<T1, T2, T3, TResult>(
arrays1: List<T1>,
arrays2: List<T2>,
arrays3: List<T3>,
iteratee: (value1: T1, value2: T2, value3: T3) => TResult
): TResult[];
/**
* @see _.zipWith
*/
zipWith<T1, T2, T3, T4, TResult>(
arrays1: List<T1>,
arrays2: List<T2>,
arrays3: List<T3>,
arrays4: List<T4>,
iteratee: (value1: T1, value2: T2, value3: T3, value4: T4) => TResult
): TResult[];
/**
* @see _.zipWith
*/
zipWith<T1, T2, T3, T4, T5, TResult>(
arrays1: List<T1>,
arrays2: List<T2>,
arrays3: List<T3>,
arrays4: List<T4>,
arrays5: List<T5>,
iteratee: (value1: T1, value2: T2, value3: T3, value4: T4, value5: T5) => TResult
): TResult[];
/**
* @see _.zipWith
*/
zipWith<T, TResult>(
...iteratee: Array<((...group: T[]) => TResult) | List<T> | null | undefined>
): TResult[];
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.zipWith
*/
zipWith<T, TResult>(
this: LoDashImplicitWrapper<List<T>>,
iteratee: (value1: T) => TResult
): LoDashImplicitWrapper<TResult[]>;
/**
* @see _.zipWith
*/
zipWith<T1, T2, TResult>(
this: LoDashImplicitWrapper<List<T1>>,
arrays2: List<T2>,
iteratee: (value1: T1, value2: T2) => TResult
): LoDashImplicitWrapper<TResult[]>;
/**
* @see _.zipWith
*/
zipWith<T1, T2, T3, TResult>(
this: LoDashImplicitWrapper<List<T1>>,
arrays2: List<T2>,
arrays3: List<T3>,
iteratee: (value1: T1, value2: T2, value3: T3) => TResult
): LoDashImplicitWrapper<TResult[]>;
/**
* @see _.zipWith
*/
zipWith<T1, T2, T3, T4, TResult>(
this: LoDashImplicitWrapper<List<T1>>,
arrays2: List<T2>,
arrays3: List<T3>,
arrays4: List<T4>,
iteratee: (value1: T1, value2: T2, value3: T3, value4: T4) => TResult
): LoDashImplicitWrapper<TResult[]>;
/**
* @see _.zipWith
*/
zipWith<T1, T2, T3, T4, T5, TResult>(
this: LoDashImplicitWrapper<List<T1>>,
arrays2: List<T2>,
arrays3: List<T3>,
arrays4: List<T4>,
arrays5: List<T5>,
iteratee: (value1: T1, value2: T2, value3: T3, value4: T4, value5: T5) => TResult
): LoDashImplicitWrapper<TResult[]>;
/**
* @see _.zipWith
*/
zipWith<T, TResult>(
this: LoDashImplicitWrapper<List<T> | null | undefined>,
...iteratee: Array<((...group: T[]) => TResult) | List<T> | null | undefined>
): LoDashImplicitWrapper<TResult[]>;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.zipWith
*/
zipWith<T, TResult>(
this: LoDashExplicitWrapper<List<T>>,
iteratee: (value1: T) => TResult
): LoDashExplicitWrapper<TResult[]>;
/**
* @see _.zipWith
*/
zipWith<T1, T2, TResult>(
this: LoDashExplicitWrapper<List<T1>>,
arrays2: List<T2>,
iteratee: (value1: T1, value2: T2) => TResult
): LoDashExplicitWrapper<TResult[]>;
/**
* @see _.zipWith
*/
zipWith<T1, T2, T3, TResult>(
this: LoDashExplicitWrapper<List<T1>>,
arrays2: List<T2>,
arrays3: List<T3>,
iteratee: (value1: T1, value2: T2, value3: T3) => TResult
): LoDashExplicitWrapper<TResult[]>;
/**
* @see _.zipWith
*/
zipWith<T1, T2, T3, T4, TResult>(
this: LoDashExplicitWrapper<List<T1>>,
arrays2: List<T2>,
arrays3: List<T3>,
arrays4: List<T4>,
iteratee: (value1: T1, value2: T2, value3: T3, value4: T4) => TResult
): LoDashExplicitWrapper<TResult[]>;
/**
* @see _.zipWith
*/
zipWith<T1, T2, T3, T4, T5, TResult>(
this: LoDashExplicitWrapper<List<T1>>,
arrays2: List<T2>,
arrays3: List<T3>,
arrays4: List<T4>,
arrays5: List<T5>,
iteratee: (value1: T1, value2: T2, value3: T3, value4: T4, value5: T5) => TResult
): LoDashExplicitWrapper<TResult[]>;
/**
* @see _.zipWith
*/
zipWith<T, TResult>(
this: LoDashExplicitWrapper<List<T> | null | undefined>,
...iteratee: Array<((...group: T[]) => TResult) | List<T> | null | undefined>
): LoDashExplicitWrapper<TResult[]>;
}
}
-121
View File
@@ -1,121 +0,0 @@
import _ = require("../index");
declare module "../index" {
interface LoDashStatic {
/**
* Creates an object composed of keys generated from the results of running each element of collection through
* iteratee. The corresponding value of each key is the number of times the key was returned by iteratee. The
* iteratee is bound to thisArg and invoked with three arguments:
* (value, index|key, collection).
*
* If a property name is provided for iteratee the created _.property style callback returns the property
* value of the given element.
*
* If a value is also provided for thisArg the created _.matchesProperty style callback returns true for
* elements that have a matching property value, else false.
*
* If an object is provided for iteratee the created _.matches style callback returns true for elements that
* have the properties of the given object, else false.
*
* @param collection The collection to iterate over.
* @param iteratee The function invoked per iteration.
* @param thisArg The this binding of iteratee.
* @return Returns the composed aggregate object.
*/
countBy<T>(
collection: string | null | undefined,
iteratee?: StringIterator<T>
): Dictionary<number>;
/**
* @see _.countBy
*/
countBy<T>(
collection: List<T> | null | undefined,
iteratee?: ListIteratee<T>
): Dictionary<number>;
/**
* @see _.countBy
*/
countBy<T>(
collection: NumericDictionary<T> | null | undefined,
iteratee?: NumericDictionaryIteratee<T>
): Dictionary<number>;
/**
* @see _.countBy
*/
countBy<T extends object>(
collection: T | null | undefined,
iteratee?: ObjectIteratee<T>
): Dictionary<number>;
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.countBy
*/
countBy<T>(
this: LoDashImplicitWrapper<string | null | undefined>,
iteratee?: StringIterator<T>
): LoDashImplicitWrapper<Dictionary<number>>;
/**
* @see _.countBy
*/
countBy<T>(
this: LoDashImplicitWrapper<List<T> | null | undefined>,
iteratee?: ListIteratee<T>
): LoDashImplicitWrapper<Dictionary<number>>;
/**
* @see _.countBy
*/
countBy<T extends object>(
this: LoDashImplicitWrapper<T | null | undefined>,
iteratee?: ObjectIteratee<T>
): LoDashImplicitWrapper<Dictionary<number>>;
/**
* @see _.countBy
*/
countBy<T>(
this: LoDashImplicitWrapper<NumericDictionary<T> | null | undefined>,
iteratee?: NumericDictionaryIteratee<T>
): LoDashImplicitWrapper<Dictionary<number>>;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.countBy
*/
countBy<T>(
this: LoDashExplicitWrapper<string | null | undefined>,
iteratee?: StringIterator<T>
): LoDashExplicitWrapper<Dictionary<number>>;
/**
* @see _.countBy
*/
countBy<T>(
this: LoDashExplicitWrapper<List<T> | null | undefined>,
iteratee?: ListIteratee<T>
): LoDashExplicitWrapper<Dictionary<number>>;
/**
* @see _.countBy
*/
countBy<T extends object>(
this: LoDashExplicitWrapper<T | null | undefined>,
iteratee?: ObjectIteratee<T>
): LoDashExplicitWrapper<Dictionary<number>>;
/**
* @see _.countBy
*/
countBy<T>(
this: LoDashExplicitWrapper<NumericDictionary<T> | null | undefined>,
iteratee?: NumericDictionaryIteratee<T>
): LoDashExplicitWrapper<Dictionary<number>>;
}
}
-40
View File
@@ -1,40 +0,0 @@
import _ = require("../index");
declare module "../index" {
interface LoDashStatic {
each: typeof _.forEach; // tslint:disable-line:no-unnecessary-qualifier
}
interface LoDashWrapper<TValue> {
/**
* @see _.forEach
*/
each<T>(
this: LoDashWrapper<T[] | null | undefined>,
iteratee?: ArrayIterator<T, any>
): this;
/**
* @see _.forEach
*/
each(
this: LoDashWrapper<string | null | undefined>,
iteratee?: StringIterator<any>
): this;
/**
* @see _.forEach
*/
each<T>(
this: LoDashWrapper<List<T> | null | undefined>,
iteratee?: ListIterator<T, any>
): this;
/**
* @see _.forEach
*/
each<T extends object>(
this: LoDashWrapper<T | null | undefined>,
iteratee?: ObjectIterator<T, any>
): this;
}
}
-40
View File
@@ -1,40 +0,0 @@
import _ = require("../index");
declare module "../index" {
interface LoDashStatic {
eachRight: typeof _.forEachRight; // tslint:disable-line:no-unnecessary-qualifier
}
interface LoDashWrapper<TValue> {
/**
* @see _.forEachRight
*/
eachRight<T>(
this: LoDashWrapper<T[] | null | undefined>,
iteratee?: ArrayIterator<T, any>
): this;
/**
* @see _.forEachRight
*/
eachRight(
this: LoDashWrapper<string | null | undefined>,
iteratee?: StringIterator<any>
): this;
/**
* @see _.forEachRight
*/
eachRight<T>(
this: LoDashWrapper<List<T> | null | undefined>,
iteratee?: ListIterator<T, any>
): this;
/**
* @see _.forEachRight
*/
eachRight<T extends object>(
this: LoDashWrapper<T | null | undefined>,
iteratee?: ObjectIterator<T, any>
): this;
}
}
-85
View File
@@ -1,85 +0,0 @@
import _ = require("../index");
declare module "../index" {
interface LoDashStatic {
/**
* Checks if predicate returns truthy for all elements of collection. Iteration is stopped once predicate
* returns falsey. The predicate is invoked with three arguments: (value, index|key, collection).
*
* @param collection The collection to iterate over.
* @param predicate The function invoked per iteration.
* @return Returns true if all elements pass the predicate check, else false.
*/
every<T>(
collection: List<T> | null | undefined,
predicate?: ListIterateeCustom<T, boolean>
): boolean;
/**
* @see _.every
*/
every<T>(
collection: NumericDictionary<T> | null | undefined,
predicate?: NumericDictionaryIterateeCustom<T, boolean>
): boolean;
/**
* @see _.every
*/
every<T extends object>(
collection: T | null | undefined,
predicate?: ObjectIterateeCustom<T, boolean>
): boolean;
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.every
*/
every<T>(
this: LoDashImplicitWrapper<List<T> | null | undefined>,
predicate?: ListIterateeCustom<T, boolean>
): boolean;
/**
* @see _.every
*/
every<T extends object>(
this: LoDashImplicitWrapper<T | null | undefined>,
predicate?: ObjectIterateeCustom<T, boolean>
): boolean;
/**
* @see _.every
*/
every<T>(
this: LoDashImplicitWrapper<NumericDictionary<T> | null | undefined>,
predicate?: NumericDictionaryIterateeCustom<T, boolean>
): boolean;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.every
*/
every<T>(
this: LoDashExplicitWrapper<List<T> | null | undefined>,
predicate?: ListIterateeCustom<T, boolean>
): LoDashExplicitWrapper<boolean>;
/**
* @see _.every
*/
every<T extends object>(
this: LoDashExplicitWrapper<T | null | undefined>,
predicate?: ObjectIterateeCustom<T, boolean>
): LoDashExplicitWrapper<boolean>;
/**
* @see _.every
*/
every<T>(
this: LoDashExplicitWrapper<NumericDictionary<T> | null | undefined>,
predicate?: NumericDictionaryIterateeCustom<T, boolean>
): LoDashExplicitWrapper<boolean>;
}
}
-143
View File
@@ -1,143 +0,0 @@
import _ = require("../index");
declare module "../index" {
interface LoDashStatic {
/**
* Iterates over elements of collection, returning an array of all elements predicate returns truthy for. The
* predicate is bound to thisArg and invoked with three arguments: (value, index|key, collection).
*
* If a property name is provided for predicate the created _.property style callback returns the property
* value of the given element.
*
* If a value is also provided for thisArg the created _.matchesProperty style callback returns true for
* elements that have a matching property value, else false.
*
* If an object is provided for predicate the created _.matches style callback returns true for elements that
* have the properties of the given object, else false.
*
* @param collection The collection to iterate over.
* @param predicate The function invoked per iteration.
* @param thisArg The this binding of predicate.
* @return Returns the new filtered array.
*/
filter(
collection: string | null | undefined,
predicate?: StringIterator<boolean>
): string[];
/**
* @see _.filter
*/
filter<T, S extends T>(
collection: List<T> | null | undefined,
predicate: ListIteratorTypeGuard<T, S>
): S[];
/**
* @see _.filter
*/
filter<T>(
collection: List<T> | null | undefined,
predicate?: ListIterateeCustom<T, boolean>
): T[];
/**
* @see _.filter
*/
filter<T extends object, S extends T[keyof T]>(
collection: T | null | undefined,
predicate: ObjectIteratorTypeGuard<T, S>
): S[];
/**
* @see _.filter
*/
filter<T extends object>(
collection: T | null | undefined,
predicate?: ObjectIterateeCustom<T, boolean>
): Array<T[keyof T]>;
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.filter
*/
filter(
this: LoDashImplicitWrapper<string | null | undefined>,
predicate?: StringIterator<boolean>
): LoDashImplicitWrapper<string[]>;
/**
* @see _.filter
*/
filter<T, S extends T>(
this: LoDashImplicitWrapper<List<T> | null | undefined>,
predicate: ListIteratorTypeGuard<T, S>
): LoDashImplicitWrapper<S[]>;
/**
* @see _.filter
*/
filter<T>(
this: LoDashImplicitWrapper<List<T> | null | undefined>,
predicate?: ListIterateeCustom<T, boolean>
): LoDashImplicitWrapper<T[]>;
/**
* @see _.filter
*/
filter<T extends object, S extends T[keyof T]>(
this: LoDashImplicitWrapper<T | null | undefined>,
predicate: ObjectIteratorTypeGuard<T, S>
): LoDashImplicitWrapper<S[]>;
/**
* @see _.filter
*/
filter<T extends object>(
this: LoDashImplicitWrapper<T | null | undefined>,
predicate?: ObjectIterateeCustom<T, boolean>
): LoDashImplicitWrapper<Array<T[keyof T]>>;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.filter
*/
filter(
this: LoDashExplicitWrapper<string | null | undefined>,
predicate?: StringIterator<boolean>
): LoDashExplicitWrapper<string[]>;
/**
* @see _.filter
*/
filter<T, S extends T>(
this: LoDashExplicitWrapper<List<T> | null | undefined>,
predicate: ListIteratorTypeGuard<T, S>
): LoDashExplicitWrapper<S[]>;
/**
* @see _.filter
*/
filter<T>(
this: LoDashExplicitWrapper<List<T> | null | undefined>,
predicate?: ListIterateeCustom<T, boolean>
): LoDashExplicitWrapper<T[]>;
/**
* @see _.filter
*/
filter<T extends object, S extends T[keyof T]>(
this: LoDashExplicitWrapper<T | null | undefined>,
predicate: ObjectIteratorTypeGuard<T, S>
): LoDashExplicitWrapper<S[]>;
/**
* @see _.filter
*/
filter<T extends object>(
this: LoDashExplicitWrapper<T | null | undefined>,
predicate?: ObjectIterateeCustom<T, boolean>
): LoDashExplicitWrapper<Array<T[keyof T]>>;
}
}
-131
View File
@@ -1,131 +0,0 @@
import _ = require("../index");
declare module "../index" {
interface LoDashStatic {
/**
* Iterates over elements of collection, returning the first element predicate returns truthy for.
* The predicate is bound to thisArg and invoked with three arguments: (value, index|key, collection).
*
* If a property name is provided for predicate the created _.property style callback returns the property
* value of the given element.
*
* If a value is also provided for thisArg the created _.matchesProperty style callback returns true for
* elements that have a matching property value, else false.
*
* If an object is provided for predicate the created _.matches style callback returns true for elements that
* have the properties of the given object, else false.
*
* @param collection The collection to search.
* @param predicate The function invoked per iteration.
* @param fromIndex The index to search from.
* @return Returns the matched element, else undefined.
*/
find<T, S extends T>(
collection: List<T> | null | undefined,
predicate: ListIteratorTypeGuard<T, S>,
fromIndex?: number
): S|undefined;
/**
* @see _.find
*/
find<T>(
collection: List<T> | null | undefined,
predicate?: ListIterateeCustom<T, boolean>,
fromIndex?: number
): T|undefined;
/**
* @see _.find
*/
find<T extends object, S extends T[keyof T]>(
collection: T | null | undefined,
predicate: ObjectIteratorTypeGuard<T, S>,
fromIndex?: number
): S|undefined;
/**
* @see _.find
*/
find<T extends object>(
collection: T | null | undefined,
predicate?: ObjectIterateeCustom<T, boolean>,
fromIndex?: number
): T[keyof T]|undefined;
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.find
*/
find<T, S extends T>(
this: LoDashImplicitWrapper<List<T> | null | undefined>,
predicate: ListIteratorTypeGuard<T, S>,
fromIndex?: number
): S|undefined;
/**
* @see _.find
*/
find<T>(
this: LoDashImplicitWrapper<List<T> | null | undefined>,
predicate?: ListIterateeCustom<T, boolean>,
fromIndex?: number
): T|undefined;
/**
* @see _.find
*/
find<T extends object, S extends T[keyof T]>(
this: LoDashImplicitWrapper<T | null | undefined>,
predicate: ObjectIteratorTypeGuard<T, S>,
fromIndex?: number
): S|undefined;
/**
* @see _.find
*/
find<T extends object>(
this: LoDashImplicitWrapper<T | null | undefined>,
predicate?: ObjectIterateeCustom<T, boolean>,
fromIndex?: number
): T[keyof T]|undefined;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.find
*/
find<T, S extends T>(
this: LoDashExplicitWrapper<List<T> | null | undefined>,
predicate: ListIteratorTypeGuard<T, S>,
fromIndex?: number
): LoDashExplicitWrapper<S|undefined>;
/**
* @see _.find
*/
find<T>(
this: LoDashExplicitWrapper<List<T> | null | undefined>,
predicate?: ListIterateeCustom<T, boolean>,
fromIndex?: number
): LoDashExplicitWrapper<T|undefined>;
/**
* @see _.find
*/
find<T extends object, S extends T[keyof T]>(
this: LoDashExplicitWrapper<T | null | undefined>,
predicate: ObjectIteratorTypeGuard<T, S>,
fromIndex?: number
): LoDashExplicitWrapper<S|undefined>;
/**
* @see _.find
*/
find<T extends object>(
this: LoDashExplicitWrapper<T | null | undefined>,
predicate?: ObjectIterateeCustom<T, boolean>,
fromIndex?: number
): LoDashExplicitWrapper<T[keyof T]|undefined>;
}
}
-121
View File
@@ -1,121 +0,0 @@
import _ = require("../index");
declare module "../index" {
interface LoDashStatic {
/**
* This method is like _.find except that it iterates over elements of a collection from
* right to left.
* @param collection Searches for a value in this list.
* @param predicate The function called per iteration.
* @param fromIndex The index to search from.
* @return The found element, else undefined.
**/
findLast<T, S extends T>(
collection: List<T> | null | undefined,
predicate: ListIteratorTypeGuard<T, S>,
fromIndex?: number
): S|undefined;
/**
* @see _.findLast
*/
findLast<T>(
collection: List<T> | null | undefined,
predicate?: ListIterateeCustom<T, boolean>,
fromIndex?: number
): T|undefined;
/**
* @see _.findLast
*/
findLast<T extends object, S extends T[keyof T]>(
collection: T | null | undefined,
predicate: ObjectIteratorTypeGuard<T, S>,
fromIndex?: number
): S|undefined;
/**
* @see _.findLast
*/
findLast<T extends object>(
collection: T | null | undefined,
predicate?: ObjectIterateeCustom<T, boolean>,
fromIndex?: number
): T[keyof T]|undefined;
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.findLast
*/
findLast<T, S extends T>(
this: LoDashImplicitWrapper<List<T> | null | undefined>,
predicate: ListIteratorTypeGuard<T, S>,
fromIndex?: number
): S | undefined;
/**
* @see _.findLast
*/
findLast<T>(
this: LoDashImplicitWrapper<List<T> | null | undefined>,
predicate?: ListIterateeCustom<T, boolean>,
fromIndex?: number
): T | undefined;
/**
* @see _.findLast
*/
findLast<T extends object, S extends T[keyof T]>(
this: LoDashImplicitWrapper<T | null | undefined>,
predicate: ObjectIteratorTypeGuard<T, S>,
fromIndex?: number
): S|undefined;
/**
* @see _.findLast
*/
findLast<T extends object>(
this: LoDashImplicitWrapper<T | null | undefined>,
predicate?: ObjectIterateeCustom<T, boolean>,
fromIndex?: number
): T[keyof T]|undefined;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.findLast
*/
findLast<T, S extends T>(
this: LoDashExplicitWrapper<List<T> | null | undefined>,
predicate: ListIteratorTypeGuard<T, S>,
fromIndex?: number
): LoDashExplicitWrapper<S | undefined>;
/**
* @see _.findLast
*/
findLast<T>(
this: LoDashExplicitWrapper<List<T> | null | undefined>,
predicate?: ListIterateeCustom<T, boolean>,
fromIndex?: number
): LoDashExplicitWrapper<T | undefined>;
/**
* @see _.findLast
*/
findLast<T extends object, S extends T[keyof T]>(
this: LoDashExplicitWrapper<T | null | undefined>,
predicate: ObjectIteratorTypeGuard<T, S>,
fromIndex?: number
): LoDashExplicitWrapper<S|undefined>;
/**
* @see _.findLast
*/
findLast<T extends object>(
this: LoDashExplicitWrapper<T | null | undefined>,
predicate?: ObjectIterateeCustom<T, boolean>,
fromIndex?: number
): LoDashExplicitWrapper<T[keyof T]|undefined>;
}
}
-164
View File
@@ -1,164 +0,0 @@
import _ = require("../index");
declare module "../index" {
interface LoDashStatic {
/**
* Creates an array of flattened values by running each element in collection through iteratee
* and concating its result to the other mapped values. The iteratee is invoked with three arguments:
* (value, index|key, collection).
*
* @param collection The collection to iterate over.
* @param iteratee The function invoked per iteration.
* @return Returns the new flattened array.
*/
flatMap<T>(
collection: List<Many<T>> | Dictionary<Many<T>> | NumericDictionary<Many<T>> | null | undefined
): T[];
/**
* @see _.flatMap
*/
flatMap(
collection: object | null | undefined
): any[];
/**
* @see _.flatMap
*/
flatMap<T, TResult>(
collection: List<T> | null | undefined,
iteratee: ListIterator<T, Many<TResult>>
): TResult[];
/**
* @see _.flatMap
*/
flatMap<T, TResult>(
collection: NumericDictionary<T> | null | undefined,
iteratee: NumericDictionaryIterator<T, Many<TResult>>
): TResult[];
/**
* @see _.flatMap
*/
flatMap<T extends object, TResult>(
collection: T | null | undefined,
iteratee: ObjectIterator<T, Many<TResult>>
): TResult[];
/**
* @see _.flatMap
*/
flatMap(
collection: object | null | undefined,
iteratee: string
): any[];
/**
* @see _.flatMap
*/
flatMap(
collection: object | null | undefined,
iteratee: object
): boolean[];
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.flatMap
*/
flatMap<T>(this: LoDashImplicitWrapper<List<Many<T>> | Dictionary<Many<T>> | NumericDictionary<Many<T>> | null | undefined>): LoDashImplicitWrapper<T[]>;
/**
* @see _.flatMap
*/
flatMap(): LoDashImplicitWrapper<any[]>;
/**
* @see _.flatMap
*/
flatMap<T, TResult>(
this: LoDashImplicitWrapper<List<T> | null | undefined>,
iteratee: ListIterator<T, Many<TResult>>
): LoDashImplicitWrapper<TResult[]>;
/**
* @see _.flatMap
*/
flatMap<T extends object, TResult>(
this: LoDashImplicitWrapper<T | null | undefined>,
iteratee: ObjectIterator<T, Many<TResult>>
): LoDashImplicitWrapper<TResult[]>;
/**
* @see _.flatMap
*/
flatMap<T, TResult>(
this: LoDashImplicitWrapper<NumericDictionary<T> | null | undefined>,
iteratee: NumericDictionaryIterator<T, Many<TResult>>
): LoDashImplicitWrapper<TResult[]>;
/**
* @see _.flatMap
*/
flatMap(
iteratee: string
): LoDashImplicitWrapper<any[]>;
/**
* @see _.flatMap
*/
flatMap(
iteratee: object
): LoDashImplicitWrapper<boolean[]>;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.flatMap
*/
flatMap<T>(this: LoDashExplicitWrapper<List<Many<T>> | Dictionary<Many<T>> | NumericDictionary<Many<T>> | null | undefined>): LoDashExplicitWrapper<T[]>;
/**
* @see _.flatMap
*/
flatMap(): LoDashExplicitWrapper<any[]>;
/**
* @see _.flatMap
*/
flatMap<T, TResult>(
this: LoDashExplicitWrapper<List<T> | null | undefined>,
iteratee: ListIterator<T, Many<TResult>>
): LoDashExplicitWrapper<TResult[]>;
/**
* @see _.flatMap
*/
flatMap<T, TResult>(
this: LoDashExplicitWrapper<NumericDictionary<T> | null | undefined>,
iteratee: NumericDictionaryIterator<T, Many<TResult>>
): LoDashExplicitWrapper<TResult[]>;
/**
* @see _.flatMap
*/
flatMap<T extends object, TResult>(
this: LoDashExplicitWrapper<T | null | undefined>,
iteratee: ObjectIterator<T, Many<TResult>>
): LoDashExplicitWrapper<TResult[]>;
/**
* @see _.flatMap
*/
flatMap(
iteratee: string
): LoDashExplicitWrapper<any[]>;
/**
* @see _.flatMap
*/
flatMap(
iteratee: object
): LoDashExplicitWrapper<boolean[]>;
}
}
-164
View File
@@ -1,164 +0,0 @@
import _ = require("../index");
declare module "../index" {
interface LoDashStatic {
/**
* This method is like `_.flatMap` except that it recursively flattens the
* mapped results.
*
* @since 4.7.0
* @category Collection
* @param collection The collection to iterate over.
* @param [iteratee=_.identity] The function invoked per iteration.
* @returns Returns the new flattened array.
* @example
*
* function duplicate(n) {
* return [[[n, n]]];
* }
*
* _.flatMapDeep([1, 2], duplicate);
* // => [1, 1, 2, 2]
*/
flatMapDeep<T>(
collection: List<ListOfRecursiveArraysOrValues<T> | T> | Dictionary<ListOfRecursiveArraysOrValues<T> | T> | NumericDictionary<ListOfRecursiveArraysOrValues<T> | T> | null | undefined
): T[];
/**
* @see _.flatMapDeep
*/
flatMapDeep<T, TResult>(
collection: List<T> | null | undefined,
iteratee: ListIterator<T, ListOfRecursiveArraysOrValues<TResult> | TResult>
): TResult[];
/**
* @see _.flatMapDeep
*/
flatMapDeep<T, TResult>(
collection: NumericDictionary<T> | null | undefined,
iteratee: NumericDictionaryIterator<T, ListOfRecursiveArraysOrValues<TResult> | TResult>
): TResult[];
/**
* @see _.flatMapDeep
*/
flatMapDeep<T extends object, TResult>(
collection: T | null | undefined,
iteratee: ObjectIterator<T, ListOfRecursiveArraysOrValues<TResult> | TResult>
): TResult[];
/**
* @see _.flatMapDeep
*/
flatMapDeep(
collection: object | null | undefined,
iteratee: string
): any[];
/**
* @see _.flatMapDeep
*/
flatMapDeep(
collection: object | null | undefined,
iteratee: object
): boolean[];
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.flatMapDeep
*/
flatMapDeep<T>(
this: LoDashImplicitWrapper<List<ListOfRecursiveArraysOrValues<T> | T> | Dictionary<ListOfRecursiveArraysOrValues<T> | T> | NumericDictionary<ListOfRecursiveArraysOrValues<T> | T> | null | undefined>
): LoDashImplicitWrapper<T[]>;
/**
* @see _.flatMapDeep
*/
flatMapDeep<T, TResult>(
this: LoDashImplicitWrapper<List<T> | null | undefined>,
iteratee: ListIterator<T, ListOfRecursiveArraysOrValues<TResult> | TResult>
): LoDashImplicitWrapper<TResult[]>;
/**
* @see _.flatMapDeep
*/
flatMapDeep<T, TResult>(
this: LoDashImplicitWrapper<NumericDictionary<T> | null | undefined>,
iteratee: NumericDictionaryIterator<T, ListOfRecursiveArraysOrValues<TResult> | TResult>
): LoDashImplicitWrapper<TResult[]>;
/**
* @see _.flatMapDeep
*/
flatMapDeep<T extends object, TResult>(
this: LoDashImplicitWrapper<T | null | undefined>,
iteratee: ObjectIterator<T, ListOfRecursiveArraysOrValues<TResult> | TResult>
): LoDashImplicitWrapper<TResult[]>;
/**
* @see _.flatMapDeep
*/
flatMapDeep(
this: LoDashImplicitWrapper<object | null | undefined>,
iteratee: string
): LoDashImplicitWrapper<any[]>;
/**
* @see _.flatMapDeep
*/
flatMapDeep(
this: LoDashImplicitWrapper<object | null | undefined>,
iteratee: object
): LoDashImplicitWrapper<boolean[]>;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.flatMapDeep
*/
flatMapDeep<T>(
this: LoDashExplicitWrapper<List<ListOfRecursiveArraysOrValues<T> | T> | Dictionary<ListOfRecursiveArraysOrValues<T> | T> | NumericDictionary<ListOfRecursiveArraysOrValues<T> | T> | null | undefined>
): LoDashExplicitWrapper<T[]>;
/**
* @see _.flatMapDeep
*/
flatMapDeep<T, TResult>(
this: LoDashExplicitWrapper<List<T> | null | undefined>,
iteratee: ListIterator<T, ListOfRecursiveArraysOrValues<TResult> | TResult>
): LoDashExplicitWrapper<TResult[]>;
/**
* @see _.flatMapDeep
*/
flatMapDeep<T, TResult>(
this: LoDashExplicitWrapper<NumericDictionary<T> | null | undefined>,
iteratee: NumericDictionaryIterator<T, ListOfRecursiveArraysOrValues<TResult> | TResult>
): LoDashExplicitWrapper<TResult[]>;
/**
* @see _.flatMapDeep
*/
flatMapDeep<T extends object, TResult>(
this: LoDashExplicitWrapper<T | null | undefined>,
iteratee: ObjectIterator<T, ListOfRecursiveArraysOrValues<TResult> | TResult>
): LoDashExplicitWrapper<TResult[]>;
/**
* @see _.flatMapDeep
*/
flatMapDeep(
this: LoDashExplicitWrapper<object | null | undefined>,
iteratee: string
): LoDashExplicitWrapper<any[]>;
/**
* @see _.flatMapDeep
*/
flatMapDeep(
this: LoDashExplicitWrapper<object | null | undefined>,
iteratee: object
): LoDashExplicitWrapper<boolean[]>;
}
}
-180
View File
@@ -1,180 +0,0 @@
import _ = require("../index");
declare module "../index" {
interface LoDashStatic {
/**
* This method is like `_.flatMap` except that it recursively flattens the
* mapped results up to `depth` times.
*
* @since 4.7.0
* @category Collection
* @param collection The collection to iterate over.
* @param [iteratee=_.identity] The function invoked per iteration.
* @param [depth=1] The maximum recursion depth.
* @returns Returns the new flattened array.
* @example
*
* function duplicate(n) {
* return [[[n, n]]];
* }
*
* _.flatMapDepth([1, 2], duplicate, 2);
* // => [[1, 1], [2, 2]]
*/
flatMapDepth<T>(
collection: List<ListOfRecursiveArraysOrValues<T> | T> | Dictionary<ListOfRecursiveArraysOrValues<T> | T> | NumericDictionary<ListOfRecursiveArraysOrValues<T> | T> | null | undefined
): T[];
/**
* @see _.flatMapDepth
*/
flatMapDepth<T, TResult>(
collection: List<T> | null | undefined,
iteratee: ListIterator<T, ListOfRecursiveArraysOrValues<TResult> | TResult>,
depth?: number
): TResult[];
/**
* @see _.flatMapDepth
*/
flatMapDepth<T, TResult>(
collection: NumericDictionary<T> | null | undefined,
iteratee: NumericDictionaryIterator<T, ListOfRecursiveArraysOrValues<TResult> | TResult>,
depth?: number
): TResult[];
/**
* @see _.flatMapDepth
*/
flatMapDepth<T extends object, TResult>(
collection: T | null | undefined,
iteratee: ObjectIterator<T, ListOfRecursiveArraysOrValues<TResult> | TResult>,
depth?: number
): TResult[];
/**
* @see _.flatMapDepth
*/
flatMapDepth(
collection: object | null | undefined,
iteratee: string,
depth?: number
): any[];
/**
* @see _.flatMapDepth
*/
flatMapDepth(
collection: object | null | undefined,
iteratee: object,
depth?: number
): boolean[];
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.flatMapDepth
*/
flatMapDepth<T>(
this: LoDashImplicitWrapper<List<ListOfRecursiveArraysOrValues<T> | T> | Dictionary<ListOfRecursiveArraysOrValues<T> | T> | NumericDictionary<ListOfRecursiveArraysOrValues<T> | T> | null | undefined>
): LoDashImplicitWrapper<T[]>;
/**
* @see _.flatMapDepth
*/
flatMapDepth<T, TResult>(
this: LoDashImplicitWrapper<List<T> | null | undefined>,
iteratee: ListIterator<T, ListOfRecursiveArraysOrValues<TResult> | TResult>,
depth?: number
): LoDashImplicitWrapper<TResult[]>;
/**
* @see _.flatMapDepth
*/
flatMapDepth<T, TResult>(
this: LoDashImplicitWrapper<NumericDictionary<T> | null | undefined>,
iteratee: NumericDictionaryIterator<T, ListOfRecursiveArraysOrValues<TResult> | TResult>,
depth?: number
): LoDashImplicitWrapper<TResult[]>;
/**
* @see _.flatMapDepth
*/
flatMapDepth<T extends object, TResult>(
this: LoDashImplicitWrapper<T | null | undefined>,
iteratee: ObjectIterator<T, ListOfRecursiveArraysOrValues<TResult> | TResult>,
depth?: number
): LoDashImplicitWrapper<TResult[]>;
/**
* @see _.flatMapDepth
*/
flatMapDepth(
this: LoDashImplicitWrapper<object | null | undefined>,
iteratee: string,
depth?: number
): LoDashImplicitWrapper<any[]>;
/**
* @see _.flatMapDepth
*/
flatMapDepth(
this: LoDashImplicitWrapper<object | null | undefined>,
iteratee: object,
depth?: number
): LoDashImplicitWrapper<boolean[]>;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.flatMapDepth
*/
flatMapDepth<T>(
this: LoDashExplicitWrapper<List<ListOfRecursiveArraysOrValues<T> | T> | Dictionary<ListOfRecursiveArraysOrValues<T> | T> | NumericDictionary<ListOfRecursiveArraysOrValues<T> | T> | null | undefined>
): LoDashExplicitWrapper<T[]>;
/**
* @see _.flatMapDepth
*/
flatMapDepth<T, TResult>(
this: LoDashExplicitWrapper<List<T> | null | undefined>,
iteratee: ListIterator<T, ListOfRecursiveArraysOrValues<TResult> | TResult>,
depth?: number
): LoDashExplicitWrapper<TResult[]>;
/**
* @see _.flatMapDepth
*/
flatMapDepth<T, TResult>(
this: LoDashExplicitWrapper<NumericDictionary<T> | null | undefined>,
iteratee: NumericDictionaryIterator<T, ListOfRecursiveArraysOrValues<TResult> | TResult>,
depth?: number
): LoDashExplicitWrapper<TResult[]>;
/**
* @see _.flatMapDepth
*/
flatMapDepth<T extends object, TResult>(
this: LoDashExplicitWrapper<T | null | undefined>,
iteratee: ObjectIterator<T, ListOfRecursiveArraysOrValues<TResult> | TResult>,
depth?: number
): LoDashExplicitWrapper<TResult[]>;
/**
* @see _.flatMapDepth
*/
flatMapDepth(
this: LoDashExplicitWrapper<object | null | undefined>,
iteratee: string,
depth?: number
): LoDashExplicitWrapper<any[]>;
/**
* @see _.flatMapDepth
*/
flatMapDepth(
this: LoDashExplicitWrapper<object | null | undefined>,
iteratee: object,
depth?: number
): LoDashExplicitWrapper<boolean[]>;
}
}
-113
View File
@@ -1,113 +0,0 @@
import _ = require("../index");
declare module "../index" {
interface LoDashStatic {
/**
* Iterates over elements of collection invoking iteratee for each element. The iteratee is bound to thisArg
* and invoked with three arguments:
* (value, index|key, collection). Iteratee functions may exit iteration early by explicitly returning false.
*
* Note: As with other "Collections" methods, objects with a "length" property are iterated like arrays. To
* avoid this behavior _.forIn or _.forOwn may be used for object iteration.
*
* @alias _.each
*
* @param collection The collection to iterate over.
* @param iteratee The function invoked per iteration.
* @param thisArg The this binding of iteratee.
*/
forEach<T>(
collection: T[],
iteratee?: ArrayIterator<T, any>
): T[];
/**
* @see _.forEach
*/
forEach(
collection: string,
iteratee?: StringIterator<any>
): string;
/**
* @see _.forEach
*/
forEach<T>(
collection: List<T>,
iteratee?: ListIterator<T, any>
): List<T>;
/**
* @see _.forEach
*/
forEach<T extends object>(
collection: T,
iteratee?: ObjectIterator<T, any>
): T;
/**
* @see _.forEach
*/
forEach<T, TArray extends T[] | null | undefined>(
collection: TArray & (T[] | null | undefined),
iteratee?: ArrayIterator<T, any>
): TArray;
/**
* @see _.forEach
*/
forEach<TString extends string | null | undefined>(
collection: TString,
iteratee?: StringIterator<any>
): TString;
/**
* @see _.forEach
*/
forEach<T, TList extends List<T> | null | undefined>(
collection: TList & (List<T> | null | undefined),
iteratee?: ListIterator<T, any>
): TList;
/**
* @see _.forEach
*/
forEach<T extends object>(
collection: T | null | undefined,
iteratee?: ObjectIterator<T, any>
): T | null | undefined;
}
interface LoDashWrapper<TValue> {
/**
* @see _.forEach
*/
forEach<T>(
this: LoDashWrapper<T[] | null | undefined>,
iteratee?: ArrayIterator<T, any>
): this;
/**
* @see _.forEach
*/
forEach(
this: LoDashWrapper<string | null | undefined>,
iteratee?: StringIterator<any>
): this;
/**
* @see _.forEach
*/
forEach<T>(
this: LoDashWrapper<List<T> | null | undefined>,
iteratee?: ListIterator<T, any>
): this;
/**
* @see _.forEach
*/
forEach<T extends object>(
this: LoDashWrapper<T | null | undefined>,
iteratee?: ObjectIterator<T, any>
): this;
}
}
-108
View File
@@ -1,108 +0,0 @@
import _ = require("../index");
declare module "../index" {
interface LoDashStatic {
/**
* This method is like _.forEach except that it iterates over elements of collection from right to left.
*
* @alias _.eachRight
*
* @param collection The collection to iterate over.
* @param iteratee The function called per iteration.
* @param thisArg The this binding of callback.
*/
forEachRight<T>(
collection: T[],
iteratee?: ArrayIterator<T, any>
): T[];
/**
* @see _.forEachRight
*/
forEachRight(
collection: string,
iteratee?: StringIterator<any>
): string;
/**
* @see _.forEachRight
*/
forEachRight<T>(
collection: List<T>,
iteratee?: ListIterator<T, any>
): List<T>;
/**
* @see _.forEachRight
*/
forEachRight<T extends object>(
collection: T,
iteratee?: ObjectIterator<T, any>
): T;
/**
* @see _.forEachRight
*/
forEachRight<T, TArray extends T[] | null | undefined>(
collection: TArray & (T[] | null | undefined),
iteratee?: ArrayIterator<T, any>
): TArray;
/**
* @see _.forEachRight
*/
forEachRight<TString extends string | null | undefined>(
collection: TString,
iteratee?: StringIterator<any>
): TString;
/**
* @see _.forEachRight
*/
forEachRight<T, TList extends List<T> | null | undefined>(
collection: TList & (List<T> | null | undefined),
iteratee?: ListIterator<T, any>
): TList;
/**
* @see _.forEachRight
*/
forEachRight<T extends object>(
collection: T | null | undefined,
iteratee?: ObjectIterator<T, any>
): T | null | undefined;
}
interface LoDashWrapper<TValue> {
/**
* @see _.forEachRight
*/
forEachRight<T>(
this: LoDashWrapper<T[] | null | undefined>,
iteratee?: ArrayIterator<T, any>
): this;
/**
* @see _.forEachRight
*/
forEachRight(
this: LoDashWrapper<string | null | undefined>,
iteratee?: StringIterator<any>
): this;
/**
* @see _.forEachRight
*/
forEachRight<T>(
this: LoDashWrapper<List<T> | null | undefined>,
iteratee?: ListIterator<T, any>
): this;
/**
* @see _.forEachRight
*/
forEachRight<T extends object>(
this: LoDashWrapper<T | null | undefined>,
iteratee?: ObjectIterator<T, any>
): this;
}
}
-121
View File
@@ -1,121 +0,0 @@
import _ = require("../index");
declare module "../index" {
interface LoDashStatic {
/**
* Creates an object composed of keys generated from the results of running each element of collection through
* iteratee. The corresponding value of each key is an array of the elements responsible for generating the
* key. The iteratee is bound to thisArg and invoked with three arguments:
* (value, index|key, collection).
*
* If a property name is provided for iteratee the created _.property style callback returns the property
* value of the given element.
*
* If a value is also provided for thisArg the created _.matchesProperty style callback returns true for
* elements that have a matching property value, else false.
*
* If an object is provided for iteratee the created _.matches style callback returns true for elements that
* have the properties of the given object, else false.
*
* @param collection The collection to iterate over.
* @param iteratee The function invoked per iteration.
* @param thisArg The this binding of iteratee.
* @return Returns the composed aggregate object.
*/
groupBy(
collection: string | null | undefined,
iteratee?: StringIterator<NotVoid>
): Dictionary<string[]>;
/**
* @see _.groupBy
*/
groupBy<T>(
collection: List<T> | null | undefined,
iteratee?: ListIteratee<T>
): Dictionary<T[]>;
/**
* @see _.groupBy
*/
groupBy<T>(
collection: NumericDictionary<T> | null | undefined,
iteratee?: NumericDictionaryIteratee<T>
): Dictionary<T[]>;
/**
* @see _.groupBy
*/
groupBy<T extends object>(
collection: T | null | undefined,
iteratee?: ObjectIteratee<T>
): Dictionary<Array<T[keyof T]>>;
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.groupBy
*/
groupBy(
this: LoDashImplicitWrapper<string | null | undefined>,
iteratee?: StringIterator<NotVoid>
): LoDashImplicitWrapper<Dictionary<string[]>>;
/**
* @see _.groupBy
*/
groupBy<T>(
this: LoDashImplicitWrapper<List<T> | null | undefined>,
iteratee?: ListIteratee<T>
): LoDashImplicitWrapper<Dictionary<T[]>>;
/**
* @see _.groupBy
*/
groupBy<T extends object>(
this: LoDashImplicitWrapper<T | null | undefined>,
iteratee?: ObjectIteratee<T>
): LoDashImplicitWrapper<Dictionary<Array<T[keyof T]>>>;
/**
* @see _.groupBy
*/
groupBy<T>(
this: LoDashImplicitWrapper<NumericDictionary<T> | null | undefined>,
iteratee?: NumericDictionaryIteratee<T>
): LoDashImplicitWrapper<Dictionary<T[]>>;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.groupBy
*/
groupBy(
this: LoDashExplicitWrapper<string | null | undefined>,
iteratee?: StringIterator<NotVoid>
): LoDashExplicitWrapper<Dictionary<string[]>>;
/**
* @see _.groupBy
*/
groupBy<T>(
this: LoDashExplicitWrapper<List<T> | null | undefined>,
iteratee?: ListIteratee<T>
): LoDashExplicitWrapper<Dictionary<T[]>>;
/**
* @see _.groupBy
*/
groupBy<T>(
this: LoDashExplicitWrapper<NumericDictionary<T> | null | undefined>,
iteratee?: NumericDictionaryIteratee<T>
): LoDashExplicitWrapper<Dictionary<T[]>>;
/**
* @see _.groupBy
*/
groupBy<T extends object>(
this: LoDashExplicitWrapper<T | null | undefined>,
iteratee?: ObjectIteratee<T>
): LoDashExplicitWrapper<Dictionary<Array<T[keyof T]>>>;
}
}
-41
View File
@@ -1,41 +0,0 @@
import _ = require("../index");
declare module "../index" {
interface LoDashStatic {
/**
* Checks if target is in collection using SameValueZero for equality comparisons. If fromIndex is negative,
* it’s used as the offset from the end of collection.
*
* @param collection The collection to search.
* @param target The value to search for.
* @param fromIndex The index to search from.
* @return True if the target element is found, else false.
*/
includes<T>(
collection: List<T>|Dictionary<T> | null | undefined,
target: T,
fromIndex?: number
): boolean;
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.includes
*/
includes<T>(
this: LoDashImplicitWrapper<List<T> | Dictionary<T> | null | undefined>,
target: T,
fromIndex?: number
): boolean;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.includes
*/
includes<T>(
this: LoDashExplicitWrapper<List<T> | Dictionary<T> | null | undefined>,
target: T,
fromIndex?: number
): LoDashExplicitWrapper<boolean>;
}
}
-58
View File
@@ -1,58 +0,0 @@
import _ = require("../index");
declare module "../index" {
interface LoDashStatic {
/**
* Invokes the method named by methodName on each element in the collection returning
* an array of the results of each invoked method. Additional arguments will be provided
* to each invoked method. If methodName is a function it will be invoked for, and this
* bound to, each element in the collection.
* @param collection The collection to iterate over.
* @param methodName The name of the method to invoke.
* @param args Arguments to invoke the method with.
**/
invokeMap(
collection: object | null | undefined,
methodName: string,
...args: any[]): any[];
/**
* @see _.invokeMap
**/
invokeMap<TResult>(
collection: object | null | undefined,
method: (...args: any[]) => TResult,
...args: any[]): TResult[];
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.invokeMap
**/
invokeMap(
methodName: string,
...args: any[]): LoDashImplicitWrapper<any[]>;
/**
* @see _.invokeMap
**/
invokeMap<TResult>(
method: (...args: any[]) => TResult,
...args: any[]): LoDashImplicitWrapper<TResult[]>;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.invokeMap
**/
invokeMap(
methodName: string,
...args: any[]): LoDashExplicitWrapper<any[]>;
/**
* @see _.invokeMap
**/
invokeMap<TResult>(
method: (...args: any[]) => TResult,
...args: any[]): LoDashExplicitWrapper<TResult[]>;
}
}
-121
View File
@@ -1,121 +0,0 @@
import _ = require("../index");
declare module "../index" {
interface LoDashStatic {
/**
* Creates an object composed of keys generated from the results of running each element of collection through
* iteratee. The corresponding value of each key is the last element responsible for generating the key. The
* iteratee function is bound to thisArg and invoked with three arguments:
* (value, index|key, collection).
*
* If a property name is provided for iteratee the created _.property style callback returns the property
* value of the given element.
*
* If a value is also provided for thisArg the created _.matchesProperty style callback returns true for
* elements that have a matching property value, else false.
*
* If an object is provided for iteratee the created _.matches style callback returns true for elements that
* have the properties of the given object, else false.
*
* @param collection The collection to iterate over.
* @param iteratee The function invoked per iteration.
* @param thisArg The this binding of iteratee.
* @return Returns the composed aggregate object.
*/
keyBy(
collection: string | null | undefined,
iteratee?: StringIterator<PropertyName>
): Dictionary<string>;
/**
* @see _.keyBy
*/
keyBy<T>(
collection: List<T> | null | undefined,
iteratee?: ListIterateeCustom<T, PropertyName>
): Dictionary<T>;
/**
* @see _.keyBy
*/
keyBy<T extends object>(
collection: T | null | undefined,
iteratee?: ObjectIterateeCustom<T, PropertyName>
): Dictionary<T[keyof T]>;
/**
* @see _.keyBy
*/
keyBy<T>(
collection: NumericDictionary<T> | null | undefined,
iteratee?: NumericDictionaryIterateeCustom<T, PropertyName>
): Dictionary<T>;
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.keyBy
*/
keyBy(
this: LoDashImplicitWrapper<string | null | undefined>,
iteratee?: StringIterator<PropertyName>
): LoDashImplicitWrapper<Dictionary<string>>;
/**
* @see _.keyBy
*/
keyBy<T>(
this: LoDashImplicitWrapper<List<T> | null | undefined>,
iteratee?: ListIterateeCustom<T, PropertyName>
): LoDashImplicitWrapper<Dictionary<T>>;
/**
* @see _.keyBy
*/
keyBy<T extends object>(
this: LoDashImplicitWrapper<T | null | undefined>,
iteratee?: ObjectIterateeCustom<T, PropertyName>
): LoDashImplicitWrapper<Dictionary<T[keyof T]>>;
/**
* @see _.keyBy
*/
keyBy<T>(
this: LoDashImplicitWrapper<NumericDictionary<T> | null | undefined>,
iteratee?: NumericDictionaryIterateeCustom<T, PropertyName>
): LoDashImplicitWrapper<Dictionary<T>>;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.keyBy
*/
keyBy(
this: LoDashExplicitWrapper<string | null | undefined>,
iteratee?: StringIterator<PropertyName>
): LoDashExplicitWrapper<Dictionary<string>>;
/**
* @see _.keyBy
*/
keyBy<T>(
this: LoDashExplicitWrapper<List<T> | null | undefined>,
iteratee?: ListIterateeCustom<T, PropertyName>
): LoDashExplicitWrapper<Dictionary<T>>;
/**
* @see _.keyBy
*/
keyBy<T extends object>(
this: LoDashExplicitWrapper<T | null | undefined>,
iteratee?: ObjectIterateeCustom<T, PropertyName>
): LoDashExplicitWrapper<Dictionary<T[keyof T]>>;
/**
* @see _.keyBy
*/
keyBy<T>(
this: LoDashExplicitWrapper<NumericDictionary<T> | null | undefined>,
iteratee?: NumericDictionaryIterateeCustom<T, PropertyName>
): LoDashExplicitWrapper<Dictionary<T>>;
}
}
-180
View File
@@ -1,180 +0,0 @@
import _ = require("../index");
declare module "../index" {
interface LoDashStatic {
/**
* Creates an array of values by running each element in collection through iteratee. The iteratee is bound to
* thisArg and invoked with three arguments: (value, index|key, collection).
*
* If a property name is provided for iteratee the created _.property style callback returns the property value
* of the given element.
*
* If a value is also provided for thisArg the created _.matchesProperty style callback returns true for
* elements that have a matching property value, else false.
*
* If an object is provided for iteratee the created _.matches style callback returns true for elements that
* have the properties of the given object, else false.
*
* Many lodash methods are guarded to work as iteratees for methods like _.every, _.filter, _.map, _.mapValues,
* _.reject, and _.some.
*
* The guarded methods are:
* ary, callback, chunk, clone, create, curry, curryRight, drop, dropRight, every, fill, flatten, invert, max,
* min, parseInt, slice, sortBy, take, takeRight, template, trim, trimLeft, trimRight, trunc, random, range,
* sample, some, sum, uniq, and words
*
* @param collection The collection to iterate over.
* @param iteratee The function invoked per iteration.
* @param thisArg The this binding of iteratee.
* @return Returns the new mapped array.
*/
map<T, TResult>(
collection: List<T> | null | undefined,
iteratee: ListIterator<T, TResult>
): TResult[];
/**
* @see _.map
*/
map<T>(collection: List<T> | Dictionary<T> | null | undefined): T[];
/**
* @see _.map
*/
map<T, TResult>(
collection: Dictionary<T> | null | undefined,
iteratee: DictionaryIterator<T, TResult>
): TResult[];
/** @see _.map */
map<T, K extends keyof T>(
collection: List<T> | Dictionary<T> | null | undefined,
iteratee: K
): Array<T[K]>;
/** @see _.map */
map<T, TResult>(
collection: NumericDictionary<T> | null | undefined,
iteratee?: NumericDictionaryIterator<T, TResult>
): TResult[];
/**
* @see _.map
*/
map<T, TResult>(
collection: List<T>|Dictionary<T>|NumericDictionary<T> | null | undefined,
iteratee?: string
): TResult[];
/**
* @see _.map
*/
map<T>(
collection: List<T>|Dictionary<T>|NumericDictionary<T> | null | undefined,
iteratee?: object
): boolean[];
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.map
*/
map<T, TResult>(
this: LoDashImplicitWrapper<List<T> | null | undefined>,
iteratee: ListIterator<T, TResult>
): LoDashImplicitWrapper<TResult[]>;
/**
* @see _.map
*/
map<T>(this: LoDashImplicitWrapper<List<T> | Dictionary<T> | null | undefined>): LoDashImplicitWrapper<T[]>;
/**
* @see _.map
*/
map<T, TResult>(
this: LoDashImplicitWrapper<Dictionary<T> | null | undefined>,
iteratee: DictionaryIterator<T, TResult>
): LoDashImplicitWrapper<TResult[]>;
/** @see _.map */
map<T, K extends keyof T>(
this: LoDashImplicitWrapper<List<T> | Dictionary<T> | null | undefined>,
iteratee: K
): LoDashImplicitWrapper<Array<T[K]>>;
/** @see _.map */
map<T, TResult>(
this: LoDashImplicitWrapper<NumericDictionary<T> | null | undefined>,
iteratee?: NumericDictionaryIterator<T, TResult>
): LoDashImplicitWrapper<TResult[]>;
/**
* @see _.map
*/
map<T, TResult>(
this: LoDashImplicitWrapper<List<T> | Dictionary<T> | NumericDictionary<T> | null | undefined>,
iteratee?: string
): LoDashImplicitWrapper<TResult[]>;
/**
* @see _.map
*/
map<T>(
this: LoDashImplicitWrapper<List<T> | Dictionary<T> | NumericDictionary<T> | null | undefined>,
iteratee?: object
): LoDashImplicitWrapper<boolean[]>;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.map
*/
map<T, TResult>(
this: LoDashExplicitWrapper<List<T> | null | undefined>,
iteratee: ListIterator<T, TResult>
): LoDashExplicitWrapper<TResult[]>;
/**
* @see _.map
*/
map<T>(this: LoDashExplicitWrapper<List<T> | Dictionary<T> | null | undefined>): LoDashExplicitWrapper<T[]>;
/**
* @see _.map
*/
map<T, TResult>(
this: LoDashExplicitWrapper<Dictionary<T> | null | undefined>,
iteratee: DictionaryIterator<T, TResult>
): LoDashExplicitWrapper<TResult[]>;
/** @see _.map */
map<T, K extends keyof T>(
this: LoDashExplicitWrapper<List<T> | Dictionary<T> | null | undefined>,
iteratee: K
): LoDashExplicitWrapper<Array<T[K]>>;
/**
* @see _.map
*/
map<T, TResult>(
this: LoDashExplicitWrapper<NumericDictionary<T> | null | undefined>,
iteratee?: NumericDictionaryIterator<T, TResult>
): LoDashExplicitWrapper<TResult[]>;
/**
* @see _.map
*/
map<T, TResult>(
this: LoDashExplicitWrapper<List<T> | Dictionary<T> | NumericDictionary<T> | null | undefined>,
iteratee?: string
): LoDashExplicitWrapper<TResult[]>;
/**
* @see _.map
*/
map<T>(
this: LoDashExplicitWrapper<List<T> | Dictionary<T> | NumericDictionary<T> | null | undefined>,
iteratee?: object
): LoDashExplicitWrapper<boolean[]>;
}
}
-192
View File
@@ -1,192 +0,0 @@
import _ = require("../index");
declare module "../index" {
interface LoDashStatic {
/**
* This method is like `_.sortBy` except that it allows specifying the sort
* orders of the iteratees to sort by. If `orders` is unspecified, all values
* are sorted in ascending order. Otherwise, specify an order of "desc" for
* descending or "asc" for ascending sort order of corresponding values.
*
* @category Collection
* @param collection The collection to iterate over.
* @param [iteratees=[_.identity]] The iteratees to sort by.
* @param [orders] The sort orders of `iteratees`.
* @param- {Object} [guard] Enables use as an iteratee for functions like `_.reduce`.
* @returns Returns the new sorted array.
* @example
*
* var users = [
* { 'user': 'fred', 'age': 48 },
* { 'user': 'barney', 'age': 34 },
* { 'user': 'fred', 'age': 42 },
* { 'user': 'barney', 'age': 36 }
* ];
*
* // sort by `user` in ascending order and by `age` in descending order
* _.orderBy(users, ['user', 'age'], ['asc', 'desc']);
* // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 42]]
*/
orderBy<T>(
collection: List<T> | null | undefined,
iteratees?: Many<ListIterator<T, NotVoid>>,
orders?: Many<boolean|string>
): T[];
/**
* @see _.orderBy
*/
orderBy<T>(
collection: List<T> | null | undefined,
iteratees?: Many<ListIteratee<T>>,
orders?: Many<boolean|string>
): T[];
/**
* @see _.orderBy
*/
orderBy<T extends object>(
collection: T | null | undefined,
iteratees?: Many<ObjectIterator<T, NotVoid>>,
orders?: Many<boolean|string>
): Array<T[keyof T]>;
/**
* @see _.orderBy
*/
orderBy<T extends object>(
collection: T | null | undefined,
iteratees?: Many<ObjectIteratee<T>>,
orders?: Many<boolean|string>
): Array<T[keyof T]>;
/**
* @see _.orderBy
*/
orderBy<T>(
collection: NumericDictionary<T> | null | undefined,
iteratees?: Many<NumericDictionaryIterator<T, NotVoid>>,
orders?: Many<boolean|string>
): T[];
/**
* @see _.orderBy
*/
orderBy<T>(
collection: NumericDictionary<T> | null | undefined,
iteratees?: Many<NumericDictionaryIteratee<T>>,
orders?: Many<boolean|string>
): T[];
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.orderBy
*/
orderBy<T>(
this: LoDashImplicitWrapper<List<T> | null | undefined>,
iteratees?: Many<ListIterator<T, NotVoid>>,
orders?: Many<boolean|string>
): LoDashImplicitWrapper<T[]>;
/**
* @see _.orderBy
*/
orderBy<T>(
this: LoDashImplicitWrapper<List<T> | null | undefined>,
iteratees?: Many<ListIteratee<T>>,
orders?: Many<boolean|string>
): LoDashImplicitWrapper<T[]>;
/**
* @see _.orderBy
*/
orderBy<T extends object>(
this: LoDashImplicitWrapper<T | null | undefined>,
iteratees?: Many<ObjectIterator<T, NotVoid>>,
orders?: Many<boolean|string>
): LoDashImplicitWrapper<Array<T[keyof T]>>;
/**
* @see _.orderBy
*/
orderBy<T extends object>(
this: LoDashImplicitWrapper<T | null | undefined>,
iteratees?: Many<ObjectIteratee<T>>,
orders?: Many<boolean|string>
): LoDashImplicitWrapper<Array<T[keyof T]>>;
/**
* @see _.orderBy
*/
orderBy<T>(
this: LoDashImplicitWrapper<NumericDictionary<T> | null | undefined>,
iteratees?: Many<NumericDictionaryIterator<T, NotVoid>>,
orders?: Many<boolean|string>
): LoDashImplicitWrapper<T[]>;
/**
* @see _.orderBy
*/
orderBy<T>(
this: LoDashImplicitWrapper<NumericDictionary<T> | null | undefined>,
iteratees?: Many<NumericDictionaryIteratee<T>>,
orders?: Many<boolean|string>
): LoDashImplicitWrapper<T[]>;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.orderBy
*/
orderBy<T>(
this: LoDashExplicitWrapper<List<T> | null | undefined>,
iteratees?: Many<ListIterator<T, NotVoid>>,
orders?: Many<boolean|string>
): LoDashExplicitWrapper<T[]>;
/**
* @see _.orderBy
*/
orderBy<T>(
this: LoDashExplicitWrapper<List<T> | null | undefined>,
iteratees?: Many<ListIteratee<T>>,
orders?: Many<boolean|string>
): LoDashExplicitWrapper<T[]>;
/**
* @see _.orderBy
*/
orderBy<T extends object>(
this: LoDashExplicitWrapper<T | null | undefined>,
iteratees?: Many<ObjectIterator<T, NotVoid>>,
orders?: Many<boolean|string>
): LoDashExplicitWrapper<Array<T[keyof T]>>;
/**
* @see _.orderBy
*/
orderBy<T extends object>(
this: LoDashExplicitWrapper<T | null | undefined>,
iteratees?: Many<ObjectIteratee<T>>,
orders?: Many<boolean|string>
): LoDashExplicitWrapper<Array<T[keyof T]>>;
/**
* @see _.orderBy
*/
orderBy<T>(
this: LoDashExplicitWrapper<NumericDictionary<T> | null | undefined>,
iteratees?: Many<NumericDictionaryIterator<T, NotVoid>>,
orders?: Many<boolean|string>
): LoDashExplicitWrapper<T[]>;
/**
* @see _.orderBy
*/
orderBy<T>(
this: LoDashExplicitWrapper<NumericDictionary<T> | null | undefined>,
iteratees?: Many<NumericDictionaryIteratee<T>>,
orders?: Many<boolean|string>
): LoDashExplicitWrapper<T[]>;
}
}
-72
View File
@@ -1,72 +0,0 @@
import _ = require("../index");
declare module "../index" {
interface LoDashStatic {
/**
* Creates an array of elements split into two groups, the first of which contains elements predicate returns truthy for,
* while the second of which contains elements predicate returns falsey for.
* The predicate is bound to thisArg and invoked with three arguments: (value, index|key, collection).
*
* If a property name is provided for predicate the created _.property style callback
* returns the property value of the given element.
*
* If a value is also provided for thisArg the created _.matchesProperty style callback
* returns true for elements that have a matching property value, else false.
*
* If an object is provided for predicate the created _.matches style callback returns
* true for elements that have the properties of the given object, else false.
*
* @param collection The collection to iterate over.
* @param callback The function called per iteration.
* @param thisArg The this binding of predicate.
* @return Returns the array of grouped elements.
**/
partition<T>(
collection: List<T> | null | undefined,
callback: ValueIteratee<T>
): [T[], T[]];
/**
* @see _.partition
*/
partition<T extends object>(
collection: T | null | undefined,
callback: ValueIteratee<T[keyof T]>
): [Array<T[keyof T]>, Array<T[keyof T]>];
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.partition
*/
partition<T>(
this: LoDashImplicitWrapper<List<T> | null | undefined>,
callback: ValueIteratee<T>
): LoDashImplicitWrapper<[T[], T[]]>;
/**
* @see _.partition
*/
partition<T>(
this: LoDashImplicitWrapper<T | null | undefined>,
callback: ValueIteratee<T[keyof T]>
): LoDashImplicitWrapper<[Array<T[keyof T]>, Array<T[keyof T]>]>;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.partition
*/
partition<T>(
this: LoDashExplicitWrapper<List<T> | null | undefined>,
callback: ValueIteratee<T>
): LoDashExplicitWrapper<[T[], T[]]>;
/**
* @see _.partition
*/
partition<T>(
this: LoDashExplicitWrapper<T | null | undefined>,
callback: ValueIteratee<T[keyof T]>
): LoDashExplicitWrapper<[Array<T[keyof T]>, Array<T[keyof T]>]>;
}
}
-220
View File
@@ -1,220 +0,0 @@
import _ = require("../index");
declare module "../index" {
interface LoDashStatic {
/**
* Reduces a collection to a value which is the accumulated result of running each
* element in the collection through the callback, where each successive callback execution
* consumes the return value of the previous execution. If accumulator is not provided the
* first element of the collection will be used as the initial accumulator value. The callback
* is bound to thisArg and invoked with four arguments; (accumulator, value, index|key, collection).
* @param collection The collection to iterate over.
* @param callback The function called per iteration.
* @param accumulator Initial value of the accumulator.
* @return Returns the accumulated value.
**/
reduce<T, TResult>(
collection: T[] | null | undefined,
callback: MemoListIterator<T, TResult, T[]>,
accumulator: TResult
): TResult;
/**
* @see _.reduce
**/
reduce<T, TResult>(
collection: List<T> | null | undefined,
callback: MemoListIterator<T, TResult, List<T>>,
accumulator: TResult
): TResult;
/**
* @see _.reduce
**/
reduce<T extends object, TResult>(
collection: T | null | undefined,
callback: MemoObjectIterator<T[keyof T], TResult, T>,
accumulator: TResult
): TResult;
/**
* @see _.reduce
**/
reduce<T, TResult>(
collection: NumericDictionary<T> | null | undefined,
callback: MemoListIterator<T, TResult, NumericDictionary<T>>,
accumulator: TResult
): TResult;
/**
* @see _.reduce
**/
reduce<T, TResult>(
collection: T[] | null | undefined,
callback: MemoListIterator<T, TResult, T[]>
): TResult | undefined;
/**
* @see _.reduce
**/
reduce<T, TResult>(
collection: List<T> | null | undefined,
callback: MemoListIterator<T, TResult, List<T>>
): TResult | undefined;
/**
* @see _.reduce
**/
reduce<T extends object, TResult>(
collection: T | null | undefined,
callback: MemoObjectIterator<T[keyof T], TResult, T>
): TResult | undefined;
/**
* @see _.reduce
**/
reduce<T, TResult>(
collection: NumericDictionary<T> | null | undefined,
callback: MemoListIterator<T, TResult, NumericDictionary<T>>
): TResult | undefined;
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.reduce
**/
reduce<T, TResult>(
this: LoDashImplicitWrapper<T[] | null | undefined>,
callback: MemoListIterator<T, TResult, T[]>,
accumulator: TResult
): TResult;
/**
* @see _.reduce
**/
reduce<T, TResult>(
this: LoDashImplicitWrapper<List<T> | null | undefined>,
callback: MemoListIterator<T, TResult, List<T>>,
accumulator: TResult
): TResult;
/**
* @see _.reduce
**/
reduce<T extends object, TResult>(
this: LoDashImplicitWrapper<T | null | undefined>,
callback: MemoObjectIterator<T[keyof T], TResult, T>,
accumulator: TResult
): TResult;
/**
* @see _.reduce
**/
reduce<T, TResult>(
this: LoDashImplicitWrapper<NumericDictionary<T> | null | undefined>,
callback: MemoListIterator<T, TResult, NumericDictionary<T>>,
accumulator: TResult
): TResult;
/**
* @see _.reduce
**/
reduce<T, TResult>(
this: LoDashImplicitWrapper<T[] | null | undefined>,
callback: MemoListIterator<T, TResult, T[]>
): TResult | undefined;
/**
* @see _.reduce
**/
reduce<T, TResult>(
this: LoDashImplicitWrapper<List<T> | null | undefined>,
callback: MemoListIterator<T, TResult, List<T>>
): TResult | undefined;
/**
* @see _.reduce
**/
reduce<T extends object, TResult>(
this: LoDashImplicitWrapper<T | null | undefined>,
callback: MemoObjectIterator<T[keyof T], TResult, T>
): TResult | undefined;
/**
* @see _.reduce
**/
reduce<T, TResult>(
this: LoDashImplicitWrapper<NumericDictionary<T> | null | undefined>,
callback: MemoListIterator<T, TResult, NumericDictionary<T>>
): TResult | undefined;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.reduce
**/
reduce<T, TResult>(
this: LoDashExplicitWrapper<T[] | null | undefined>,
callback: MemoListIterator<T, TResult, T[]>,
accumulator: TResult
): LoDashExplicitWrapper<TResult>;
/**
* @see _.reduce
**/
reduce<T, TResult>(
this: LoDashExplicitWrapper<List<T> | null | undefined>,
callback: MemoListIterator<T, TResult, List<T>>,
accumulator: TResult
): LoDashExplicitWrapper<TResult>;
/**
* @see _.reduce
**/
reduce<T extends object, TResult>(
this: LoDashExplicitWrapper<T | null | undefined>,
callback: MemoObjectIterator<T[keyof T], TResult, T>,
accumulator: TResult
): LoDashExplicitWrapper<TResult>;
/**
* @see _.reduce
**/
reduce<T, TResult>(
this: LoDashExplicitWrapper<NumericDictionary<T> | null | undefined>,
callback: MemoListIterator<T, TResult, NumericDictionary<T>>,
accumulator: TResult
): LoDashExplicitWrapper<TResult>;
/**
* @see _.reduce
**/
reduce<T, TResult>(
this: LoDashExplicitWrapper<T[] | null | undefined>,
callback: MemoListIterator<T, TResult, T[]>
): LoDashExplicitWrapper<TResult | undefined>;
/**
* @see _.reduce
**/
reduce<T, TResult>(
this: LoDashExplicitWrapper<List<T> | null | undefined>,
callback: MemoListIterator<T, TResult, List<T>>
): LoDashExplicitWrapper<TResult | undefined>;
/**
* @see _.reduce
**/
reduce<T extends object, TResult>(
this: LoDashExplicitWrapper<T | null | undefined>,
callback: MemoObjectIterator<T[keyof T], TResult, T>
): LoDashExplicitWrapper<TResult | undefined>;
/**
* @see _.reduce
**/
reduce<T, TResult>(
this: LoDashExplicitWrapper<NumericDictionary<T> | null | undefined>,
callback: MemoListIterator<T, TResult, NumericDictionary<T>>
): LoDashExplicitWrapper<TResult | undefined>;
}
}
-217
View File
@@ -1,217 +0,0 @@
import _ = require("../index");
declare module "../index" {
interface LoDashStatic {
/**
* This method is like _.reduce except that it iterates over elements of a collection from
* right to left.
* @param collection The collection to iterate over.
* @param callback The function called per iteration.
* @param accumulator Initial value of the accumulator.
* @return The accumulated value.
**/
reduceRight<T, TResult>(
collection: T[] | null | undefined,
callback: MemoListIterator<T, TResult, T[]>,
accumulator: TResult
): TResult;
/**
* @see _.reduceRight
**/
reduceRight<T, TResult>(
collection: List<T> | null | undefined,
callback: MemoListIterator<T, TResult, List<T>>,
accumulator: TResult
): TResult;
/**
* @see _.reduceRight
**/
reduceRight<T extends object, TResult>(
collection: T | null | undefined,
callback: MemoObjectIterator<T[keyof T], TResult, T>,
accumulator: TResult
): TResult;
/**
* @see _.reduceRight
**/
reduceRight<T, TResult>(
collection: NumericDictionary<T> | null | undefined,
callback: MemoListIterator<T, TResult, NumericDictionary<T>>,
accumulator: TResult
): TResult;
/**
* @see _.reduceRight
**/
reduceRight<T, TResult>(
collection: T[] | null | undefined,
callback: MemoListIterator<T, TResult, T[]>
): TResult | undefined;
/**
* @see _.reduceRight
**/
reduceRight<T, TResult>(
collection: List<T> | null | undefined,
callback: MemoListIterator<T, TResult, List<T>>
): TResult | undefined;
/**
* @see _.reduceRight
**/
reduceRight<T extends object, TResult>(
collection: T | null | undefined,
callback: MemoObjectIterator<T[keyof T], TResult, T>
): TResult | undefined;
/**
* @see _.reduceRight
**/
reduceRight<T, TResult>(
collection: NumericDictionary<T> | null | undefined,
callback: MemoListIterator<T, TResult, NumericDictionary<T>>
): TResult | undefined;
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.reduceRight
**/
reduceRight<T, TResult>(
this: LoDashImplicitWrapper<T[] | null | undefined>,
callback: MemoListIterator<T, TResult, T[]>,
accumulator: TResult
): TResult;
/**
* @see _.reduceRight
**/
reduceRight<T, TResult>(
this: LoDashImplicitWrapper<List<T> | null | undefined>,
callback: MemoListIterator<T, TResult, List<T>>,
accumulator: TResult
): TResult;
/**
* @see _.reduceRight
**/
reduceRight<T extends object, TResult>(
this: LoDashImplicitWrapper<T | null | undefined>,
callback: MemoObjectIterator<T[keyof T], TResult, T>,
accumulator: TResult
): TResult;
/**
* @see _.reduceRight
**/
reduceRight<T, TResult>(
this: LoDashImplicitWrapper<NumericDictionary<T> | null | undefined>,
callback: MemoListIterator<T, TResult, NumericDictionary<T>>,
accumulator: TResult
): TResult;
/**
* @see _.reduceRight
**/
reduceRight<T, TResult>(
this: LoDashImplicitWrapper<T[] | null | undefined>,
callback: MemoListIterator<T, TResult, T[]>
): TResult | undefined;
/**
* @see _.reduceRight
**/
reduceRight<T, TResult>(
this: LoDashImplicitWrapper<List<T> | null | undefined>,
callback: MemoListIterator<T, TResult, List<T>>
): TResult | undefined;
/**
* @see _.reduceRight
**/
reduceRight<T extends object, TResult>(
this: LoDashImplicitWrapper<T | null | undefined>,
callback: MemoObjectIterator<T[keyof T], TResult, T>
): TResult | undefined;
/**
* @see _.reduceRight
**/
reduceRight<T, TResult>(
this: LoDashImplicitWrapper<NumericDictionary<T> | null | undefined>,
callback: MemoListIterator<T, TResult, NumericDictionary<T>>
): TResult | undefined;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.reduceRight
**/
reduceRight<T, TResult>(
this: LoDashExplicitWrapper<T[] | null | undefined>,
callback: MemoListIterator<T, TResult, T[]>,
accumulator: TResult
): LoDashExplicitWrapper<TResult>;
/**
* @see _.reduceRight
**/
reduceRight<T, TResult>(
this: LoDashExplicitWrapper<List<T> | null | undefined>,
callback: MemoListIterator<T, TResult, List<T>>,
accumulator: TResult
): LoDashExplicitWrapper<TResult>;
/**
* @see _.reduceRight
**/
reduceRight<T extends object, TResult>(
this: LoDashExplicitWrapper<T | null | undefined>,
callback: MemoObjectIterator<T[keyof T], TResult, T>,
accumulator: TResult
): LoDashExplicitWrapper<TResult>;
/**
* @see _.reduceRight
**/
reduceRight<T, TResult>(
this: LoDashExplicitWrapper<NumericDictionary<T> | null | undefined>,
callback: MemoListIterator<T, TResult, NumericDictionary<T>>,
accumulator: TResult
): LoDashExplicitWrapper<TResult>;
/**
* @see _.reduceRight
**/
reduceRight<T, TResult>(
this: LoDashExplicitWrapper<T[] | null | undefined>,
callback: MemoListIterator<T, TResult, T[]>
): LoDashExplicitWrapper<TResult | undefined>;
/**
* @see _.reduceRight
**/
reduceRight<T, TResult>(
this: LoDashExplicitWrapper<List<T> | null | undefined>,
callback: MemoListIterator<T, TResult, List<T>>
): LoDashExplicitWrapper<TResult | undefined>;
/**
* @see _.reduceRight
**/
reduceRight<T extends object, TResult>(
this: LoDashExplicitWrapper<T | null | undefined>,
callback: MemoObjectIterator<T[keyof T], TResult, T>
): LoDashExplicitWrapper<TResult | undefined>;
/**
* @see _.reduceRight
**/
reduceRight<T, TResult>(
this: LoDashExplicitWrapper<NumericDictionary<T> | null | undefined>,
callback: MemoListIterator<T, TResult, NumericDictionary<T>>
): LoDashExplicitWrapper<TResult | undefined>;
}
}
-86
View File
@@ -1,86 +0,0 @@
import _ = require("../index");
declare module "../index" {
interface LoDashStatic {
/**
* The opposite of _.filter; this method returns the elements of collection that predicate does not return
* truthy for.
*
* @param collection The collection to iterate over.
* @param predicate The function invoked per iteration.
* @param thisArg The this binding of predicate.
* @return Returns the new filtered array.
*/
reject(
collection: string | null | undefined,
predicate?: StringIterator<boolean>
): string[];
/**
* @see _.reject
*/
reject<T>(
collection: List<T> | null | undefined,
predicate?: ListIterateeCustom<T, boolean>
): T[];
/**
* @see _.reject
*/
reject<T extends object>(
collection: T | null | undefined,
predicate?: ObjectIterateeCustom<T, boolean>
): Array<T[keyof T]>;
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.reject
*/
reject(
this: LoDashImplicitWrapper<string | null | undefined>,
predicate?: StringIterator<boolean>
): LoDashImplicitWrapper<string[]>;
/**
* @see _.reject
*/
reject<T>(
this: LoDashImplicitWrapper<List<T> | null | undefined>,
predicate?: ListIterateeCustom<T, boolean>
): LoDashImplicitWrapper<T[]>;
/**
* @see _.reject
*/
reject<T extends object>(
this: LoDashImplicitWrapper<T | null | undefined>,
predicate?: ObjectIterateeCustom<T, boolean>
): LoDashImplicitWrapper<Array<T[keyof T]>>;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.reject
*/
reject(
this: LoDashExplicitWrapper<string | null | undefined>,
predicate?: StringIterator<boolean>
): LoDashExplicitWrapper<string[]>;
/**
* @see _.reject
*/
reject<T>(
this: LoDashExplicitWrapper<List<T> | null | undefined>,
predicate?: ListIterateeCustom<T, boolean>
): LoDashExplicitWrapper<T[]>;
/**
* @see _.reject
*/
reject<T extends object>(
this: LoDashExplicitWrapper<T | null | undefined>,
predicate?: ObjectIterateeCustom<T, boolean>
): LoDashExplicitWrapper<Array<T[keyof T]>>;
}
}
-74
View File
@@ -1,74 +0,0 @@
import _ = require("../index");
declare module "../index" {
interface LoDashStatic {
/**
* Gets a random element from collection.
*
* @param collection The collection to sample.
* @return Returns the random element.
*/
sample<T>(
collection: List<T> | Dictionary<T> | NumericDictionary<T> | null | undefined
): T | undefined;
/**
* @see _.sample
*/
sample<T extends object>(
collection: T
): T[keyof T];
/**
* @see _.sample
*/
sample<T extends object>(
collection: T | null | undefined
): T[keyof T] | undefined;
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.sample
*/
sample<T>(
this: LoDashImplicitWrapper<List<T> | Dictionary<T> | NumericDictionary<T> | null | undefined>
): T | undefined;
/**
* @see _.sample
*/
sample<T extends object>(
this: LoDashImplicitWrapper<T>,
): T[keyof T];
/**
* @see _.sample
*/
sample<T extends object>(
this: LoDashImplicitWrapper<T | null | undefined>
): T[keyof T] | undefined;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.sample
*/
sample<T>(
this: LoDashExplicitWrapper<List<T> | Dictionary<T> | NumericDictionary<T> | null | undefined>
): LoDashExplicitWrapper<T | undefined>;
/**
* @see _.sample
*/
sample<T extends object>(
this: LoDashExplicitWrapper<T>,
): LoDashExplicitWrapper<T[keyof T]>;
/**
* @see _.sample
*/
sample<T extends object>(
this: LoDashExplicitWrapper<T | null | undefined>
): LoDashExplicitWrapper<T[keyof T] | undefined>;
}
}
-60
View File
@@ -1,60 +0,0 @@
import _ = require("../index");
declare module "../index" {
interface LoDashStatic {
/**
* Gets n random elements at unique keys from collection up to the size of collection.
*
* @param collection The collection to sample.
* @param n The number of elements to sample.
* @return Returns the random elements.
*/
sampleSize<T>(
collection: List<T>|Dictionary<T>|NumericDictionary<T> | null | undefined,
n?: number
): T[];
/**
* @see _.sampleSize
*/
sampleSize<T extends object>(
collection: T | null | undefined,
n?: number
): Array<T[keyof T]>;
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.sampleSize
*/
sampleSize<T>(
this: LoDashImplicitWrapper<List<T>|Dictionary<T>|NumericDictionary<T> | null | undefined>,
n?: number
): LoDashImplicitWrapper<T[]>;
/**
* @see _.sampleSize
*/
sampleSize<T extends object>(
this: LoDashImplicitWrapper<T | null | undefined>,
n?: number
): LoDashImplicitWrapper<Array<T[keyof T]>>;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.sampleSize
*/
sampleSize<T>(
this: LoDashExplicitWrapper<List<T>|Dictionary<T>|NumericDictionary<T> | null | undefined>,
n?: number
): LoDashExplicitWrapper<T[]>;
/**
* @see _.sampleSize
*/
sampleSize<T extends object>(
this: LoDashExplicitWrapper<T | null | undefined>,
n?: number
): LoDashExplicitWrapper<Array<T[keyof T]>>;
}
}
-41
View File
@@ -1,41 +0,0 @@
import _ = require("../index");
declare module "../index" {
interface LoDashStatic {
/**
* Creates an array of shuffled values, using a version of the Fisher-Yates shuffle.
*
* @param collection The collection to shuffle.
* @return Returns the new shuffled array.
*/
shuffle<T>(collection: List<T> | null | undefined): T[];
/**
* @see _.shuffle
*/
shuffle<T extends object>(collection: T | null | undefined): Array<T[keyof T]>;
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.shuffle
*/
shuffle<T>(this: LoDashImplicitWrapper<List<T> | null | undefined>): LoDashImplicitWrapper<T[]>;
/**
* @see _.shuffle
*/
shuffle<T extends object>(this: LoDashImplicitWrapper<T | null | undefined>): LoDashImplicitWrapper<Array<T[keyof T]>>;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.shuffle
*/
shuffle<T>(this: LoDashExplicitWrapper<List<T> | null | undefined>): LoDashExplicitWrapper<T[]>;
/**
* @see _.shuffle
*/
shuffle<T extends object>(this: LoDashExplicitWrapper<T | null | undefined>): LoDashExplicitWrapper<Array<T[keyof T]>>;
}
}
-27
View File
@@ -1,27 +0,0 @@
import _ = require("../index");
declare module "../index" {
interface LoDashStatic {
/**
* Gets the size of collection by returning its length for array-like values or the number of own enumerable
* properties for objects.
*
* @param collection The collection to inspect.
* @return Returns the size of collection.
*/
size(collection: object | string | null | undefined): number;
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.size
*/
size(): number;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.size
*/
size(): LoDashExplicitWrapper<number>;
}
}
-85
View File
@@ -1,85 +0,0 @@
import _ = require("../index");
declare module "../index" {
interface LoDashStatic {
/**
* Checks if predicate returns truthy for any element of collection. Iteration is stopped once predicate
* returns truthy. The predicate is invoked with three arguments: (value, index|key, collection).
*
* @param collection The collection to iterate over.
* @param predicate The function invoked per iteration.
* @return Returns true if any element passes the predicate check, else false.
*/
some<T>(
collection: List<T> | null | undefined,
predicate?: ListIterateeCustom<T, boolean>
): boolean;
/**
* @see _.some
*/
some<T extends object>(
collection: T | null | undefined,
predicate?: ObjectIterateeCustom<T, boolean>
): boolean;
/**
* @see _.some
*/
some<T>(
collection: NumericDictionary<T> | null | undefined,
predicate?: NumericDictionaryIterateeCustom<T, boolean>
): boolean;
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.some
*/
some<T>(
this: LoDashImplicitWrapper<List<T> | null | undefined>,
predicate?: ListIterateeCustom<T, boolean>
): boolean;
/**
* @see _.some
*/
some<T extends object>(
this: LoDashImplicitWrapper<T | null | undefined>,
predicate?: ObjectIterateeCustom<T, boolean>
): boolean;
/**
* @see _.some
*/
some<T>(
this: LoDashImplicitWrapper<NumericDictionary<T> | null | undefined>,
predicate?: NumericDictionaryIterateeCustom<T, boolean>
): boolean;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.some
*/
some<T>(
this: LoDashExplicitWrapper<List<T> | null | undefined>,
predicate?: ListIterateeCustom<T, boolean>
): LoDashExplicitWrapper<boolean>;
/**
* @see _.some
*/
some<T extends object>(
this: LoDashExplicitWrapper<T | null | undefined>,
predicate?: ObjectIterateeCustom<T, boolean>
): LoDashExplicitWrapper<boolean>;
/**
* @see _.some
*/
some<T>(
this: LoDashExplicitWrapper<NumericDictionary<T> | null | undefined>,
predicate?: NumericDictionaryIterateeCustom<T, boolean>
): LoDashExplicitWrapper<boolean>;
}
}
-84
View File
@@ -1,84 +0,0 @@
import _ = require("../index");
declare module "../index" {
interface LoDashStatic {
/**
* Creates an array of elements, sorted in ascending order by the results of
* running each element in a collection through each iteratee. This method
* performs a stable sort, that is, it preserves the original sort order of
* equal elements. The iteratees are invoked with one argument: (value).
*
* @category Collection
* @param collection The collection to iterate over.
* @param [iteratees=[_.identity]]
* The iteratees to sort by, specified individually or in arrays.
* @returns Returns the new sorted array.
* @example
*
* var users = [
* { 'user': 'fred', 'age': 48 },
* { 'user': 'barney', 'age': 36 },
* { 'user': 'fred', 'age': 42 },
* { 'user': 'barney', 'age': 34 }
* ];
*
* _.sortBy(users, function(o) { return o.user; });
* // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 42]]
*
* _.sortBy(users, ['user', 'age']);
* // => objects for [['barney', 34], ['barney', 36], ['fred', 42], ['fred', 48]]
*
* _.sortBy(users, 'user', function(o) {
* return Math.floor(o.age / 10);
* });
* // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 42]]
*/
sortBy<T>(
collection: List<T> | null | undefined,
...iteratees: Array<Many<ListIteratee<T>>>
): T[];
/**
* @see _.sortBy
*/
sortBy<T extends object>(
collection: T | null | undefined,
...iteratees: Array<Many<ObjectIteratee<T>>>
): Array<T[keyof T]>;
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.sortBy
*/
sortBy<T>(
this: LoDashImplicitWrapper<List<T> | null | undefined>,
...iteratees: Array<Many<ListIteratee<T>>>
): LoDashImplicitWrapper<T[]>;
/**
* @see _.sortBy
*/
sortBy<T extends object>(
this: LoDashImplicitWrapper<T | null | undefined>,
...iteratees: Array<Many<ObjectIteratee<T>>>
): LoDashImplicitWrapper<Array<T[keyof T]>>;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.sortBy
*/
sortBy<T>(
this: LoDashExplicitWrapper<List<T> | null | undefined>,
...iteratees: Array<Many<ListIteratee<T>>>
): LoDashExplicitWrapper<T[]>;
/**
* @see _.sortBy
*/
sortBy<T extends object>(
this: LoDashExplicitWrapper<T | null | undefined>,
...iteratees: Array<Many<ObjectIteratee<T>>>
): LoDashExplicitWrapper<Array<T[keyof T]>>;
}
}
+3845
View File
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -1,5 +1,7 @@
import _ = require("../index");
declare module "../index" {
// now
interface LoDashStatic {
/**
* Gets the number of milliseconds that have elapsed since the Unix epoch (1 January 1970 00:00:00 UTC).
+1367
View File
File diff suppressed because it is too large Load Diff
+1937
View File
File diff suppressed because it is too large Load Diff
+536
View File
@@ -0,0 +1,536 @@
import _ = require("../index");
declare module "../index" {
// add
interface LoDashStatic {
/**
* Adds two numbers.
*
* @param augend The first number to add.
* @param addend The second number to add.
* @return Returns the sum.
*/
add(
augend: number,
addend: number
): number;
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.add
*/
add(addend: number): number;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.add
*/
add(addend: number): LoDashExplicitWrapper<number>;
}
// ceil
interface LoDashStatic {
/**
* Calculates n rounded up to precision.
*
* @param n The number to round up.
* @param precision The precision to round up to.
* @return Returns the rounded up number.
*/
ceil(
n: number,
precision?: number
): number;
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.ceil
*/
ceil(precision?: number): number;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.ceil
*/
ceil(precision?: number): LoDashExplicitWrapper<number>;
}
// divide
interface LoDashStatic {
/**
* Divide two numbers.
*
* @param dividend The first number in a division.
* @param divisor The second number in a division.
* @returns Returns the quotient.
*/
divide(
dividend: number,
divisor: number
): number;
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.divide
*/
divide(divisor: number): number;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.divide
*/
divide(divisor: number): LoDashExplicitWrapper<number>;
}
// floor
interface LoDashStatic {
/**
* Calculates n rounded down to precision.
*
* @param n The number to round down.
* @param precision The precision to round down to.
* @return Returns the rounded down number.
*/
floor(
n: number,
precision?: number
): number;
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.floor
*/
floor(precision?: number): number;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.floor
*/
floor(precision?: number): LoDashExplicitWrapper<number>;
}
// max
interface LoDashStatic {
/**
* Computes the maximum value of `array`. If `array` is empty or falsey
* `undefined` is returned.
*
* @category Math
* @param array The array to iterate over.
* @returns Returns the maximum value.
*/
max<T>(
collection: List<T> | null | undefined
): T | undefined;
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.max
*/
max<T>(this: LoDashImplicitWrapper<List<T> | null | undefined>): T | undefined;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.max
*/
max<T>(this: LoDashExplicitWrapper<List<T> | null | undefined>): LoDashExplicitWrapper<T | undefined>;
}
// maxBy
interface LoDashStatic {
/**
* This method is like `_.max` except that it accepts `iteratee` which is
* invoked for each element in `array` to generate the criterion by which
* the value is ranked. The iteratee is invoked with one argument: (value).
*
* @category Math
* @param array The array to iterate over.
* @param [iteratee=_.identity] The iteratee invoked per element.
* @returns Returns the maximum value.
* @example
*
* var objects = [{ 'n': 1 }, { 'n': 2 }];
*
* _.maxBy(objects, function(o) { return o.a; });
* // => { 'n': 2 }
*
* // using the `_.property` iteratee shorthand
* _.maxBy(objects, 'n');
* // => { 'n': 2 }
*/
maxBy<T>(
collection: List<T> | null | undefined,
iteratee?: ListIteratee<T>
): T | undefined;
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.maxBy
*/
maxBy<T>(
this: LoDashImplicitWrapper<List<T> | null | undefined>,
iteratee?: ListIteratee<T>
): T | undefined;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.maxBy
*/
maxBy<T>(
this: LoDashExplicitWrapper<List<T> | null | undefined>,
iteratee?: ListIteratee<T>
): LoDashExplicitWrapper<T | undefined>;
}
// mean
interface LoDashStatic {
/**
* Computes the mean of the values in `array`.
*
* @category Math
* @param array The array to iterate over.
* @returns Returns the mean.
* @example
*
* _.mean([4, 2, 8, 6]);
* // => 5
*/
mean(
collection: List<any> | null | undefined
): number;
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.mean
*/
mean(): number;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.mean
*/
mean(): LoDashExplicitWrapper<number>;
}
// meanBy
interface LoDashStatic {
/**
* Computes the mean of the provided propties of the objects in the `array`
*
* @category Math
* @param array The array to iterate over.
* @param [iteratee=_.identity] The iteratee invoked per element.
* @returns Returns the mean.
* @example
*
* _.mean([{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }], 'n');
* // => 5
*/
meanBy<T>(
collection: List<T> | null | undefined,
iteratee?: ListIteratee<T>
): number;
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.meanBy
*/
meanBy<T>(
this: LoDashImplicitWrapper<List<T> | null | undefined>,
iteratee?: ListIteratee<T>
): number;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.meanBy
*/
meanBy<T>(
this: LoDashExplicitWrapper<List<T> | null | undefined>,
iteratee?: ListIteratee<T>
): LoDashExplicitWrapper<number>;
}
// min
interface LoDashStatic {
/**
* Computes the minimum value of `array`. If `array` is empty or falsey
* `undefined` is returned.
*
* @category Math
* @param array The array to iterate over.
* @returns Returns the minimum value.
*/
min<T>(
collection: List<T> | null | undefined
): T | undefined;
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.min
*/
min<T>(this: LoDashImplicitWrapper<List<T> | null | undefined>): T | undefined;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.min
*/
min<T>(this: LoDashExplicitWrapper<List<T> | null | undefined>): LoDashExplicitWrapper<T | undefined>;
}
// minBy
interface LoDashStatic {
/**
* This method is like `_.min` except that it accepts `iteratee` which is
* invoked for each element in `array` to generate the criterion by which
* the value is ranked. The iteratee is invoked with one argument: (value).
*
* @category Math
* @param array The array to iterate over.
* @param [iteratee=_.identity] The iteratee invoked per element.
* @returns Returns the minimum value.
* @example
*
* var objects = [{ 'n': 1 }, { 'n': 2 }];
*
* _.minBy(objects, function(o) { return o.a; });
* // => { 'n': 1 }
*
* // using the `_.property` iteratee shorthand
* _.minBy(objects, 'n');
* // => { 'n': 1 }
*/
minBy<T>(
collection: List<T> | null | undefined,
iteratee?: ListIteratee<T>
): T | undefined;
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.minBy
*/
minBy<T>(
this: LoDashImplicitWrapper<List<T> | null | undefined>,
iteratee?: ListIteratee<T>
): T | undefined;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.minBy
*/
minBy<T>(
this: LoDashExplicitWrapper<List<T> | null | undefined>,
iteratee?: ListIteratee<T>
): LoDashExplicitWrapper<T | undefined>;
}
// multiply
interface LoDashStatic {
/**
* Multiply two numbers.
* @param multiplier The first number in a multiplication.
* @param multiplicand The second number in a multiplication.
* @returns Returns the product.
*/
multiply(
multiplier: number,
multiplicand: number
): number;
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.multiply
*/
multiply(multiplicand: number): number;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.multiply
*/
multiply(multiplicand: number): LoDashExplicitWrapper<number>;
}
// round
interface LoDashStatic {
/**
* Calculates n rounded to precision.
*
* @param n The number to round.
* @param precision The precision to round to.
* @return Returns the rounded number.
*/
round(
n: number,
precision?: number
): number;
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.round
*/
round(precision?: number): number;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.round
*/
round(precision?: number): LoDashExplicitWrapper<number>;
}
// subtract
interface LoDashStatic {
/**
* Subtract two numbers.
*
* @category Math
* @param minuend The first number in a subtraction.
* @param subtrahend The second number in a subtraction.
* @returns Returns the difference.
* @example
*
* _.subtract(6, 4);
* // => 2
*/
subtract(
minuend: number,
subtrahend: number
): number;
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.subtract
*/
subtract(
subtrahend: number
): number;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.subtract
*/
subtract(
subtrahend: number
): LoDashExplicitWrapper<number>;
}
// sum
interface LoDashStatic {
/**
* Computes the sum of the values in `array`.
*
* @category Math
* @param array The array to iterate over.
* @returns Returns the sum.
* @example
*
* _.sum([4, 2, 8, 6]);
* // => 20
*/
sum(collection: List<any> | null | undefined): number;
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.sum
*/
sum(): number;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.sum
*/
sum(): LoDashExplicitWrapper<number>;
}
// sumBy
interface LoDashStatic {
/**
* This method is like `_.sum` except that it accepts `iteratee` which is
* invoked for each element in `array` to generate the value to be summed.
* The iteratee is invoked with one argument: (value).
*
* @category Math
* @param array The array to iterate over.
* @param [iteratee=_.identity] The iteratee invoked per element.
* @returns Returns the sum.
* @example
*
* var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];
*
* _.sumBy(objects, function(o) { return o.n; });
* // => 20
*
* // using the `_.property` iteratee shorthand
* _.sumBy(objects, 'n');
* // => 20
*/
sumBy<T>(
collection: List<T> | null | undefined,
iteratee?: ((value: T) => number) | string
): number;
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.sumBy
*/
sumBy<T>(
this: LoDashImplicitWrapper<List<T> | null | undefined>,
iteratee?: ((value: T) => number) | string
): number;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.sumBy
*/
sumBy<T>(
this: LoDashExplicitWrapper<List<T> | null | undefined>,
iteratee?: ((value: T) => number) | string
): LoDashExplicitWrapper<number>;
}
/**********
* Number *
**********/
}
@@ -1,5 +1,102 @@
import _ = require("../index");
declare module "../index" {
// clamp
interface LoDashStatic {
/**
* Clamps `number` within the inclusive `lower` and `upper` bounds.
*
* @category Number
* @param number The number to clamp.
* @param [lower] The lower bound.
* @param upper The upper bound.
* @returns Returns the clamped number.
* @example
*
* _.clamp(-10, -5, 5);
* // => -5
*
* _.clamp(10, -5, 5);
* // => 5
*/
clamp(
number: number,
lower: number,
upper: number
): number;
clamp(
number: number,
upper: number
): number;
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.clamp
*/
clamp(
lower: number,
upper: number
): number;
clamp(
upper: number
): number;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.clamp
*/
clamp(
lower: number,
upper: number
): LoDashExplicitWrapper<number>;
clamp(
upper: number
): LoDashExplicitWrapper<number>;
}
// inRange
interface LoDashStatic {
/**
* Checks if n is between start and up to but not including, end. If end is not specified it’s set to start
* with start then set to 0.
*
* @param n The number to check.
* @param start The start of the range.
* @param end The end of the range.
* @return Returns true if n is in the range, else false.
*/
inRange(
n: number,
start: number,
end?: number
): boolean;
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.inRange
*/
inRange(
start: number,
end?: number
): boolean;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.inRange
*/
inRange(
start: number,
end?: number
): LoDashExplicitWrapper<boolean>;
}
// random
interface LoDashStatic {
/**
* Produces a random number between min and max (inclusive). If only one argument is provided a number between

Some files were not shown because too many files have changed in this diff Show More