import _ = require("../index"); declare module "../index" { // chunk 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( array: List | null | undefined, size?: number ): T[][]; } interface LoDashImplicitWrapper { /** * @see _.chunk */ chunk( this: LoDashImplicitWrapper | null | undefined>, size?: number, ): LoDashImplicitWrapper; } interface LoDashExplicitWrapper { /** * @see _.chunk */ chunk( this: LoDashExplicitWrapper | null | undefined>, size?: number, ): LoDashExplicitWrapper; } // compact 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(array: List | null | undefined): T[]; } interface LoDashImplicitWrapper { /** * @see _.compact */ compact(this: LoDashImplicitWrapper | null | undefined>): LoDashImplicitWrapper; } interface LoDashExplicitWrapper { /** * @see _.compact */ compact(this: LoDashExplicitWrapper | null | undefined>): LoDashExplicitWrapper; } // concat 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(array: Many, ...values: Array>): T[]; } interface LoDashImplicitWrapper { /** * @see _.compact */ concat(this: LoDashImplicitWrapper>, ...values: Array>): LoDashImplicitWrapper; } interface LoDashExplicitWrapper { /** * @see _.compact */ concat(this: LoDashExplicitWrapper>, ...values: Array>): LoDashExplicitWrapper; } // difference 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( array: List | null | undefined, ...values: Array> ): T[]; } interface LoDashImplicitWrapper { /** * @see _.difference */ difference( this: LoDashImplicitWrapper | null | undefined>, ...values: Array> ): LoDashImplicitWrapper; } interface LoDashExplicitWrapper { /** * @see _.difference */ difference( this: LoDashExplicitWrapper | null | undefined>, ...values: Array> ): LoDashExplicitWrapper; } // differenceBy 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( array: List | null | undefined, values: List, iteratee: ValueIteratee ): T1[]; /** * @see _.differenceBy */ differenceBy( array: List | null | undefined, values1: List, values2: List, iteratee: ValueIteratee ): T1[]; /** * @see _.differenceBy */ differenceBy( array: List | null | undefined, values1: List, values2: List, values3: List, iteratee: ValueIteratee ): T1[]; /** * @see _.differenceBy */ differenceBy( array: List | null | undefined, values1: List, values2: List, values3: List, values4: List, iteratee: ValueIteratee ): T1[]; /** * @see _.differenceBy */ differenceBy( array: List | null | undefined, values1: List, values2: List, values3: List, values4: List, values5: List, iteratee: ValueIteratee ): T1[]; /** * @see _.differenceBy */ differenceBy( array: List | null | undefined, values1: List, values2: List, values3: List, values4: List, values5: List, ...values: Array | ValueIteratee> ): T1[]; /** * @see _.differenceBy */ differenceBy( array: List | null | undefined, ...values: Array> ): T[]; } interface LoDashImplicitWrapper { /** * @see _.differenceBy */ differenceBy( this: LoDashImplicitWrapper | null | undefined>, values: List, iteratee: ValueIteratee ): LoDashImplicitWrapper; /** * @see _.differenceBy */ differenceBy( this: LoDashImplicitWrapper | null | undefined>, values1: List, values2: List, iteratee: ValueIteratee ): LoDashImplicitWrapper; /** * @see _.differenceBy */ differenceBy( this: LoDashImplicitWrapper | null | undefined>, values1: List, values2: List, values3: List, iteratee: ValueIteratee ): LoDashImplicitWrapper; /** * @see _.differenceBy */ differenceBy( this: LoDashImplicitWrapper | null | undefined>, values1: List, values2: List, values3: List, values4: List, iteratee: ValueIteratee ): LoDashImplicitWrapper; /** * @see _.differenceBy */ differenceBy( this: LoDashImplicitWrapper | null | undefined>, values1: List, values2: List, values3: List, values4: List, values5: List, iteratee: ValueIteratee ): LoDashImplicitWrapper; /** * @see _.differenceBy */ differenceBy( this: LoDashImplicitWrapper | null | undefined>, values1: List, values2: List, values3: List, values4: List, values5: List, ...values: Array | ValueIteratee> ): LoDashImplicitWrapper; /** * @see _.differenceBy */ differenceBy( this: LoDashImplicitWrapper | null | undefined>, ...values: Array> ): LoDashImplicitWrapper; } interface LoDashExplicitWrapper { /** * @see _.differenceBy */ differenceBy( this: LoDashExplicitWrapper | null | undefined>, values: List, iteratee: ValueIteratee ): LoDashExplicitWrapper; /** * @see _.differenceBy */ differenceBy( this: LoDashExplicitWrapper | null | undefined>, values1: List, values2: List, iteratee: ValueIteratee ): LoDashExplicitWrapper; /** * @see _.differenceBy */ differenceBy( this: LoDashExplicitWrapper | null | undefined>, values1: List, values2: List, values3: List, iteratee: ValueIteratee ): LoDashExplicitWrapper; /** * @see _.differenceBy */ differenceBy( this: LoDashExplicitWrapper | null | undefined>, values1: List, values2: List, values3: List, values4: List, iteratee: ValueIteratee ): LoDashExplicitWrapper; /** * @see _.differenceBy */ differenceBy( this: LoDashExplicitWrapper | null | undefined>, values1: List, values2: List, values3: List, values4: List, values5: List, iteratee: ValueIteratee ): LoDashExplicitWrapper; /** * @see _.differenceBy */ differenceBy( this: LoDashExplicitWrapper | null | undefined>, values1: List, values2: List, values3: List, values4: List, values5: List, ...values: Array | ValueIteratee> ): LoDashExplicitWrapper; /** * @see _.differenceBy */ differenceBy( this: LoDashExplicitWrapper | null | undefined>, ...values: Array> ): LoDashExplicitWrapper; } // differenceWith 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( array: List | null | undefined, values: List, comparator: Comparator2 ): T1[]; /** * @see _.differenceWith */ differenceWith( array: List | null | undefined, values1: List, values2: List, comparator: Comparator2 ): T1[]; /** * @see _.differenceWith */ differenceWith( array: List | null | undefined, values1: List, values2: List, ...values: Array | Comparator2> ): T1[]; /** * @see _.differenceWith */ differenceWith( array: List | null | undefined, ...values: Array> ): T[]; } interface LoDashImplicitWrapper { /** * @see _.differenceWith */ differenceWith( this: LoDashImplicitWrapper | null | undefined>, values: List, comparator: Comparator2 ): LoDashImplicitWrapper; /** * @see _.differenceWith */ differenceWith( this: LoDashImplicitWrapper | null | undefined>, values1: List, values2: List, comparator: Comparator2 ): LoDashImplicitWrapper; /** * @see _.differenceWith */ differenceWith( this: LoDashImplicitWrapper | null | undefined>, values1: List, values2: List, ...values: Array | Comparator2> ): LoDashImplicitWrapper; /** * @see _.differenceWith */ differenceWith( this: LoDashImplicitWrapper | null | undefined>, ...values: Array> ): LoDashImplicitWrapper; } interface LoDashExplicitWrapper { /** * @see _.differenceWith */ differenceWith( this: LoDashExplicitWrapper | null | undefined>, values: List, comparator: Comparator2 ): LoDashExplicitWrapper; /** * @see _.differenceWith */ differenceWith( this: LoDashExplicitWrapper | null | undefined>, values1: List, values2: List, comparator: Comparator2 ): LoDashExplicitWrapper; /** * @see _.differenceWith */ differenceWith( this: LoDashExplicitWrapper | null | undefined>, values1: List, values2: List, ...values: Array | Comparator2> ): LoDashExplicitWrapper; /** * @see _.differenceWith */ differenceWith( this: LoDashExplicitWrapper | null | undefined>, ...values: Array> ): LoDashExplicitWrapper; } // drop 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(array: List | null | undefined, n?: number): T[]; } interface LoDashImplicitWrapper { /** * @see _.drop */ drop(this: LoDashImplicitWrapper | null | undefined>, n?: number): LoDashImplicitWrapper; } interface LoDashExplicitWrapper { /** * @see _.drop */ drop(this: LoDashExplicitWrapper | null | undefined>, n?: number): LoDashExplicitWrapper; } // dropRight 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( array: List | null | undefined, n?: number ): T[]; } interface LoDashImplicitWrapper { /** * @see _.dropRight */ dropRight(this: LoDashImplicitWrapper | null | undefined>, n?: number): LoDashImplicitWrapper; } interface LoDashExplicitWrapper { /** * @see _.dropRight */ dropRight(this: LoDashExplicitWrapper | null | undefined>, n?: number): LoDashExplicitWrapper; } // dropRightWhile interface LoDashStatic { /** * Creates a slice of array excluding elements dropped from the end. Elements are dropped until predicate * returns falsey. The predicate is invoked with three arguments: (value, index, array). * * @param array The array to query. * @param predicate The function invoked per iteration. * @return Returns the slice of array. */ dropRightWhile( array: List | null | undefined, predicate?: ListIteratee ): T[]; } interface LoDashImplicitWrapper { /** * @see _.dropRightWhile */ dropRightWhile( this: LoDashImplicitWrapper | null | undefined>, predicate?: ListIteratee ): LoDashImplicitWrapper; } interface LoDashExplicitWrapper { /** * @see _.dropRightWhile */ dropRightWhile( this: LoDashExplicitWrapper | null | undefined>, predicate?: ListIteratee ): LoDashExplicitWrapper; } // dropWhile interface LoDashStatic { /** * Creates a slice of array excluding elements dropped from the beginning. Elements are dropped until predicate * returns falsey. The predicate is invoked with three arguments: (value, index, array). * * @param array The array to query. * @param predicate The function invoked per iteration. * @return Returns the slice of array. */ dropWhile( array: List | null | undefined, predicate?: ListIteratee ): T[]; } interface LoDashImplicitWrapper { /** * @see _.dropWhile */ dropWhile( this: LoDashImplicitWrapper | null | undefined>, predicate?: ListIteratee ): LoDashImplicitWrapper; } interface LoDashExplicitWrapper { /** * @see _.dropWhile */ dropWhile( this: LoDashExplicitWrapper | null | undefined>, predicate?: ListIteratee ): LoDashExplicitWrapper; } // fill 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( array: any[] | null | undefined, value: T ): T[]; /** * @see _.fill */ fill( array: List | null | undefined, value: T ): List; /** * @see _.fill */ fill( array: U[] | null | undefined, value: T, start?: number, end?: number ): Array; /** * @see _.fill */ fill( array: List | null | undefined, value: T, start?: number, end?: number ): List; } interface LoDashImplicitWrapper { /** * @see _.fill */ fill( this: LoDashImplicitWrapper, value: T ): LoDashImplicitWrapper; /** * @see _.fill */ fill( this: LoDashImplicitWrapper | null | undefined>, value: T ): LoDashImplicitWrapper>; /** * @see _.fill */ fill( this: LoDashImplicitWrapper, value: T, start?: number, end?: number ): LoDashImplicitWrapper>; /** * @see _.fill */ fill( this: LoDashImplicitWrapper | null | undefined>, value: T, start?: number, end?: number ): LoDashImplicitWrapper>; } interface LoDashExplicitWrapper { /** * @see _.fill */ fill( this: LoDashExplicitWrapper, value: T ): LoDashExplicitWrapper; /** * @see _.fill */ fill( this: LoDashExplicitWrapper | null | undefined>, value: T ): LoDashExplicitWrapper>; /** * @see _.fill */ fill( this: LoDashExplicitWrapper, value: T, start?: number, end?: number ): LoDashExplicitWrapper>; /** * @see _.fill */ fill( this: LoDashExplicitWrapper | null | undefined>, value: T, start?: number, end?: number ): LoDashExplicitWrapper>; } // findIndex 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. * * @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( array: List | null | undefined, predicate?: ListIterateeCustom, fromIndex?: number ): number; } interface LoDashImplicitWrapper { /** * @see _.findIndex */ findIndex( this: LoDashImplicitWrapper | null | undefined>, predicate?: ListIterateeCustom, fromIndex?: number ): number; } interface LoDashExplicitWrapper { /** * @see _.findIndex */ findIndex( this: LoDashExplicitWrapper | null | undefined>, predicate?: ListIterateeCustom, fromIndex?: number ): LoDashExplicitWrapper; } // findLastIndex interface LoDashStatic { /** * This method is like _.findIndex except that it iterates over elements of collection from right to left. * * @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( array: List | null | undefined, predicate?: ListIterateeCustom, fromIndex?: number ): number; } interface LoDashImplicitWrapper { /** * @see _.findLastIndex */ findLastIndex( this: LoDashImplicitWrapper | null | undefined>, predicate?: ListIterateeCustom, fromIndex?: number ): number; } interface LoDashExplicitWrapper { /** * @see _.findLastIndex */ findLastIndex( this: LoDashExplicitWrapper | null | undefined>, predicate?: ListIterateeCustom, fromIndex?: number ): LoDashExplicitWrapper; } // first interface LoDashStatic { first: typeof _.head; // tslint:disable-line:no-unnecessary-qualifier } interface LoDashImplicitWrapper { /** * @see _.head */ first(this: LoDashImplicitWrapper | null | undefined>): T | undefined; } interface LoDashExplicitWrapper { /** * @see _.head */ first(this: LoDashExplicitWrapper | null | undefined>): LoDashExplicitWrapper; } interface RecursiveArray extends Array> {} interface ListOfRecursiveArraysOrValues extends List> {} // flatten interface LoDashStatic { /** * Flattens `array` a single level deep. * * @param array The array to flatten. * @return Returns the new flattened array. */ flatten(array: List> | null | undefined): T[]; } interface LoDashImplicitWrapper { /** * @see _.flatten */ flatten(this: LoDashImplicitWrapper> | null | undefined>): LoDashImplicitWrapper; } interface LoDashExplicitWrapper { /** * @see _.flatten */ flatten(this: LoDashExplicitWrapper> | null | undefined>): LoDashExplicitWrapper; } // flattenDeep interface LoDashStatic { /** * Recursively flattens a nested array. * * @param array The array to recursively flatten. * @return Returns the new flattened array. */ flattenDeep(array: ListOfRecursiveArraysOrValues | null | undefined): T[]; } interface LoDashImplicitWrapper { /** * @see _.flattenDeep */ flattenDeep(this: LoDashImplicitWrapper | null | undefined>): LoDashImplicitWrapper; } interface LoDashExplicitWrapper { /** * @see _.flattenDeep */ flattenDeep(this: LoDashExplicitWrapper | null | undefined>): LoDashExplicitWrapper; } // flattenDepth 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(array: ListOfRecursiveArraysOrValues | null | undefined, depth?: number): T[]; } interface LoDashImplicitWrapper { /** * @see _.flattenDeep */ flattenDepth(this: LoDashImplicitWrapper | null | undefined>, depth?: number): LoDashImplicitWrapper; } interface LoDashExplicitWrapper { /** * @see _.flattenDeep */ flattenDepth(this: LoDashExplicitWrapper | null | undefined>, depth?: number): LoDashExplicitWrapper; } // fromPairs 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( pairs: List<[PropertyName, T]> | null | undefined ): Dictionary; /** @see _.fromPairs */ fromPairs( pairs: List | null | undefined ): Dictionary; } interface LoDashImplicitWrapper { /** * @see _.fromPairs */ fromPairs( this: LoDashImplicitWrapper | null | undefined> ): LoDashImplicitWrapper>; /** @see _.fromPairs */ fromPairs( this: LoDashImplicitWrapper | null | undefined> ): LoDashImplicitWrapper>; } interface LoDashExplicitWrapper { /** * @see _.fromPairs */ fromPairs( this: LoDashExplicitWrapper | null | undefined> ): LoDashExplicitWrapper>; /** @see _.fromPairs */ fromPairs( this: LoDashExplicitWrapper | null | undefined> ): LoDashExplicitWrapper>; } // head interface LoDashStatic { /** * Gets the first element of array. * * @alias _.first * * @param array The array to query. * @return Returns the first element of array. */ head(array: List | null | undefined): T | undefined; } interface LoDashImplicitWrapper { /** * @see _.head */ head(this: LoDashImplicitWrapper | null | undefined>): T | undefined; } interface LoDashExplicitWrapper { /** * @see _.head */ head(this: LoDashExplicitWrapper | null | undefined>): LoDashExplicitWrapper; } // indexOf 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`. * * @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( array: List | null | undefined, value: T, fromIndex?: number ): number; } interface LoDashImplicitWrapper { /** * @see _.indexOf */ indexOf( this: LoDashImplicitWrapper | null | undefined>, value: T, fromIndex?: number ): number; } interface LoDashExplicitWrapper { /** * @see _.indexOf */ indexOf( this: LoDashExplicitWrapper | null | undefined>, value: T, fromIndex?: number ): LoDashExplicitWrapper; } // initial interface LoDashStatic { /** * Gets all but the last element of array. * * @param array The array to query. * @return Returns the slice of array. */ initial(array: List | null | undefined): T[]; } interface LoDashImplicitWrapper { /** * @see _.initial */ initial(this: LoDashImplicitWrapper | null | undefined>): LoDashImplicitWrapper; } interface LoDashExplicitWrapper { /** * @see _.initial */ initial(this: LoDashExplicitWrapper | null | undefined>): LoDashExplicitWrapper; } // intersection 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(...arrays: Array>): T[]; } interface LoDashImplicitWrapper { /** * @see _.intersection */ intersection( this: LoDashImplicitWrapper>, ...arrays: Array> ): LoDashImplicitWrapper; } interface LoDashExplicitWrapper { /** * @see _.intersection */ intersection( this: LoDashExplicitWrapper>, ...arrays: Array> ): LoDashExplicitWrapper; } // intersectionBy 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( array: List | null, values: List, iteratee: ValueIteratee ): T1[]; /** * @see _.intersectionBy */ intersectionBy( array: List | null, values1: List, values2: List, iteratee: ValueIteratee ): T1[]; /** * @see _.intersectionBy */ intersectionBy( array: List | null | undefined, values1: List, values2: List, ...values: Array | ValueIteratee> ): T1[]; /** * @see _.intersectionBy */ intersectionBy( array?: List | null, ...values: Array> ): T[]; /** * @see _.intersectionBy */ intersectionBy(...values: Array | ValueIteratee>): T[]; } interface LoDashImplicitWrapper { /** * @see _.intersectionBy */ intersectionBy( this: LoDashImplicitWrapper | null | undefined>, values: List, iteratee: ValueIteratee ): LoDashImplicitWrapper; /** * @see _.intersectionBy */ intersectionBy( this: LoDashImplicitWrapper | null | undefined>, values1: List, values2: List, iteratee: ValueIteratee ): LoDashImplicitWrapper; /** * @see _.intersectionBy */ intersectionBy( this: LoDashImplicitWrapper | null | undefined>, values1: List, values2: List, ...values: Array | ValueIteratee> ): LoDashImplicitWrapper; /** * @see _.intersectionBy */ intersectionBy( this: LoDashImplicitWrapper | null | undefined>, ...values: Array | ValueIteratee> ): LoDashImplicitWrapper; } interface LoDashExplicitWrapper { /** * @see _.intersectionBy */ intersectionBy( this: LoDashExplicitWrapper | null | undefined>, values: List, iteratee: ValueIteratee ): LoDashExplicitWrapper; /** * @see _.intersectionBy */ intersectionBy( this: LoDashExplicitWrapper | null | undefined>, values1: List, values2: List, iteratee: ValueIteratee ): LoDashExplicitWrapper; /** * @see _.intersectionBy */ intersectionBy( this: LoDashExplicitWrapper | null | undefined>, values1: List, values2: List, ...values: Array | ValueIteratee> ): LoDashExplicitWrapper; /** * @see _.intersectionBy */ intersectionBy( this: LoDashExplicitWrapper | null | undefined>, ...values: Array | ValueIteratee> ): LoDashExplicitWrapper; } // intersectionWith 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( array: List | null | undefined, values: List, comparator: Comparator2 ): T1[]; /** * @see _.intersectionWith */ intersectionWith( array: List | null | undefined, values1: List, values2: List, comparator: Comparator2 ): T1[]; /** * @see _.intersectionWith */ intersectionWith( array: List | null | undefined, values1: List, values2: List, ...values: Array | Comparator2> ): T1[]; /** * @see _.intersectionWith */ intersectionWith( array?: List | null, ...values: Array | Comparator2> ): T[]; } interface LoDashImplicitWrapper { /** * @see _.intersectionWith */ intersectionWith( this: LoDashImplicitWrapper | null | undefined>, values: List, comparator: Comparator2 ): LoDashImplicitWrapper; /** * @see _.intersectionWith */ intersectionWith( this: LoDashImplicitWrapper | null | undefined>, values1: List, values2: List, comparator: Comparator2 ): LoDashImplicitWrapper; /** * @see _.intersectionWith */ intersectionWith( this: LoDashImplicitWrapper | null | undefined>, values1: List, values2: List, ...values: Array | Comparator2> ): LoDashImplicitWrapper; /** * @see _.intersectionWith */ intersectionWith( this: LoDashImplicitWrapper | null | undefined>, ...values: Array> ): LoDashImplicitWrapper; } interface LoDashExplicitWrapper { /** * @see _.intersectionWith */ intersectionWith( this: LoDashExplicitWrapper | null | undefined>, values: List, comparator: Comparator2 ): LoDashExplicitWrapper; /** * @see _.intersectionWith */ intersectionWith( this: LoDashExplicitWrapper | null | undefined>, values1: List, values2: List, comparator: Comparator2 ): LoDashExplicitWrapper; /** * @see _.intersectionWith */ intersectionWith( this: LoDashExplicitWrapper | null | undefined>, values1: List, values2: List, ...values: Array | Comparator2> ): LoDashExplicitWrapper; /** * @see _.intersectionWith */ intersectionWith( this: LoDashExplicitWrapper | null | undefined>, ...values: Array> ): LoDashExplicitWrapper; } // join 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 | null | undefined, separator?: string ): string; } interface LoDashImplicitWrapper { /** * @see _.join */ join(separator?: string): string; } interface LoDashExplicitWrapper { /** * @see _.join */ join(separator?: string): LoDashExplicitWrapper; } // last interface LoDashStatic { /** * Gets the last element of array. * * @param array The array to query. * @return Returns the last element of array. */ last(array: List | null | undefined): T | undefined; } interface LoDashImplicitWrapper { /** * @see _.last */ last(this: LoDashImplicitWrapper | null | undefined>): T | undefined; } interface LoDashExplicitWrapper { /** * @see _.last */ last(this: LoDashExplicitWrapper | null | undefined>): LoDashExplicitWrapper; } // lastIndexOf 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( array: List | null | undefined, value: T, fromIndex?: true|number ): number; } interface LoDashImplicitWrapper { /** * @see _.indexOf */ lastIndexOf( this: LoDashImplicitWrapper | null | undefined>, value: T, fromIndex?: true|number ): number; } interface LoDashExplicitWrapper { /** * @see _.indexOf */ lastIndexOf( this: LoDashExplicitWrapper | null | undefined>, value: T, fromIndex?: true|number ): LoDashExplicitWrapper; } // nth 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( array: List | null | undefined, n?: number ): T | undefined; } interface LoDashImplicitWrapper { /** * @see _.nth */ nth( this: LoDashImplicitWrapper | null | undefined>, n?: number ): T | undefined; } interface LoDashExplicitWrapper { /** * @see _.nth */ nth( this: LoDashExplicitWrapper | null | undefined>, n?: number ): LoDashExplicitWrapper; } // pull 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( array: T[], ...values: T[] ): T[]; /** * @see _.pull */ pull( array: List, ...values: T[] ): List; } interface LoDashImplicitWrapper { /** * @see _.pull */ pull( this: LoDashImplicitWrapper>, ...values: T[] ): this; } interface LoDashExplicitWrapper { /** * @see _.pull */ pull( this: LoDashExplicitWrapper>, ...values: T[] ): this; } // pullAll 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( array: T[], values?: List, ): T[]; /** * @see _.pullAll */ pullAll( array: List, values?: List, ): List; } interface LoDashImplicitWrapper { /** * @see _.pullAll */ pullAll( this: LoDashImplicitWrapper>, values?: List ): this; } interface LoDashExplicitWrapper { /** * @see _.pullAll */ pullAll( this: LoDashExplicitWrapper>, values?: List ): this; } // pullAllBy 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( array: T[], values?: List, iteratee?: ValueIteratee ): T[]; /** * @see _.pullAllBy */ pullAllBy( array: List, values?: List, iteratee?: ValueIteratee ): List; /** * @see _.pullAllBy */ pullAllBy( array: T1[], values: List, iteratee: ValueIteratee ): T1[]; /** * @see _.pullAllBy */ pullAllBy( array: List, values: List, iteratee: ValueIteratee ): List; } interface LoDashWrapper { /** * @see _.pullAllBy */ pullAllBy( this: LoDashWrapper>, values?: List, iteratee?: ValueIteratee ): this; /** * @see _.pullAllBy */ pullAllBy( this: LoDashWrapper>, values: List, iteratee: ValueIteratee ): this; } // pullAllWith 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( array: T[], values?: List, comparator?: Comparator ): T[]; /** * @see _.pullAllWith */ pullAllWith( array: List, values?: List, comparator?: Comparator ): List; /** * @see _.pullAllWith */ pullAllWith( array: T1[], values: List, comparator: Comparator2 ): T1[]; /** * @see _.pullAllWith */ pullAllWith( array: List, values: List, comparator: Comparator2 ): List; } interface LoDashWrapper { /** * @see _.pullAllWith */ pullAllWith( this: LoDashWrapper>, values?: List, comparator?: Comparator ): this; /** * @see _.pullAllWith */ pullAllWith( this: LoDashWrapper>, values: List, comparator: Comparator2 ): this; } // pullAt 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( array: T[], ...indexes: Array> ): T[]; /** * @see _.pullAt */ pullAt( array: List, ...indexes: Array> ): List; } interface LoDashWrapper { /** * @see _.pullAt */ pullAt(...indexes: Array>): this; } // remove interface LoDashStatic { /** * Removes all elements from array that predicate returns truthy for and returns an array of the removed * elements. The predicate is invoked with three arguments: (value, index, array). * * Note: Unlike _.filter, this method mutates array. * * @param array The array to modify. * @param predicate The function invoked per iteration. * @return Returns the new array of removed elements. */ remove( array: List, predicate?: ListIteratee ): T[]; } interface LoDashImplicitWrapper { /** * @see _.remove */ remove( this: LoDashImplicitWrapper>, predicate?: ListIteratee ): LoDashImplicitWrapper; } interface LoDashExplicitWrapper { /** * @see _.remove */ remove( this: LoDashExplicitWrapper>, predicate?: ListIteratee ): LoDashExplicitWrapper; } // reverse 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>( array: TList, ): TList; } // slice 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( array: List | null | undefined, start?: number, end?: number ): T[]; } interface LoDashImplicitWrapper { /** * @see _.slice */ slice( this: LoDashImplicitWrapper | null | undefined>, start?: number, end?: number ): LoDashImplicitWrapper; } interface LoDashExplicitWrapper { /** * @see _.slice */ slice( this: LoDashExplicitWrapper | null | undefined>, start?: number, end?: number ): LoDashExplicitWrapper; } // sortedIndex 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( array: List | null | undefined, value: T ): number; } interface LoDashImplicitWrapper { /** * @see _.sortedIndex */ sortedIndex( this: LoDashImplicitWrapper | null | undefined>, value: T ): number; } interface LoDashExplicitWrapper { /** * @see _.sortedIndex */ sortedIndex( this: LoDashExplicitWrapper | null | undefined>, value: T ): LoDashExplicitWrapper; } // sortedIndexBy 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( array: List | null | undefined, value: T ): number; } interface LoDashImplicitWrapper { /** * @see _.sortedIndex */ sortedIndex( this: LoDashImplicitWrapper | null | undefined>, value: T ): number; } interface LoDashExplicitWrapper { /** * @see _.sortedIndex */ sortedIndex( this: LoDashExplicitWrapper | null | undefined>, value: T ): LoDashExplicitWrapper; } // _.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( array: List | null | undefined, value: T, iteratee?: ValueIteratee ): number; } interface LoDashImplicitWrapper { /** * @see _.sortedIndexBy */ sortedIndexBy( this: LoDashImplicitWrapper | null | undefined>, value: T, iteratee?: ValueIteratee ): number; } interface LoDashExplicitWrapper { /** * @see _.sortedIndexBy */ sortedIndexBy( this: LoDashExplicitWrapper | null | undefined>, value: T, iteratee?: ValueIteratee ): LoDashExplicitWrapper; } // sortedIndexOf 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( array: List | null | undefined, value: T ): number; } interface LoDashImplicitWrapper { /** * @see _.sortedIndexOf */ sortedIndexOf( this: LoDashImplicitWrapper | null | undefined>, value: T ): number; } interface LoDashExplicitWrapper { /** * @see _.sortedIndexOf */ sortedIndexOf( this: LoDashExplicitWrapper | null | undefined>, value: T ): LoDashExplicitWrapper; } // sortedLastIndex 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( array: List | null | undefined, value: T ): number; } interface LoDashImplicitWrapper { /** * @see _.sortedLastIndex */ sortedLastIndex( this: LoDashImplicitWrapper | null | undefined>, value: T ): number; } interface LoDashExplicitWrapper { /** * @see _.sortedLastIndex */ sortedLastIndex( this: LoDashExplicitWrapper | null | undefined>, value: T ): LoDashExplicitWrapper; } // sortedLastIndexBy 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( array: List | null | undefined, value: T, iteratee: ValueIteratee ): number; } interface LoDashImplicitWrapper { /** * @see _.sortedLastIndexBy */ sortedLastIndexBy( this: LoDashImplicitWrapper | null | undefined>, value: T, iteratee: ValueIteratee ): number; } interface LoDashExplicitWrapper { /** * @see _.sortedLastIndexBy */ sortedLastIndexBy( this: LoDashExplicitWrapper | null | undefined>, value: T, iteratee: ValueIteratee ): LoDashExplicitWrapper; } // sortedLastIndexOf 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( array: List | null | undefined, value: T ): number; } interface LoDashImplicitWrapper { /** * @see _.sortedLastIndexOf */ sortedLastIndexOf( this: LoDashImplicitWrapper | null | undefined>, value: T ): number; } interface LoDashExplicitWrapper { /** * @see _.sortedLastIndexOf */ sortedLastIndexOf( this: LoDashExplicitWrapper | null | undefined>, value: T ): LoDashExplicitWrapper; } // sortedUniq 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( array: List | null | undefined ): T[]; } interface LoDashImplicitWrapper { /** * @see _.sortedUniq */ sortedUniq(this: LoDashImplicitWrapper | null | undefined>): LoDashImplicitWrapper; } interface LoDashExplicitWrapper { /** * @see _.sortedUniq */ sortedUniq(this: LoDashExplicitWrapper | null | undefined>): LoDashExplicitWrapper; } // sortedUniqBy 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: List | null | undefined, iteratee: ValueIteratee ): T[]; } interface LoDashImplicitWrapper { /** * @see _.sortedUniqBy */ sortedUniqBy( this: LoDashImplicitWrapper | null | undefined>, iteratee: ValueIteratee ): LoDashImplicitWrapper; } interface LoDashExplicitWrapper { /** * @see _.sortedUniqBy */ sortedUniqBy( this: LoDashExplicitWrapper | null | undefined>, iteratee: ValueIteratee ): LoDashExplicitWrapper; } // tail interface LoDashStatic { /** * Gets all but the first element of array. * * @param array The array to query. * @return Returns the slice of array. */ tail(array: List | null | undefined): T[]; } interface LoDashImplicitWrapper { /** * @see _.tail */ tail(this: LoDashImplicitWrapper | null | undefined>): LoDashImplicitWrapper; } interface LoDashExplicitWrapper { /** * @see _.tail */ tail(this: LoDashExplicitWrapper | null | undefined>): LoDashExplicitWrapper; } // take 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( array: List | null | undefined, n?: number ): T[]; } interface LoDashImplicitWrapper { /** * @see _.take */ take( this: LoDashImplicitWrapper | null | undefined>, n?: number ): LoDashImplicitWrapper; } interface LoDashExplicitWrapper { /** * @see _.take */ take( this: LoDashExplicitWrapper | null | undefined>, n?: number ): LoDashExplicitWrapper; } // takeRight 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( array: List | null | undefined, n?: number ): T[]; } interface LoDashImplicitWrapper { /** * @see _.takeRight */ takeRight( this: LoDashImplicitWrapper | null | undefined>, n?: number ): LoDashImplicitWrapper; } interface LoDashExplicitWrapper { /** * @see _.takeRight */ takeRight( this: LoDashExplicitWrapper | null | undefined>, n?: number ): LoDashExplicitWrapper; } // takeRightWhile interface LoDashStatic { /** * Creates a slice of array with elements taken from the end. Elements are taken until predicate returns * falsey. The predicate is invoked with three arguments: (value, index, array). * * @param array The array to query. * @param predicate The function invoked per iteration. * @return Returns the slice of array. */ takeRightWhile( array: List | null | undefined, predicate?: ListIteratee ): T[]; } interface LoDashImplicitWrapper { /** * @see _.takeRightWhile */ takeRightWhile( this: LoDashImplicitWrapper | null | undefined>, predicate?: ListIteratee ): LoDashImplicitWrapper; } interface LoDashExplicitWrapper { /** * @see _.takeRightWhile */ takeRightWhile( this: LoDashExplicitWrapper | null | undefined>, predicate?: ListIteratee ): LoDashExplicitWrapper; } // takeWhile interface LoDashStatic { /** * Creates a slice of array with elements taken from the beginning. Elements are taken until predicate returns * falsey. The predicate is invoked with three arguments: (value, index, array). * * @param array The array to query. * @param predicate The function invoked per iteration. * @return Returns the slice of array. */ takeWhile( array: List | null | undefined, predicate?: ListIteratee ): T[]; } interface LoDashImplicitWrapper { /** * @see _.takeWhile */ takeWhile( this: LoDashImplicitWrapper | null | undefined>, predicate?: ListIteratee ): LoDashImplicitWrapper; } interface LoDashExplicitWrapper { /** * @see _.takeWhile */ takeWhile( this: LoDashExplicitWrapper | null | undefined>, predicate?: ListIteratee ): LoDashExplicitWrapper; } // union 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(...arrays: Array | null | undefined>): T[]; } interface LoDashImplicitWrapper { /** * @see _.union */ union( this: LoDashImplicitWrapper | null | undefined>, ...arrays: Array | null | undefined> ): LoDashImplicitWrapper; } interface LoDashExplicitWrapper { /** * @see _.union */ union( this: LoDashExplicitWrapper | null | undefined>, ...arrays: Array | null | undefined> ): LoDashExplicitWrapper; } // unionBy 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( arrays: List | null | undefined, iteratee?: ValueIteratee ): T[]; /** * @see _.unionBy */ unionBy( arrays1: List | null | undefined, arrays2: List | null | undefined, iteratee?: ValueIteratee ): T[]; /** * @see _.unionBy */ unionBy( arrays1: List | null | undefined, arrays2: List | null | undefined, arrays3: List | null | undefined, iteratee?: ValueIteratee ): T[]; /** * @see _.unionBy */ unionBy( arrays1: List | null | undefined, arrays2: List | null | undefined, arrays3: List | null | undefined, arrays4: List | null | undefined, iteratee?: ValueIteratee ): T[]; /** * @see _.unionBy */ unionBy( arrays1: List | null | undefined, arrays2: List | null | undefined, arrays3: List | null | undefined, arrays4: List | null | undefined, arrays5: List | null | undefined, ...iteratee: Array | List | null | undefined> ): T[]; } interface LoDashImplicitWrapper { /** * @see _.unionBy */ unionBy( this: LoDashImplicitWrapper | null | undefined>, iteratee?: ValueIteratee ): LoDashImplicitWrapper; /** * @see _.unionBy */ unionBy( this: LoDashImplicitWrapper | null | undefined>, arrays2: List | null | undefined, iteratee?: ValueIteratee ): LoDashImplicitWrapper; /** * @see _.unionBy */ unionBy( this: LoDashImplicitWrapper | null | undefined>, arrays2: List | null | undefined, arrays3: List | null | undefined, iteratee?: ValueIteratee ): LoDashImplicitWrapper; /** * @see _.unionBy */ unionBy( this: LoDashImplicitWrapper | null | undefined>, arrays2: List | null | undefined, arrays3: List | null | undefined, arrays4: List | null | undefined, iteratee?: ValueIteratee ): LoDashImplicitWrapper; /** * @see _.unionBy */ unionBy( this: LoDashImplicitWrapper | null | undefined>, arrays2: List | null | undefined, arrays3: List | null | undefined, arrays4: List | null | undefined, arrays5: List | null | undefined, ...iteratee: Array | List | null | undefined> ): LoDashImplicitWrapper; } interface LoDashExplicitWrapper { /** * @see _.unionBy */ unionBy( this: LoDashExplicitWrapper | null | undefined>, iteratee?: ValueIteratee ): LoDashExplicitWrapper; /** * @see _.unionBy */ unionBy( this: LoDashExplicitWrapper | null | undefined>, arrays2: List | null | undefined, iteratee?: ValueIteratee ): LoDashExplicitWrapper; /** * @see _.unionBy */ unionBy( this: LoDashExplicitWrapper | null | undefined>, arrays2: List | null | undefined, arrays3: List | null | undefined, iteratee?: ValueIteratee ): LoDashExplicitWrapper; /** * @see _.unionBy */ unionBy( this: LoDashExplicitWrapper | null | undefined>, arrays2: List | null | undefined, arrays3: List | null | undefined, arrays4: List | null | undefined, iteratee?: ValueIteratee ): LoDashExplicitWrapper; /** * @see _.unionBy */ unionBy( this: LoDashExplicitWrapper | null | undefined>, arrays2: List | null | undefined, arrays3: List | null | undefined, arrays4: List | null | undefined, arrays5: List | null | undefined, ...iteratee: Array | List | null | undefined> ): LoDashExplicitWrapper; } // unionWith 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( arrays: List | null | undefined, comparator?: Comparator ): T[]; /** * @see _.unionBy */ unionWith( arrays: List | null | undefined, arrays2: List | null | undefined, comparator?: Comparator ): T[]; /** * @see _.unionWith */ unionWith( arrays: List | null | undefined, arrays2: List | null | undefined, arrays3: List | null | undefined, ...comparator: Array | List | null | undefined> ): T[]; } interface LoDashImplicitWrapper { /** * @see _.unionWith */ unionWith( this: LoDashImplicitWrapper | null | undefined>, comparator?: Comparator ): LoDashImplicitWrapper; /** * @see _.unionWith */ unionWith( this: LoDashImplicitWrapper | null | undefined>, arrays2: List | null | undefined, comparator?: Comparator ): LoDashImplicitWrapper; /** * @see _.unionWith */ unionWith( this: LoDashImplicitWrapper | null | undefined>, arrays2: List | null | undefined, arrays3: List | null | undefined, ...comparator: Array | List | null | undefined> ): LoDashImplicitWrapper; } interface LoDashExplicitWrapper { /** * @see _.unionWith */ unionWith( this: LoDashExplicitWrapper | null | undefined>, comparator?: Comparator ): LoDashExplicitWrapper; /** * @see _.unionWith */ unionWith( this: LoDashExplicitWrapper | null | undefined>, arrays2: List | null | undefined, comparator?: Comparator ): LoDashExplicitWrapper; /** * @see _.unionWith */ unionWith( this: LoDashExplicitWrapper | null | undefined>, arrays2: List | null | undefined, arrays3: List | null | undefined, ...comparator: Array | List | null | undefined> ): LoDashExplicitWrapper; } // uniq 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( array: List | null | undefined ): T[]; } interface LoDashImplicitWrapper { /** * @see _.uniq */ uniq(this: LoDashImplicitWrapper | null | undefined>): LoDashImplicitWrapper; } interface LoDashExplicitWrapper { /** * @see _.uniq */ uniq(this: LoDashExplicitWrapper | null | undefined>): LoDashExplicitWrapper; } // uniqBy 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: List | null | undefined, iteratee: ValueIteratee ): T[]; } interface LoDashImplicitWrapper { /** * @see _.uniqBy */ uniqBy( this: LoDashImplicitWrapper | null | undefined>, iteratee: ValueIteratee ): LoDashImplicitWrapper; } interface LoDashExplicitWrapper { /** * @see _.uniqBy */ uniqBy( this: LoDashExplicitWrapper | null | undefined>, iteratee: ValueIteratee ): LoDashExplicitWrapper; } // uniqWith 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( array: List | null | undefined, comparator?: Comparator ): T[]; } interface LoDashImplicitWrapper { /** * @see _.uniqWith */ uniqWith( this: LoDashImplicitWrapper | null | undefined>, comparator?: Comparator ): LoDashImplicitWrapper; } interface LoDashExplicitWrapper { /** * @see _.uniqWith */ uniqWith( this: LoDashExplicitWrapper | null | undefined>, comparator?: Comparator ): LoDashExplicitWrapper; } // unzip 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(array: T[][] | List> | null | undefined): T[][]; } interface LoDashImplicitWrapper { /** * @see _.unzip */ unzip(this: LoDashImplicitWrapper> | null | undefined>): LoDashImplicitWrapper; } interface LoDashExplicitWrapper { /** * @see _.unzip */ unzip(this: LoDashExplicitWrapper> | null | undefined>): LoDashExplicitWrapper; } // unzipWith interface LoDashStatic { /** * This method is like _.unzip except that it accepts an iteratee to specify how regrouped values should be * combined. The iteratee is 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. * @return Returns the new array of regrouped elements. */ unzipWith( array: List> | null | undefined, iteratee: (...values: T[]) => TResult ): TResult[]; /** * @see _.unzipWith */ unzipWith( array: List> | null | undefined ): T[][]; } interface LoDashImplicitWrapper { /** * @see _.unzipWith */ unzipWith( this: LoDashImplicitWrapper> | null | undefined>, iteratee: (...values: T[]) => TResult ): LoDashImplicitWrapper; /** * @see _.unzipWith */ unzipWith( this: LoDashImplicitWrapper> | null | undefined> ): LoDashImplicitWrapper; } interface LoDashExplicitWrapper { /** * @see _.unzipWith */ unzipWith( this: LoDashExplicitWrapper> | null | undefined>, iteratee: (...values: T[]) => TResult ): LoDashExplicitWrapper; /** * @see _.unzipWith */ unzipWith( this: LoDashExplicitWrapper> | null | undefined> ): LoDashExplicitWrapper; } // without 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( array: List | null | undefined, ...values: T[] ): T[]; } interface LoDashImplicitWrapper { /** * @see _.without */ without( this: LoDashImplicitWrapper | null | undefined>, ...values: T[] ): LoDashImplicitWrapper; } interface LoDashExplicitWrapper { /** * @see _.without */ without( this: LoDashExplicitWrapper | null | undefined>, ...values: T[] ): LoDashExplicitWrapper; } // xor 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(...arrays: Array | null | undefined>): T[]; } interface LoDashImplicitWrapper { /** * @see _.xor */ xor( this: LoDashImplicitWrapper | null | undefined>, ...arrays: Array | null | undefined> ): LoDashImplicitWrapper; } interface LoDashExplicitWrapper { /** * @see _.xor */ xor( this: LoDashExplicitWrapper | null | undefined>, ...arrays: Array | null | undefined> ): LoDashExplicitWrapper; } // xorBy 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( arrays: List | null | undefined, iteratee?: ValueIteratee ): T[]; /** * @see _.xorBy */ xorBy( arrays: List | null | undefined, arrays2: List | null | undefined, iteratee?: ValueIteratee ): T[]; /** * @see _.xorBy */ xorBy( arrays: List | null | undefined, arrays2: List | null | undefined, arrays3: List | null | undefined, ...iteratee: Array | List | null | undefined> ): T[]; } interface LoDashImplicitWrapper { /** * @see _.xor */ xorBy( this: LoDashImplicitWrapper | null | undefined>, iteratee?: ValueIteratee ): LoDashImplicitWrapper; /** * @see _.xorBy */ xorBy( this: LoDashImplicitWrapper | null | undefined>, arrays2: List | null | undefined, iteratee?: ValueIteratee ): LoDashImplicitWrapper; /** * @see _.xorBy */ xorBy( this: LoDashImplicitWrapper | null | undefined>, arrays2: List | null | undefined, arrays3: List | null | undefined, ...iteratee: Array | List | null | undefined> ): LoDashImplicitWrapper; } interface LoDashExplicitWrapper { /** * @see _.xorBy */ xorBy( this: LoDashExplicitWrapper | null | undefined>, iteratee?: ValueIteratee ): LoDashExplicitWrapper; /** * @see _.xorBy */ xorBy( this: LoDashExplicitWrapper | null | undefined>, arrays2: List | null | undefined, iteratee?: ValueIteratee ): LoDashExplicitWrapper; /** * @see _.xorBy */ xorBy( this: LoDashExplicitWrapper | null | undefined>, arrays2: List | null | undefined, arrays3: List | null | undefined, ...iteratee: Array | List | null | undefined> ): LoDashExplicitWrapper; } // xorWith 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( arrays: List | null | undefined, comparator?: Comparator ): T[]; /** * @see _.xorWith */ xorWith( arrays: List | null | undefined, arrays2: List | null | undefined, comparator?: Comparator ): T[]; /** * @see _.xorWith */ xorWith( arrays: List | null | undefined, arrays2: List | null | undefined, arrays3: List | null | undefined, ...comparator: Array | List | null | undefined> ): T[]; } interface LoDashImplicitWrapper { /** * @see _.xorWith */ xorWith( this: LoDashImplicitWrapper | null | undefined>, comparator?: Comparator ): LoDashImplicitWrapper; /** * @see _.xorWith */ xorWith( this: LoDashImplicitWrapper | null | undefined>, arrays2: List | null | undefined, comparator?: Comparator ): LoDashImplicitWrapper; /** * @see _.xorWith */ xorWith( this: LoDashImplicitWrapper | null | undefined>, arrays2: List | null | undefined, arrays3: List | null | undefined, ...comparator: Array | List | null | undefined> ): LoDashImplicitWrapper; } interface LoDashExplicitWrapper { /** * @see _.xorWith */ xorWith( this: LoDashExplicitWrapper | null | undefined>, comparator?: Comparator ): LoDashExplicitWrapper; /** * @see _.xorWith */ xorWith( this: LoDashExplicitWrapper | null | undefined>, arrays2: List | null | undefined, comparator?: Comparator ): LoDashExplicitWrapper; /** * @see _.xorWith */ xorWith( this: LoDashExplicitWrapper | null | undefined>, arrays2: List | null | undefined, arrays3: List | null | undefined, ...comparator: Array | List | null | undefined> ): LoDashExplicitWrapper; } // zip 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(arrays1: List, arrays2: List): Array<[T1 | undefined, T2 | undefined]>; /** * @see _.zip */ zip(arrays1: List, arrays2: List, arrays3: List): Array<[T1 | undefined, T2 | undefined, T3 | undefined]>; /** * @see _.zip */ zip(arrays1: List, arrays2: List, arrays3: List, arrays4: List): Array<[T1 | undefined, T2 | undefined, T3 | undefined, T4 | undefined]>; /** * @see _.zip */ zip(arrays1: List, arrays2: List, arrays3: List, arrays4: List, arrays5: List): Array<[T1 | undefined, T2 | undefined, T3 | undefined, T4 | undefined, T5 | undefined]>; /** * @see _.zip */ zip(...arrays: Array | null | undefined>): Array>; } interface LoDashImplicitWrapper { /** * @see _.zip */ zip( this: LoDashImplicitWrapper>, arrays2: List, ): LoDashImplicitWrapper>; /** * @see _.zip */ zip( this: LoDashImplicitWrapper>, arrays2: List, arrays3: List, ): LoDashImplicitWrapper>; /** * @see _.zip */ zip( this: LoDashImplicitWrapper>, arrays2: List, arrays3: List, arrays4: List, ): LoDashImplicitWrapper>; /** * @see _.zip */ zip( this: LoDashImplicitWrapper>, arrays2: List, arrays3: List, arrays4: List, arrays5: List, ): LoDashImplicitWrapper>; /** * @see _.zip */ zip( this: LoDashImplicitWrapper | null | undefined>, ...arrays: Array | null | undefined> ): LoDashImplicitWrapper>>; } interface LoDashExplicitWrapper { /** * @see _.zip */ zip( this: LoDashExplicitWrapper>, arrays2: List, ): LoDashExplicitWrapper>; /** * @see _.zip */ zip( this: LoDashExplicitWrapper>, arrays2: List, arrays3: List, ): LoDashExplicitWrapper>; /** * @see _.zip */ zip( this: LoDashExplicitWrapper>, arrays2: List, arrays3: List, arrays4: List, ): LoDashExplicitWrapper>; /** * @see _.zip */ zip( this: LoDashExplicitWrapper>, arrays2: List, arrays3: List, arrays4: List, arrays5: List, ): LoDashExplicitWrapper>; /** * @see _.zip */ zip( this: LoDashExplicitWrapper | null | undefined>, ...arrays: Array | null | undefined> ): LoDashExplicitWrapper>>; } // zipObject 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( props: List, values: List ): Dictionary; /** * @see _.zipObject */ zipObject( props?: List ): Dictionary; } interface LoDashImplicitWrapper { /** * @see _.zipObject */ zipObject( this: LoDashImplicitWrapper>, values: List ): LoDashImplicitWrapper>; /** * @see _.zipObject */ zipObject( this: LoDashImplicitWrapper> ): LoDashImplicitWrapper>; } interface LoDashExplicitWrapper { /** * @see _.zipObject */ zipObject( this: LoDashExplicitWrapper>, values: List ): LoDashExplicitWrapper>; /** * @see _.zipObject */ zipObject( this: LoDashExplicitWrapper> ): LoDashExplicitWrapper>; } // zipObjectDeep 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, values?: List ): object; } interface LoDashImplicitWrapper { /** * @see _.zipObjectDeep */ zipObjectDeep( this: LoDashImplicitWrapper>, values?: List ): LoDashImplicitWrapper; } interface LoDashExplicitWrapper { /** * @see _.zipObjectDeep */ zipObjectDeep( this: LoDashExplicitWrapper>, values?: List ): LoDashExplicitWrapper; } // zipWith interface LoDashStatic { /** * This method is like _.zip except that it accepts an iteratee to specify how grouped values should be * combined. The iteratee is invoked with four arguments: (accumulator, value, index, * group). * @param arrays The arrays to process. * @param iteratee The function to combine grouped values. * @return Returns the new array of grouped elements. */ zipWith( arrays: List, iteratee: (value1: T) => TResult ): TResult[]; /** * @see _.zipWith */ zipWith( arrays1: List, arrays2: List, iteratee: (value1: T1, value2: T2) => TResult ): TResult[]; /** * @see _.zipWith */ zipWith( arrays1: List, arrays2: List, arrays3: List, iteratee: (value1: T1, value2: T2, value3: T3) => TResult ): TResult[]; /** * @see _.zipWith */ zipWith( arrays1: List, arrays2: List, arrays3: List, arrays4: List, iteratee: (value1: T1, value2: T2, value3: T3, value4: T4) => TResult ): TResult[]; /** * @see _.zipWith */ zipWith( arrays1: List, arrays2: List, arrays3: List, arrays4: List, arrays5: List, iteratee: (value1: T1, value2: T2, value3: T3, value4: T4, value5: T5) => TResult ): TResult[]; /** * @see _.zipWith */ zipWith( ...iteratee: Array<((...group: T[]) => TResult) | List | null | undefined> ): TResult[]; } interface LoDashImplicitWrapper { /** * @see _.zipWith */ zipWith( this: LoDashImplicitWrapper>, iteratee: (value1: T) => TResult ): LoDashImplicitWrapper; /** * @see _.zipWith */ zipWith( this: LoDashImplicitWrapper>, arrays2: List, iteratee: (value1: T1, value2: T2) => TResult ): LoDashImplicitWrapper; /** * @see _.zipWith */ zipWith( this: LoDashImplicitWrapper>, arrays2: List, arrays3: List, iteratee: (value1: T1, value2: T2, value3: T3) => TResult ): LoDashImplicitWrapper; /** * @see _.zipWith */ zipWith( this: LoDashImplicitWrapper>, arrays2: List, arrays3: List, arrays4: List, iteratee: (value1: T1, value2: T2, value3: T3, value4: T4) => TResult ): LoDashImplicitWrapper; /** * @see _.zipWith */ zipWith( this: LoDashImplicitWrapper>, arrays2: List, arrays3: List, arrays4: List, arrays5: List, iteratee: (value1: T1, value2: T2, value3: T3, value4: T4, value5: T5) => TResult ): LoDashImplicitWrapper; /** * @see _.zipWith */ zipWith( this: LoDashImplicitWrapper | null | undefined>, ...iteratee: Array<((...group: T[]) => TResult) | List | null | undefined> ): LoDashImplicitWrapper; } interface LoDashExplicitWrapper { /** * @see _.zipWith */ zipWith( this: LoDashExplicitWrapper>, iteratee: (value1: T) => TResult ): LoDashExplicitWrapper; /** * @see _.zipWith */ zipWith( this: LoDashExplicitWrapper>, arrays2: List, iteratee: (value1: T1, value2: T2) => TResult ): LoDashExplicitWrapper; /** * @see _.zipWith */ zipWith( this: LoDashExplicitWrapper>, arrays2: List, arrays3: List, iteratee: (value1: T1, value2: T2, value3: T3) => TResult ): LoDashExplicitWrapper; /** * @see _.zipWith */ zipWith( this: LoDashExplicitWrapper>, arrays2: List, arrays3: List, arrays4: List, iteratee: (value1: T1, value2: T2, value3: T3, value4: T4) => TResult ): LoDashExplicitWrapper; /** * @see _.zipWith */ zipWith( this: LoDashExplicitWrapper>, arrays2: List, arrays3: List, arrays4: List, arrays5: List, iteratee: (value1: T1, value2: T2, value3: T3, value4: T4, value5: T5) => TResult ): LoDashExplicitWrapper; /** * @see _.zipWith */ zipWith( this: LoDashExplicitWrapper | null | undefined>, ...iteratee: Array<((...group: T[]) => TResult) | List | null | undefined> ): LoDashExplicitWrapper; } }