UNPKG

74.1 kBTypeScriptView Raw
1import _ = require("../index");
2declare module "../index" {
3 interface LoDashStatic {
4 /**
5 * Creates an array of elements split into groups the length of size. If collection can’t be split evenly, the
6 * final chunk will be the remaining elements.
7 *
8 * @param array The array to process.
9 * @param size The length of each chunk.
10 * @return Returns the new array containing chunks.
11 */
12 chunk<T>(array: List<T> | null | undefined, size?: number): T[][];
13 }
14 interface Collection<T> {
15 /**
16 * @see _.chunk
17 */
18 chunk(size?: number): Collection<T[]>;
19 }
20 interface CollectionChain<T> {
21 /**
22 * @see _.chunk
23 */
24 chunk(size?: number): CollectionChain<T[]>;
25 }
26 interface LoDashStatic {
27 /**
28 * Creates an array with all falsey values removed. The values false, null, 0, "", undefined, and NaN are
29 * falsey.
30 *
31 * @param array The array to compact.
32 * @return Returns the new array of filtered values.
33 */
34 compact<T>(array: List<T | null | undefined | false | "" | 0> | null | undefined): T[];
35 }
36
37 type Truthy<T> = T extends null | undefined | false | "" | 0 ? never : T;
38 interface Collection<T> {
39 /**
40 * @see _.compact
41 */
42 compact(): Collection<Truthy<T>>;
43 }
44 interface CollectionChain<T> {
45 /**
46 * @see _.compact
47 */
48 compact(): CollectionChain<Truthy<T>>;
49 }
50 interface LoDashStatic {
51 /**
52 * Creates a new array concatenating `array` with any additional arrays
53 * and/or values.
54 *
55 * @category Array
56 * @param array The array to concatenate.
57 * @param [values] The values to concatenate.
58 * @returns Returns the new concatenated array.
59 * @example
60 *
61 * var array = [1];
62 * var other = _.concat(array, 2, [3], [[4]]);
63 *
64 * console.log(other);
65 * // => [1, 2, 3, [4]]
66 *
67 * console.log(array);
68 * // => [1]
69 */
70 concat<T>(array: Many<T>, ...values: Array<Many<T>>): T[];
71 }
72 interface Primitive<T> {
73 /**
74 * @see _.concat
75 */
76 concat(...values: Array<Many<T>>): Collection<T>;
77 }
78 interface Collection<T> {
79 /**
80 * @see _.concat
81 */
82 concat(...values: Array<Many<T>>): Collection<T>;
83 }
84 interface Object<T> {
85 /**
86 * @see _.concat
87 */
88 concat(...values: Array<Many<T>>): Collection<T>;
89 }
90 interface PrimitiveChain<T> {
91 /**
92 * @see _.concat
93 */
94 concat(...values: Array<Many<T>>): CollectionChain<T>;
95 }
96 interface CollectionChain<T> {
97 /**
98 * @see _.concat
99 */
100 concat(...values: Array<Many<T>>): CollectionChain<T>;
101 }
102 interface ObjectChain<T> {
103 /**
104 * @see _.concat
105 */
106 concat(...values: Array<Many<T>>): CollectionChain<T>;
107 }
108 interface LoDashStatic {
109 /**
110 * Creates an array of unique array values not included in the other provided arrays using SameValueZero for
111 * equality comparisons.
112 *
113 * @param array The array to inspect.
114 * @param values The arrays of values to exclude.
115 * @return Returns the new array of filtered values.
116 */
117 difference<T>(array: List<T> | null | undefined, ...values: Array<List<T>>): T[];
118 }
119 interface Collection<T> {
120 /**
121 * @see _.difference
122 */
123 difference(...values: Array<List<T>>): Collection<T>;
124 }
125 interface CollectionChain<T> {
126 /**
127 * @see _.difference
128 */
129 difference(...values: Array<List<T>>): CollectionChain<T>;
130 }
131 interface LoDashStatic {
132 /**
133 * This method is like _.difference except that it accepts iteratee which is invoked for each element of array
134 * and values to generate the criterion by which uniqueness is computed. The iteratee is invoked with one
135 * argument: (value).
136 *
137 * @param array The array to inspect.
138 * @param values The values to exclude.
139 * @param iteratee The iteratee invoked per element.
140 * @returns Returns the new array of filtered values.
141 */
142 differenceBy<T1, T2>(array: List<T1> | null | undefined, values: List<T2>, iteratee: ValueIteratee<T1 | T2>): T1[];
143 /**
144 * @see _.differenceBy
145 */
146 differenceBy<T1, T2, T3>(array: List<T1> | null | undefined, values1: List<T2>, values2: List<T3>, iteratee: ValueIteratee<T1 | T2 | T3>): T1[];
147 /**
148 * @see _.differenceBy
149 */
150 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[];
151 /**
152 * @see _.differenceBy
153 */
154 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[];
155 /**
156 * @see _.differenceBy
157 */
158 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[];
159 /**
160 * @see _.differenceBy
161 */
162 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[];
163 /**
164 * @see _.differenceBy
165 */
166 differenceBy<T>(array: List<T> | null | undefined, ...values: Array<List<T>>): T[];
167 }
168 interface Collection<T> {
169 /**
170 * @see _.differenceBy
171 */
172 differenceBy<T2>(values1: List<T2>, iteratee?: ValueIteratee<T | T2>): Collection<T>;
173 /**
174 * @see _.differenceBy
175 */
176 differenceBy(...values: Array<List<unknown> | ValueIteratee<T>>): Collection<T>;
177 }
178 interface CollectionChain<T> {
179 /**
180 * @see _.differenceBy
181 */
182 differenceBy<T2>(values1: List<T2>, iteratee?: ValueIteratee<T | T2>): CollectionChain<T>;
183 /**
184 * @see _.differenceBy
185 */
186 differenceBy(...values: Array<List<unknown> | ValueIteratee<T>>): CollectionChain<T>;
187 }
188 interface LoDashStatic {
189 /**
190 * Creates an array of unique `array` values not included in the other
191 * provided arrays using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
192 * for equality comparisons.
193 *
194 * @category Array
195 * @param [values] The arrays to inspect.
196 * @param [comparator] The comparator invoked per element.
197 * @returns Returns the new array of filtered values.
198 * @example
199 *
200 * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
201
202 * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual);
203 * // => [{ 'x': 2, 'y': 1 }]
204 */
205 differenceWith<T1, T2>(array: List<T1> | null | undefined, values: List<T2>, comparator: Comparator2<T1, T2>): T1[];
206 /**
207 * @see _.differenceWith
208 */
209 differenceWith<T1, T2, T3>(array: List<T1> | null | undefined, values1: List<T2>, values2: List<T3>, comparator: Comparator2<T1, T2 | T3>): T1[];
210 /**
211 * @see _.differenceWith
212 */
213 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[];
214 /**
215 * @see _.differenceWith
216 */
217 differenceWith<T>(array: List<T> | null | undefined, ...values: Array<List<T>>): T[];
218 }
219 interface Collection<T> {
220 /**
221 * @see _.differenceWith
222 */
223 differenceWith<T2>(values: List<T2>, comparator: Comparator2<T, T2>): Collection<T>;
224 /**
225 * @see _.differenceWith
226 */
227 differenceWith<T2, T3, T4>(...values: Array<List<unknown> | Comparator2<T, never>>): Collection<T>;
228 }
229 interface CollectionChain<T> {
230 /**
231 * @see _.differenceWith
232 */
233 differenceWith< T2>(values: List<T2>, comparator: Comparator2<T, T2>): CollectionChain<T>;
234 /**
235 * @see _.differenceWith
236 */
237 differenceWith< T2, T3, T4>(...values: Array<List<unknown> | Comparator2<T, never>>): CollectionChain<T>;
238 }
239 interface LoDashStatic {
240 /**
241 * Creates a slice of array with n elements dropped from the beginning.
242 *
243 * @param array The array to query.
244 * @param n The number of elements to drop.
245 * @return Returns the slice of array.
246 */
247 drop<T>(array: List<T> | null | undefined, n?: number): T[];
248 }
249 interface Collection<T> {
250 /**
251 * @see _.drop
252 */
253 drop(n?: number): Collection<T>;
254 }
255 interface CollectionChain<T> {
256 /**
257 * @see _.drop
258 */
259 drop(n?: number): CollectionChain<T>;
260 }
261 interface LoDashStatic {
262 /**
263 * Creates a slice of array with n elements dropped from the end.
264 *
265 * @param array The array to query.
266 * @param n The number of elements to drop.
267 * @return Returns the slice of array.
268 */
269 dropRight<T>(array: List<T> | null | undefined, n?: number): T[];
270 }
271 interface Collection<T> {
272 /**
273 * @see _.dropRight
274 */
275 dropRight(n?: number): Collection<T>;
276 }
277 interface CollectionChain<T> {
278 /**
279 * @see _.dropRight
280 */
281 dropRight(n?: number): CollectionChain<T>;
282 }
283 interface LoDashStatic {
284 /**
285 * Creates a slice of array excluding elements dropped from the end. Elements are dropped until predicate
286 * returns falsey. The predicate is invoked with three arguments: (value, index, array).
287 *
288 * @param array The array to query.
289 * @param predicate The function invoked per iteration.
290 * @return Returns the slice of array.
291 */
292 dropRightWhile<T>(array: List<T> | null | undefined, predicate?: ListIteratee<T>): T[];
293 }
294 interface Collection<T> {
295 /**
296 * @see _.dropRightWhile
297 */
298 dropRightWhile(predicate?: ListIteratee<T>): Collection<T>;
299 }
300 interface CollectionChain<T> {
301 /**
302 * @see _.dropRightWhile
303 */
304 dropRightWhile(predicate?: ListIteratee<T>): CollectionChain<T>;
305 }
306 interface LoDashStatic {
307 /**
308 * Creates a slice of array excluding elements dropped from the beginning. Elements are dropped until predicate
309 * returns falsey. The predicate is invoked with three arguments: (value, index, array).
310 *
311 * @param array The array to query.
312 * @param predicate The function invoked per iteration.
313 * @return Returns the slice of array.
314 */
315 dropWhile<T>(array: List<T> | null | undefined, predicate?: ListIteratee<T>): T[];
316 }
317 interface Collection<T> {
318 /**
319 * @see _.dropWhile
320 */
321 dropWhile(predicate?: ListIteratee<T>): Collection<T>;
322 }
323 interface CollectionChain<T> {
324 /**
325 * @see _.dropWhile
326 */
327 dropWhile(predicate?: ListIteratee<T>): CollectionChain<T>;
328 }
329 interface LoDashStatic {
330 /**
331 * Fills elements of array with value from start up to, but not including, end.
332 *
333 * Note: This method mutates array.
334 *
335 * @param array The array to fill.
336 * @param value The value to fill array with.
337 * @param start The start position.
338 * @param end The end position.
339 * @return Returns array.
340 */
341 fill<T>(array: any[] | null | undefined, value: T): T[];
342 /**
343 * @see _.fill
344 */
345 fill<T>(array: List<any> | null | undefined, value: T): List<T>;
346 /**
347 * @see _.fill
348 */
349 fill<T, U>(array: U[] | null | undefined, value: T, start?: number, end?: number): Array<T | U>;
350 /**
351 * @see _.fill
352 */
353 fill<T, U>(array: List<U> | null | undefined, value: T, start?: number, end?: number): List<T | U>;
354 }
355 interface Collection<T> {
356 /**
357 * @see _.fill
358 */
359 fill<U>(value: U, start?: number, end?: number): Collection<T | U>;
360 }
361 interface CollectionChain<T> {
362 /**
363 * @see _.fill
364 */
365 fill<U>(value: U, start?: number, end?: number): CollectionChain<T | U>;
366 }
367 interface LoDashStatic {
368 /**
369 * This method is like _.find except that it returns the index of the first element predicate returns truthy
370 * for instead of the element itself.
371 *
372 * @param array The array to search.
373 * @param predicate The function invoked per iteration.
374 * @param fromIndex The index to search from.
375 * @return Returns the index of the found element, else -1.
376 */
377 findIndex<T>(array: List<T> | null | undefined, predicate?: ListIterateeCustom<T, boolean>, fromIndex?: number): number;
378 }
379 interface Collection<T> {
380 /**
381 * @see _.findIndex
382 */
383 findIndex(predicate?: ListIterateeCustom<T, boolean>, fromIndex?: number): number;
384 }
385 interface CollectionChain<T> {
386 /**
387 * @see _.findIndex
388 */
389 findIndex(predicate?: ListIterateeCustom<T, boolean>, fromIndex?: number): PrimitiveChain<number>;
390 }
391 interface LoDashStatic {
392 /**
393 * This method is like _.findIndex except that it iterates over elements of collection from right to left.
394 *
395 * @param array The array to search.
396 * @param predicate The function invoked per iteration.
397 * @param fromIndex The index to search from.
398 * @return Returns the index of the found element, else -1.
399 */
400 findLastIndex<T>(array: List<T> | null | undefined, predicate?: ListIterateeCustom<T, boolean>, fromIndex?: number): number;
401 }
402 interface Collection<T> {
403 /**
404 * @see _.findLastIndex
405 */
406 findLastIndex(predicate?: ListIterateeCustom<T, boolean>, fromIndex?: number): number;
407 }
408 interface CollectionChain<T> {
409 /**
410 * @see _.findLastIndex
411 */
412 findLastIndex(predicate?: ListIterateeCustom<T, boolean>, fromIndex?: number): PrimitiveChain<number>;
413 }
414 interface LoDashStatic {
415 /**
416 * @see _.head
417 */
418 first: LoDashStatic["head"];
419 }
420 interface String {
421 /**
422 * @see _.first
423 */
424 first(): string | undefined;
425 }
426 interface StringChain {
427 /**
428 * @see _.first
429 */
430 first(): StringNullableChain;
431 }
432 interface StringNullableChain {
433 /**
434 * @see _.first
435 */
436 first(): StringNullableChain;
437 }
438 interface Collection<T> {
439 /**
440 * @see _.first
441 */
442 first(): T | undefined;
443 }
444 interface CollectionChain<T> {
445 /**
446 * @see _.first
447 */
448 first(): ExpChain<T | undefined>;
449 }
450 interface RecursiveArray<T> extends Array<T|RecursiveArray<T>> {}
451 interface ListOfRecursiveArraysOrValues<T> extends List<T|RecursiveArray<T>> {}
452 interface LoDashStatic {
453 /**
454 * Flattens `array` a single level deep.
455 *
456 * @param array The array to flatten.
457 * @return Returns the new flattened array.
458 */
459 flatten<T>(array: List<Many<T>> | null | undefined): T[];
460 }
461 interface String {
462 /**
463 * @see _.flatten
464 */
465 flatten(): Collection<string>;
466 }
467 interface StringChain {
468 /**
469 * @see _.flatten
470 */
471 flatten(): CollectionChain<string>;
472 }
473 interface StringNullableChain {
474 /**
475 * @see _.flatten
476 */
477 flatten(): CollectionChain<string>;
478 }
479 interface Collection<T> {
480 /**
481 * @see _.flatten
482 */
483 flatten(): T extends Many<infer U> ? Collection<U> : Collection<T>;
484 }
485 interface CollectionChain<T> {
486 /**
487 * @see _.flatten
488 */
489 flatten(): T extends Many<infer U> ? CollectionChain<U> : CollectionChain<T>;
490 }
491
492 type Flat<T> = T extends string ? T : (T extends List<any> ? never : T);
493
494 interface LoDashStatic {
495 /**
496 * Recursively flattens a nested array.
497 *
498 * @param array The array to recursively flatten.
499 * @return Returns the new flattened array.
500 */
501 flattenDeep<T>(array: ListOfRecursiveArraysOrValues<T> | null | undefined): Array<Flat<T>>;
502 }
503 interface Collection<T> {
504 /**
505 * @see _.flattenDeep
506 */
507 flattenDeep(): T extends ListOfRecursiveArraysOrValues<infer U> ? Collection<Flat<U>> : Collection<T>;
508 }
509 interface CollectionChain<T> {
510 /**
511 * @see _.flattenDeep
512 */
513 flattenDeep(): T extends ListOfRecursiveArraysOrValues<infer U> ? CollectionChain<Flat<U>> : CollectionChain<T>;
514 }
515 interface LoDashStatic {
516 /**
517 * Recursively flatten array up to depth times.
518 *
519 * @param array The array to recursively flatten.
520 * @param number The maximum recursion depth.
521 * @return Returns the new flattened array.
522 */
523 flattenDepth<T>(array: ListOfRecursiveArraysOrValues<T> | null | undefined, depth?: number): T[];
524 }
525 interface Collection<T> {
526 /**
527 * @see _.flattenDepth
528 */
529 flattenDepth(depth?: number): Collection<T>;
530 }
531 interface CollectionChain<T> {
532 /**
533 * @see _.flattenDepth
534 */
535 flattenDepth(depth?: number): CollectionChain<T>;
536 }
537 interface LoDashStatic {
538 /**
539 * The inverse of `_.toPairs`; this method returns an object composed
540 * from key-value `pairs`.
541 *
542 * @category Array
543 * @param pairs The key-value pairs.
544 * @returns Returns the new object.
545 * @example
546 *
547 * _.fromPairs([['fred', 30], ['barney', 40]]);
548 * // => { 'fred': 30, 'barney': 40 }
549 */
550 fromPairs<T>(pairs: List<[PropertyName, T]> | null | undefined): Dictionary<T>;
551 /**
552 * @see _.fromPairs
553 */
554 fromPairs(pairs: List<any[]> | null | undefined): Dictionary<any>;
555 }
556 interface Collection<T> {
557 /**
558 * @see _.fromPairs
559 */
560 fromPairs(): Object<Dictionary<T extends [PropertyName, infer U] ? U : any>>;
561 }
562 interface CollectionChain<T> {
563 /**
564 * @see _.fromPairs
565 */
566 fromPairs(): ObjectChain<Dictionary<T extends [PropertyName, infer U] ? U : any>>;
567 }
568 interface LoDashStatic {
569 /**
570 * Gets the first element of array.
571 *
572 * @alias _.first
573 *
574 * @param array The array to query.
575 * @return Returns the first element of array.
576 */
577 head<T>(array: List<T> | null | undefined): T | undefined;
578 }
579 interface String {
580 /**
581 * @see _.head
582 */
583 head(): string | undefined;
584 }
585 interface StringChain {
586 /**
587 * @see _.head
588 */
589 head(): StringNullableChain;
590 }
591 interface StringNullableChain {
592 /**
593 * @see _.head
594 */
595 head(): StringNullableChain;
596 }
597 interface Collection<T> {
598 /**
599 * @see _.head
600 */
601 head(): T | undefined;
602 }
603 interface CollectionChain<T> {
604 /**
605 * @see _.head
606 */
607 head(): ExpChain<T | undefined>;
608 }
609 interface LoDashStatic {
610 /**
611 * Gets the index at which the first occurrence of `value` is found in `array`
612 * using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
613 * for equality comparisons. If `fromIndex` is negative, it's used as the offset
614 * from the end of `array`.
615 *
616 * @category Array
617 * @param array The array to search.
618 * @param value The value to search for.
619 * @param [fromIndex=0] The index to search from.
620 * @returns Returns the index of the matched value, else `-1`.
621 * @example
622 *
623 * _.indexOf([1, 2, 1, 2], 2);
624 * // => 1
625 *
626 * // using `fromIndex`
627 * _.indexOf([1, 2, 1, 2], 2, 2);
628 * // => 3
629 */
630 indexOf<T>(array: List<T> | null | undefined, value: T, fromIndex?: number): number;
631 }
632 interface Collection<T> {
633 /**
634 * @see _.indexOf
635 */
636 indexOf(value: T, fromIndex?: number): number;
637 }
638 interface CollectionChain<T> {
639 /**
640 * @see _.indexOf
641 */
642 indexOf(value: T, fromIndex?: number): PrimitiveChain<number>;
643 }
644 interface LoDashStatic {
645 /**
646 * Gets all but the last element of array.
647 *
648 * @param array The array to query.
649 * @return Returns the slice of array.
650 */
651 initial<T>(array: List<T> | null | undefined): T[];
652 }
653 interface Collection<T> {
654 /**
655 * @see _.initial
656 */
657 initial(): Collection<T>;
658 }
659 interface CollectionChain<T> {
660 /**
661 * @see _.initial
662 */
663 initial(): CollectionChain<T>;
664 }
665 interface LoDashStatic {
666 /**
667 * Creates an array of unique values that are included in all of the provided arrays using SameValueZero for
668 * equality comparisons.
669 *
670 * @param arrays The arrays to inspect.
671 * @return Returns the new array of shared values.
672 */
673 intersection<T>(...arrays: Array<List<T> | null | undefined>): T[];
674 }
675 interface Collection<T> {
676 /**
677 * @see _.intersection
678 */
679 intersection(...arrays: Array<List<T> | null | undefined>): Collection<T>;
680 }
681 interface CollectionChain<T> {
682 /**
683 * @see _.intersection
684 */
685 intersection(...arrays: Array<List<T> | null | undefined>): CollectionChain<T>;
686 }
687 interface LoDashStatic {
688 /**
689 * This method is like `_.intersection` except that it accepts `iteratee`
690 * which is invoked for each element of each `arrays` to generate the criterion
691 * by which uniqueness is computed. The iteratee is invoked with one argument: (value).
692 *
693 * @category Array
694 * @param [arrays] The arrays to inspect.
695 * @param [iteratee=_.identity] The iteratee invoked per element.
696 * @returns Returns the new array of shared values.
697 * @example
698 *
699 * _.intersectionBy([2.1, 1.2], [4.3, 2.4], Math.floor);
700 * // => [2.1]
701 *
702 * // using the `_.property` iteratee shorthand
703 * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
704 * // => [{ 'x': 1 }]
705 */
706 intersectionBy<T1, T2>(array: List<T1> | null, values: List<T2>, iteratee: ValueIteratee<T1 | T2>): T1[];
707 /**
708 * @see _.intersectionBy
709 */
710 intersectionBy<T1, T2, T3>(array: List<T1> | null, values1: List<T2>, values2: List<T3>, iteratee: ValueIteratee<T1 | T2 | T3>): T1[];
711 /**
712 * @see _.intersectionBy
713 */
714 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[];
715 /**
716 * @see _.intersectionBy
717 */
718 intersectionBy<T>(array?: List<T> | null, ...values: Array<List<T>>): T[];
719 /**
720 * @see _.intersectionBy
721 */
722 intersectionBy<T>(...values: Array<List<T> | ValueIteratee<T>>): T[];
723 }
724 interface Collection<T> {
725 /**
726 * @see _.intersectionBy
727 */
728 intersectionBy<T2>(values: List<T2>, iteratee: ValueIteratee<T | T2>): Collection<T>;
729 /**
730 * @see _.intersectionBy
731 */
732 intersectionBy(...values: Array<List<unknown> | ValueIteratee<T>>): Collection<T>;
733 }
734 interface CollectionChain<T> {
735 /**
736 * @see _.intersectionBy
737 */
738 intersectionBy<T2>(values: List<T2>, iteratee: ValueIteratee<T | T2>): CollectionChain<T>;
739 /**
740 * @see _.intersectionBy
741 */
742 intersectionBy(...values: Array<List<unknown> | ValueIteratee<T>>): CollectionChain<T>;
743 }
744 interface LoDashStatic {
745 /**
746 * Creates an array of unique `array` values not included in the other
747 * provided arrays using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
748 * for equality comparisons.
749 *
750 * @category Array
751 * @param [values] The arrays to inspect.
752 * @param [comparator] The comparator invoked per element.
753 * @returns Returns the new array of filtered values.
754 * @example
755 *
756 * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
757 * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
758
759 * _.intersectionWith(objects, others, _.isEqual);
760 * // => [{ 'x': 1, 'y': 2 }]
761 */
762 intersectionWith<T1, T2>(array: List<T1> | null | undefined, values: List<T2>, comparator: Comparator2<T1, T2>): T1[];
763 /**
764 * @see _.intersectionWith
765 */
766 intersectionWith<T1, T2, T3>(array: List<T1> | null | undefined, values1: List<T2>, values2: List<T3>, comparator: Comparator2<T1, T2 | T3>): T1[];
767 /**
768 * @see _.intersectionWith
769 */
770 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[];
771 /**
772 * @see _.intersectionWith
773 */
774 intersectionWith<T>(array?: List<T> | null, ...values: Array<List<T> | Comparator2<T, never>>): T[];
775 }
776 interface Collection<T> {
777 /**
778 * @see _.intersectionWith
779 */
780 intersectionWith<T2>(values: List<T2>, comparator: Comparator2<T, T2>): Collection<T>;
781 /**
782 * @see _.intersectionWith
783 */
784 intersectionWith(...values: Array<List<unknown> | Comparator2<T, never>>): Collection<T>;
785 }
786 interface CollectionChain<T> {
787 /**
788 * @see _.intersectionWith
789 */
790 intersectionWith<T2>(values: List<T2>, comparator: Comparator2<T, T2>): CollectionChain<T>;
791 /**
792 * @see _.intersectionWith
793 */
794 intersectionWith(...values: Array<List<unknown> | Comparator2<T, never>>): CollectionChain<T>;
795 }
796 interface LoDashStatic {
797 /**
798 * Converts all elements in `array` into a string separated by `separator`.
799 *
800 * @param array The array to convert.
801 * @param separator The element separator.
802 * @returns Returns the joined string.
803 */
804 join(array: List<any> | null | undefined, separator?: string): string;
805 }
806 interface String {
807 /**
808 * @see _.join
809 */
810 join(separator?: string): string;
811 }
812 interface StringChain {
813 /**
814 * @see _.join
815 */
816 join(separator?: string): StringChain;
817 }
818 interface StringNullableChain {
819 /**
820 * @see _.join
821 */
822 join(separator?: string): StringChain;
823 }
824 interface Collection<T> {
825 /**
826 * @see _.join
827 */
828 join(separator?: string): string;
829 }
830 interface CollectionChain<T> {
831 /**
832 * @see _.join
833 */
834 join(separator?: string): StringChain;
835 }
836 interface LoDashStatic {
837 /**
838 * Gets the last element of array.
839 *
840 * @param array The array to query.
841 * @return Returns the last element of array.
842 */
843 last<T>(array: List<T> | null | undefined): T | undefined;
844 }
845 interface Collection<T> {
846 /**
847 * @see _.last
848 */
849 last(): T | undefined;
850 }
851 interface CollectionChain<T> {
852 /**
853 * @see _.last
854 */
855 last(): ExpChain<T | undefined>;
856 }
857 interface String {
858 /**
859 * @see _.last
860 */
861 last(): string | undefined;
862 }
863 interface StringChain {
864 /**
865 * @see _.last
866 */
867 last(): StringNullableChain;
868 }
869 interface StringNullableChain {
870 /**
871 * @see _.last
872 */
873 last(): StringNullableChain;
874 }
875 interface LoDashStatic {
876 /**
877 * This method is like _.indexOf except that it iterates over elements of array from right to left.
878 *
879 * @param array The array to search.
880 * @param value The value to search for.
881 * @param fromIndex The index to search from or true to perform a binary search on a sorted array.
882 * @return Returns the index of the matched value, else -1.
883 */
884 lastIndexOf<T>(array: List<T> | null | undefined, value: T, fromIndex?: true|number): number;
885 }
886 interface Collection<T> {
887 /**
888 * @see _.lastIndexOf
889 */
890 lastIndexOf(value: T, fromIndex?: true|number): number;
891 }
892 interface CollectionChain<T> {
893 /**
894 * @see _.lastIndexOf
895 */
896 lastIndexOf(value: T, fromIndex?: true|number): PrimitiveChain<number>;
897 }
898 interface LoDashStatic {
899 /**
900 * Gets the element at index `n` of `array`. If `n` is negative, the nth element from the end is returned.
901 *
902 * @param array array The array to query.
903 * @param value The index of the element to return.
904 * @return Returns the nth element of `array`.
905 */
906 nth<T>(array: List<T> | null | undefined, n?: number): T | undefined;
907 }
908 interface Collection<T> {
909 /**
910 * @see _.nth
911 */
912 nth(n?: number): T | undefined;
913 }
914 interface CollectionChain<T> {
915 /**
916 * @see _.nth
917 */
918 nth(n?: number): ExpChain<T | undefined>;
919 }
920 interface LoDashStatic {
921 /**
922 * Removes all provided values from array using SameValueZero for equality comparisons.
923 *
924 * Note: Unlike _.without, this method mutates array.
925 *
926 * @param array The array to modify.
927 * @param values The values to remove.
928 * @return Returns array.
929 */
930 pull<T>(array: T[], ...values: T[]): T[];
931 /**
932 * @see _.pull
933 */
934 pull<T>(array: List<T>, ...values: T[]): List<T>;
935 }
936 interface Collection<T> {
937 /**
938 * @see _.pull
939 */
940 pull(...values: T[]): Collection<T>;
941 }
942 interface CollectionChain<T> {
943 /**
944 * @see _.pull
945 */
946 pull(...values: T[]): CollectionChain<T>;
947 }
948 interface LoDashStatic {
949 /**
950 * This method is like `_.pull` except that it accepts an array of values to remove.
951 *
952 * **Note:** Unlike `_.difference`, this method mutates `array`.
953 *
954 * @category Array
955 * @param array The array to modify.
956 * @param values The values to remove.
957 * @returns Returns `array`.
958 * @example
959 *
960 * var array = [1, 2, 3, 1, 2, 3];
961 *
962 * _.pull(array, [2, 3]);
963 * console.log(array);
964 * // => [1, 1]
965 */
966 pullAll<T>(array: T[], values?: List<T>): T[];
967 /**
968 * @see _.pullAll
969 */
970 pullAll<T>(array: List<T>, values?: List<T>): List<T>;
971 }
972 interface Collection<T> {
973 /**
974 * @see _.pullAll
975 */
976 pullAll(values?: List<T>): Collection<T>;
977 }
978 interface CollectionChain<T> {
979 /**
980 * @see _.pullAll
981 */
982 pullAll(values?: List<T>): CollectionChain<T>;
983 }
984 interface LoDashStatic {
985 /**
986 * This method is like `_.pullAll` except that it accepts `iteratee` which is
987 * invoked for each element of `array` and `values` to to generate the criterion
988 * by which uniqueness is computed. The iteratee is invoked with one argument: (value).
989 *
990 * **Note:** Unlike `_.differenceBy`, this method mutates `array`.
991 *
992 * @category Array
993 * @param array The array to modify.
994 * @param values The values to remove.
995 * @param [iteratee=_.identity] The iteratee invoked per element.
996 * @returns Returns `array`.
997 * @example
998 *
999 * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }];
1000 *
1001 * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x');
1002 * console.log(array);
1003 * // => [{ 'x': 2 }]
1004 */
1005 pullAllBy<T>(array: T[], values?: List<T>, iteratee?: ValueIteratee<T>): T[];
1006 /**
1007 * @see _.pullAllBy
1008 */
1009 pullAllBy<T>(array: List<T>, values?: List<T>, iteratee?: ValueIteratee<T>): List<T>;
1010 /**
1011 * @see _.pullAllBy
1012 */
1013 pullAllBy<T1, T2>(array: T1[], values: List<T2>, iteratee: ValueIteratee<T1 | T2>): T1[];
1014 /**
1015 * @see _.pullAllBy
1016 */
1017 pullAllBy<T1, T2>(array: List<T1>, values: List<T2>, iteratee: ValueIteratee<T1 | T2>): List<T1>;
1018 }
1019 interface Collection<T> {
1020 /**
1021 * @see _.pullAllBy
1022 */
1023 pullAllBy<T2>(values?: List<T2>, iteratee?: ValueIteratee<T | T2>): Collection<T>;
1024 }
1025 interface CollectionChain<T> {
1026 /**
1027 * @see _.pullAllBy
1028 */
1029 pullAllBy<T2>(values?: List<T2>, iteratee?: ValueIteratee<T | T2>): CollectionChain<T>;
1030 }
1031 interface LoDashStatic {
1032 /**
1033 * This method is like `_.pullAll` except that it accepts `comparator` which is
1034 * invoked to compare elements of array to values. The comparator is invoked with
1035 * two arguments: (arrVal, othVal).
1036 *
1037 * **Note:** Unlike `_.differenceWith`, this method mutates `array`.
1038 *
1039 * @category Array
1040 * @param array The array to modify.
1041 * @param values The values to remove.
1042 * @param [iteratee=_.identity] The iteratee invoked per element.
1043 * @returns Returns `array`.
1044 * @example
1045 *
1046 * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }];
1047 *
1048 * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual);
1049 * console.log(array);
1050 * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }]
1051 */
1052 pullAllWith<T>(array: T[], values?: List<T>, comparator?: Comparator<T>): T[];
1053 /**
1054 * @see _.pullAllWith
1055 */
1056 pullAllWith<T>(array: List<T>, values?: List<T>, comparator?: Comparator<T>): List<T>;
1057 /**
1058 * @see _.pullAllWith
1059 */
1060 pullAllWith<T1, T2>(array: T1[], values: List<T2>, comparator: Comparator2<T1, T2>): T1[];
1061 /**
1062 * @see _.pullAllWith
1063 */
1064 pullAllWith<T1, T2>(array: List<T1>, values: List<T2>, comparator: Comparator2<T1, T2>): List<T1>;
1065 }
1066 interface Collection<T> {
1067 /**
1068 * @see _.pullAllWith
1069 */
1070 pullAllWith<T2>(values?: List<T2>, comparator?: Comparator2<T, T2>): Collection<T>;
1071 }
1072 interface CollectionChain<T> {
1073 /**
1074 * @see _.pullAllWith
1075 */
1076 pullAllWith<T2>(values?: List<T2>, comparator?: Comparator2<T, T2>): CollectionChain<T>;
1077 }
1078 interface LoDashStatic {
1079 /**
1080 * Removes elements from array corresponding to the given indexes and returns an array of the removed elements.
1081 * Indexes may be specified as an array of indexes or as individual arguments.
1082 *
1083 * Note: Unlike _.at, this method mutates array.
1084 *
1085 * @param array The array to modify.
1086 * @param indexes The indexes of elements to remove, specified as individual indexes or arrays of indexes.
1087 * @return Returns the new array of removed elements.
1088 */
1089 pullAt<T>(array: T[], ...indexes: Array<Many<number>>): T[];
1090 /**
1091 * @see _.pullAt
1092 */
1093 pullAt<T>(array: List<T>, ...indexes: Array<Many<number>>): List<T>;
1094 }
1095 interface Collection<T> {
1096 /**
1097 * @see _.pullAt
1098 */
1099 pullAt(...indexes: Array<Many<number>>): Collection<T>;
1100 }
1101 interface CollectionChain<T> {
1102 /**
1103 * @see _.pullAt
1104 */
1105 pullAt(...indexes: Array<Many<number>>): CollectionChain<T>;
1106 }
1107 interface LoDashStatic {
1108 /**
1109 * Removes all elements from array that predicate returns truthy for and returns an array of the removed
1110 * elements. The predicate is invoked with three arguments: (value, index, array).
1111 *
1112 * Note: Unlike _.filter, this method mutates array.
1113 *
1114 * @param array The array to modify.
1115 * @param predicate The function invoked per iteration.
1116 * @return Returns the new array of removed elements.
1117 */
1118 remove<T>(array: List<T>, predicate?: ListIteratee<T>): T[];
1119 }
1120 interface Collection<T> {
1121 /**
1122 * @see _.remove
1123 */
1124 remove(predicate?: ListIteratee<T>): Collection<T>;
1125 }
1126 interface CollectionChain<T> {
1127 /**
1128 * @see _.remove
1129 */
1130 remove(predicate?: ListIteratee<T>): CollectionChain<T>;
1131 }
1132 interface LoDashStatic {
1133 /**
1134 * Reverses `array` so that the first element becomes the last, the second
1135 * element becomes the second to last, and so on.
1136 *
1137 * **Note:** This method mutates `array` and is based on
1138 * [`Array#reverse`](https://mdn.io/Array/reverse).
1139 *
1140 * @category Array
1141 * @returns Returns `array`.
1142 * @example
1143 *
1144 * var array = [1, 2, 3];
1145 *
1146 * _.reverse(array);
1147 * // => [3, 2, 1]
1148 *
1149 * console.log(array);
1150 * // => [3, 2, 1]
1151 */
1152 reverse<TList extends List<any>>(array: TList): TList;
1153 }
1154 interface LoDashStatic {
1155 /**
1156 * Creates a slice of array from start up to, but not including, end.
1157 *
1158 * @param array The array to slice.
1159 * @param start The start position.
1160 * @param end The end position.
1161 * @return Returns the slice of array.
1162 */
1163 slice<T>(array: List<T> | null | undefined, start?: number, end?: number): T[];
1164 }
1165 interface Collection<T> {
1166 /**
1167 * @see _.slice
1168 */
1169 slice(start?: number, end?: number): Collection<T>;
1170 }
1171 interface CollectionChain<T> {
1172 /**
1173 * @see _.slice
1174 */
1175 slice(start?: number, end?: number): CollectionChain<T>;
1176 }
1177 interface LoDashStatic {
1178 /**
1179 * Uses a binary search to determine the lowest index at which `value` should
1180 * be inserted into `array` in order to maintain its sort order.
1181 *
1182 * @category Array
1183 * @param array The sorted array to inspect.
1184 * @param value The value to evaluate.
1185 * @returns Returns the index at which `value` should be inserted into `array`.
1186 * @example
1187 *
1188 * _.sortedIndex([30, 50], 40);
1189 * // => 1
1190 *
1191 * _.sortedIndex([4, 5], 4);
1192 * // => 0
1193 */
1194 sortedIndex<T>(array: List<T> | null | undefined, value: T): number;
1195 }
1196 interface Collection<T> {
1197 /**
1198 * @see _.sortedIndex
1199 */
1200 sortedIndex(value: T): number;
1201 }
1202 interface CollectionChain<T> {
1203 /**
1204 * @see _.sortedIndex
1205 */
1206 sortedIndex(value: T): PrimitiveChain<number>;
1207 }
1208 interface LoDashStatic {
1209 /**
1210 * Uses a binary search to determine the lowest index at which `value` should
1211 * be inserted into `array` in order to maintain its sort order.
1212 *
1213 * @category Array
1214 * @param array The sorted array to inspect.
1215 * @param value The value to evaluate.
1216 * @returns Returns the index at which `value` should be inserted into `array`.
1217 * @example
1218 *
1219 * _.sortedIndex([30, 50], 40);
1220 * // => 1
1221 *
1222 * _.sortedIndex([4, 5], 4);
1223 * // => 0
1224 */
1225 sortedIndex<T>(array: List<T> | null | undefined, value: T): number;
1226 }
1227 interface Collection<T> {
1228 /**
1229 * @see _.sortedIndex
1230 */
1231 sortedIndex(value: T): number;
1232 }
1233 interface CollectionChain<T> {
1234 /**
1235 * @see _.sortedIndex
1236 */
1237 sortedIndex(value: T): PrimitiveChain<number>;
1238 }
1239 interface LoDashStatic {
1240 /**
1241 * This method is like `_.sortedIndex` except that it accepts `iteratee`
1242 * which is invoked for `value` and each element of `array` to compute their
1243 * sort ranking. The iteratee is invoked with one argument: (value).
1244 *
1245 * @category Array
1246 * @param array The sorted array to inspect.
1247 * @param value The value to evaluate.
1248 * @param [iteratee=_.identity] The iteratee invoked per element.
1249 * @returns Returns the index at which `value` should be inserted into `array`.
1250 * @example
1251 *
1252 * var dict = { 'thirty': 30, 'forty': 40, 'fifty': 50 };
1253 *
1254 * _.sortedIndexBy(['thirty', 'fifty'], 'forty', _.propertyOf(dict));
1255 * // => 1
1256 *
1257 * // using the `_.property` iteratee shorthand
1258 * _.sortedIndexBy([{ 'x': 4 }, { 'x': 5 }], { 'x': 4 }, 'x');
1259 * // => 0
1260 */
1261 sortedIndexBy<T>(array: List<T> | null | undefined, value: T, iteratee?: ValueIteratee<T>): number;
1262 }
1263 interface Collection<T> {
1264 /**
1265 * @see _.sortedIndexBy
1266 */
1267 sortedIndexBy(value: T, iteratee?: ValueIteratee<T>): number;
1268 }
1269 interface CollectionChain<T> {
1270 /**
1271 * @see _.sortedIndexBy
1272 */
1273 sortedIndexBy(value: T, iteratee?: ValueIteratee<T>): PrimitiveChain<number>;
1274 }
1275 interface LoDashStatic {
1276 /**
1277 * This method is like `_.indexOf` except that it performs a binary
1278 * search on a sorted `array`.
1279 *
1280 * @category Array
1281 * @param array The array to search.
1282 * @param value The value to search for.
1283 * @returns Returns the index of the matched value, else `-1`.
1284 * @example
1285 *
1286 * _.sortedIndexOf([1, 1, 2, 2], 2);
1287 * // => 2
1288 */
1289 sortedIndexOf<T>(array: List<T> | null | undefined, value: T): number;
1290 }
1291 interface Collection<T> {
1292 /**
1293 * @see _.sortedIndexOf
1294 */
1295 sortedIndexOf(value: T): number;
1296 }
1297 interface CollectionChain<T> {
1298 /**
1299 * @see _.sortedIndexOf
1300 */
1301 sortedIndexOf(value: T): PrimitiveChain<number>;
1302 }
1303 interface LoDashStatic {
1304 /**
1305 * This method is like `_.sortedIndex` except that it returns the highest
1306 * index at which `value` should be inserted into `array` in order to
1307 * maintain its sort order.
1308 *
1309 * @category Array
1310 * @param array The sorted array to inspect.
1311 * @param value The value to evaluate.
1312 * @returns Returns the index at which `value` should be inserted into `array`.
1313 * @example
1314 *
1315 * _.sortedLastIndex([4, 5], 4);
1316 * // => 1
1317 */
1318 sortedLastIndex<T>(array: List<T> | null | undefined, value: T): number;
1319 }
1320 interface Collection<T> {
1321 /**
1322 * @see _.sortedLastIndex
1323 */
1324 sortedLastIndex(value: T): number;
1325 }
1326 interface CollectionChain<T> {
1327 /**
1328 * @see _.sortedLastIndex
1329 */
1330 sortedLastIndex(value: T): PrimitiveChain<number>;
1331 }
1332 interface LoDashStatic {
1333 /**
1334 * This method is like `_.sortedLastIndex` except that it accepts `iteratee`
1335 * which is invoked for `value` and each element of `array` to compute their
1336 * sort ranking. The iteratee is invoked with one argument: (value).
1337 *
1338 * @category Array
1339 * @param array The sorted array to inspect.
1340 * @param value The value to evaluate.
1341 * @param [iteratee=_.identity] The iteratee invoked per element.
1342 * @returns Returns the index at which `value` should be inserted into `array`.
1343 * @example
1344 *
1345 * // using the `_.property` iteratee shorthand
1346 * _.sortedLastIndexBy([{ 'x': 4 }, { 'x': 5 }], { 'x': 4 }, 'x');
1347 * // => 1
1348 */
1349 sortedLastIndexBy<T>(array: List<T> | null | undefined, value: T, iteratee: ValueIteratee<T>): number;
1350 }
1351 interface Collection<T> {
1352 /**
1353 * @see _.sortedLastIndexBy
1354 */
1355 sortedLastIndexBy(value: T, iteratee: ValueIteratee<T>): number;
1356 }
1357 interface CollectionChain<T> {
1358 /**
1359 * @see _.sortedLastIndexBy
1360 */
1361 sortedLastIndexBy(value: T, iteratee: ValueIteratee<T>): PrimitiveChain<number>;
1362 }
1363 interface LoDashStatic {
1364 /**
1365 * This method is like `_.lastIndexOf` except that it performs a binary
1366 * search on a sorted `array`.
1367 *
1368 * @category Array
1369 * @param array The array to search.
1370 * @param value The value to search for.
1371 * @returns Returns the index of the matched value, else `-1`.
1372 * @example
1373 *
1374 * _.sortedLastIndexOf([1, 1, 2, 2], 2);
1375 * // => 3
1376 */
1377 sortedLastIndexOf<T>(array: List<T> | null | undefined, value: T): number;
1378 }
1379 interface Collection<T> {
1380 /**
1381 * @see _.sortedLastIndexOf
1382 */
1383 sortedLastIndexOf(value: T): number;
1384 }
1385 interface CollectionChain<T> {
1386 /**
1387 * @see _.sortedLastIndexOf
1388 */
1389 sortedLastIndexOf(value: T): PrimitiveChain<number>;
1390 }
1391 interface LoDashStatic {
1392 /**
1393 * This method is like `_.uniq` except that it's designed and optimized
1394 * for sorted arrays.
1395 *
1396 * @category Array
1397 * @param array The array to inspect.
1398 * @returns Returns the new duplicate free array.
1399 * @example
1400 *
1401 * _.sortedUniq([1, 1, 2]);
1402 * // => [1, 2]
1403 */
1404 sortedUniq<T>(array: List<T> | null | undefined): T[];
1405 }
1406 interface Collection<T> {
1407 /**
1408 * @see _.sortedUniq
1409 */
1410 sortedUniq(): Collection<T>;
1411 }
1412 interface CollectionChain<T> {
1413 /**
1414 * @see _.sortedUniq
1415 */
1416 sortedUniq(): CollectionChain<T>;
1417 }
1418 interface LoDashStatic {
1419 /**
1420 * This method is like `_.uniqBy` except that it's designed and optimized
1421 * for sorted arrays.
1422 *
1423 * @category Array
1424 * @param array The array to inspect.
1425 * @param [iteratee] The iteratee invoked per element.
1426 * @returns Returns the new duplicate free array.
1427 * @example
1428 *
1429 * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor);
1430 * // => [1.1, 2.3]
1431 */
1432 sortedUniqBy<T>(array: List<T> | null | undefined, iteratee: ValueIteratee<T>): T[];
1433 }
1434 interface Collection<T> {
1435 /**
1436 * @see _.sortedUniqBy
1437 */
1438 sortedUniqBy(iteratee: ValueIteratee<T>): Collection<T>;
1439 }
1440 interface CollectionChain<T> {
1441 /**
1442 * @see _.sortedUniqBy
1443 */
1444 sortedUniqBy(iteratee: ValueIteratee<T>): CollectionChain<T>;
1445 }
1446 interface LoDashStatic {
1447 /**
1448 * Gets all but the first element of array.
1449 *
1450 * @param array The array to query.
1451 * @return Returns the slice of array.
1452 */
1453 tail<T>(array: List<T> | null | undefined): T[];
1454 }
1455 interface Collection<T> {
1456 /**
1457 * @see _.tail
1458 */
1459 tail(): Collection<T>;
1460 }
1461 interface CollectionChain<T> {
1462 /**
1463 * @see _.tail
1464 */
1465 tail(): CollectionChain<T>;
1466 }
1467 interface LoDashStatic {
1468 /**
1469 * Creates a slice of array with n elements taken from the beginning.
1470 *
1471 * @param array The array to query.
1472 * @param n The number of elements to take.
1473 * @return Returns the slice of array.
1474 */
1475 take<T>(array: List<T> | null | undefined, n?: number): T[];
1476 }
1477 interface Collection<T> {
1478 /**
1479 * @see _.take
1480 */
1481 take(n?: number): Collection<T>;
1482 }
1483 interface CollectionChain<T> {
1484 /**
1485 * @see _.take
1486 */
1487 take(n?: number): CollectionChain<T>;
1488 }
1489 interface LoDashStatic {
1490 /**
1491 * Creates a slice of array with n elements taken from the end.
1492 *
1493 * @param array The array to query.
1494 * @param n The number of elements to take.
1495 * @return Returns the slice of array.
1496 */
1497 takeRight<T>(array: List<T> | null | undefined, n?: number): T[];
1498 }
1499 interface Collection<T> {
1500 /**
1501 * @see _.takeRight
1502 */
1503 takeRight(n?: number): Collection<T>;
1504 }
1505 interface CollectionChain<T> {
1506 /**
1507 * @see _.takeRight
1508 */
1509 takeRight(n?: number): CollectionChain<T>;
1510 }
1511 interface LoDashStatic {
1512 /**
1513 * Creates a slice of array with elements taken from the end. Elements are taken until predicate returns
1514 * falsey. The predicate is invoked with three arguments: (value, index, array).
1515 *
1516 * @param array The array to query.
1517 * @param predicate The function invoked per iteration.
1518 * @return Returns the slice of array.
1519 */
1520 takeRightWhile<T>(array: List<T> | null | undefined, predicate?: ListIteratee<T>): T[];
1521 }
1522 interface Collection<T> {
1523 /**
1524 * @see _.takeRightWhile
1525 */
1526 takeRightWhile(predicate?: ListIteratee<T>): Collection<T>;
1527 }
1528 interface CollectionChain<T> {
1529 /**
1530 * @see _.takeRightWhile
1531 */
1532 takeRightWhile(predicate?: ListIteratee<T>): CollectionChain<T>;
1533 }
1534 interface LoDashStatic {
1535 /**
1536 * Creates a slice of array with elements taken from the beginning. Elements are taken until predicate returns
1537 * falsey. The predicate is invoked with three arguments: (value, index, array).
1538 *
1539 * @param array The array to query.
1540 * @param predicate The function invoked per iteration.
1541 * @return Returns the slice of array.
1542 */
1543 takeWhile<T>(array: List<T> | null | undefined, predicate?: ListIteratee<T>): T[];
1544 }
1545 interface Collection<T> {
1546 /**
1547 * @see _.takeWhile
1548 */
1549 takeWhile(predicate?: ListIteratee<T>): Collection<T>;
1550 }
1551 interface CollectionChain<T> {
1552 /**
1553 * @see _.takeWhile
1554 */
1555 takeWhile(predicate?: ListIteratee<T>): CollectionChain<T>;
1556 }
1557 interface LoDashStatic {
1558 /**
1559 * Creates an array of unique values, in order, from all of the provided arrays using SameValueZero for
1560 * equality comparisons.
1561 *
1562 * @param arrays The arrays to inspect.
1563 * @return Returns the new array of combined values.
1564 */
1565 union<T>(...arrays: Array<List<T> | null | undefined>): T[];
1566 }
1567 interface Collection<T> {
1568 /**
1569 * @see _.union
1570 */
1571 union(...arrays: Array<List<T> | null | undefined>): Collection<T>;
1572 }
1573 interface CollectionChain<T> {
1574 /**
1575 * @see _.union
1576 */
1577 union(...arrays: Array<List<T> | null | undefined>): CollectionChain<T>;
1578 }
1579 interface LoDashStatic {
1580 /**
1581 * This method is like `_.union` except that it accepts `iteratee` which is
1582 * invoked for each element of each `arrays` to generate the criterion by which
1583 * uniqueness is computed. The iteratee is invoked with one argument: (value).
1584 *
1585 * @param arrays The arrays to inspect.
1586 * @param iteratee The iteratee invoked per element.
1587 * @return Returns the new array of combined values.
1588 */
1589 unionBy<T>(arrays: List<T> | null | undefined, iteratee?: ValueIteratee<T>): T[];
1590 /**
1591 * @see _.unionBy
1592 */
1593 unionBy<T>(arrays1: List<T> | null | undefined, arrays2: List<T> | null | undefined, iteratee?: ValueIteratee<T>): T[];
1594 /**
1595 * @see _.unionBy
1596 */
1597 unionBy<T>(arrays1: List<T> | null | undefined, arrays2: List<T> | null | undefined, arrays3: List<T> | null | undefined, iteratee?: ValueIteratee<T>): T[];
1598 /**
1599 * @see _.unionBy
1600 */
1601 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[];
1602 /**
1603 * @see _.unionBy
1604 */
1605 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[];
1606 }
1607 interface Collection<T> {
1608 /**
1609 * @see _.unionBy
1610 */
1611 unionBy(arrays2: List<T> | null | undefined, iteratee?: ValueIteratee<T>): Collection<T>;
1612 /**
1613 * @see _.unionBy
1614 */
1615 unionBy(...iteratee: Array<ValueIteratee<T> | List<T> | null | undefined>): Collection<T>;
1616 }
1617 interface CollectionChain<T> {
1618 /**
1619 * @see _.unionBy
1620 */
1621 unionBy(arrays2: List<T> | null | undefined, iteratee?: ValueIteratee<T>): CollectionChain<T>;
1622 /**
1623 * @see _.unionBy
1624 */
1625 unionBy(...iteratee: Array<ValueIteratee<T> | List<T> | null | undefined>): CollectionChain<T>;
1626 }
1627 interface LoDashStatic {
1628 /**
1629 * This method is like `_.union` except that it accepts `comparator` which
1630 * is invoked to compare elements of `arrays`. The comparator is invoked
1631 * with two arguments: (arrVal, othVal).
1632 *
1633 * @category Array
1634 * @param [arrays] The arrays to inspect.
1635 * @param [comparator] The comparator invoked per element.
1636 * @returns Returns the new array of combined values.
1637 * @example
1638 *
1639 * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
1640 * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
1641 *
1642 * _.unionWith(objects, others, _.isEqual);
1643 * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]
1644 */
1645 unionWith<T>(arrays: List<T> | null | undefined, comparator?: Comparator<T>): T[];
1646 /**
1647 * @see _.unionWith
1648 */
1649 unionWith<T>(arrays: List<T> | null | undefined, arrays2: List<T> | null | undefined, comparator?: Comparator<T>): T[];
1650 /**
1651 * @see _.unionWith
1652 */
1653 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[];
1654 }
1655 interface Collection<T> {
1656 /**
1657 * @see _.unionWith
1658 */
1659 unionWith(arrays2: List<T> | null | undefined, comparator?: Comparator<T>): Collection<T>;
1660 /**
1661 * @see _.unionWith
1662 */
1663 unionWith(...comparator: Array<Comparator<T> | List<T> | null | undefined>): Collection<T>;
1664 }
1665 interface CollectionChain<T> {
1666 /**
1667 * @see _.unionWith
1668 */
1669 unionWith(arrays2: List<T> | null | undefined, comparator?: Comparator<T>): CollectionChain<T>;
1670 /**
1671 * @see _.unionWith
1672 */
1673 unionWith(...comparator: Array<Comparator<T> | List<T> | null | undefined>): CollectionChain<T>;
1674 }
1675 interface LoDashStatic {
1676 /**
1677 * Creates a duplicate-free version of an array, using
1678 * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
1679 * for equality comparisons, in which only the first occurrence of each element
1680 * is kept.
1681 *
1682 * @category Array
1683 * @param array The array to inspect.
1684 * @returns Returns the new duplicate free array.
1685 * @example
1686 *
1687 * _.uniq([2, 1, 2]);
1688 * // => [2, 1]
1689 */
1690 uniq<T>(array: List<T> | null | undefined): T[];
1691 }
1692 interface Collection<T> {
1693 /**
1694 * @see _.uniq
1695 */
1696 uniq(): Collection<T>;
1697 }
1698 interface CollectionChain<T> {
1699 /**
1700 * @see _.uniq
1701 */
1702 uniq(): CollectionChain<T>;
1703 }
1704 interface LoDashStatic {
1705 /**
1706 * This method is like `_.uniq` except that it accepts `iteratee` which is
1707 * invoked for each element in `array` to generate the criterion by which
1708 * uniqueness is computed. The iteratee is invoked with one argument: (value).
1709 *
1710 * @category Array
1711 * @param array The array to inspect.
1712 * @param [iteratee=_.identity] The iteratee invoked per element.
1713 * @returns Returns the new duplicate free array.
1714 * @example
1715 *
1716 * _.uniqBy([2.1, 1.2, 2.3], Math.floor);
1717 * // => [2.1, 1.2]
1718 *
1719 * // using the `_.property` iteratee shorthand
1720 * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');
1721 * // => [{ 'x': 1 }, { 'x': 2 }]
1722 */
1723 uniqBy<T>(array: List<T> | null | undefined, iteratee: ValueIteratee<T>): T[];
1724 }
1725 interface Collection<T> {
1726 /**
1727 * @see _.uniqBy
1728 */
1729 uniqBy(iteratee: ValueIteratee<T>): Collection<T>;
1730 }
1731 interface CollectionChain<T> {
1732 /**
1733 * @see _.uniqBy
1734 */
1735 uniqBy(iteratee: ValueIteratee<T>): CollectionChain<T>;
1736 }
1737 interface LoDashStatic {
1738 /**
1739 * This method is like `_.uniq` except that it accepts `comparator` which
1740 * is invoked to compare elements of `array`. The comparator is invoked with
1741 * two arguments: (arrVal, othVal).
1742 *
1743 * @category Array
1744 * @param array The array to inspect.
1745 * @param [comparator] The comparator invoked per element.
1746 * @returns Returns the new duplicate free array.
1747 * @example
1748 *
1749 * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }];
1750 *
1751 * _.uniqWith(objects, _.isEqual);
1752 * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]
1753 */
1754 uniqWith<T>(array: List<T> | null | undefined, comparator?: Comparator<T>): T[];
1755 }
1756 interface Collection<T> {
1757 /**
1758 * @see _.uniqWith
1759 */
1760 uniqWith(comparator?: Comparator<T>): Collection<T>;
1761 }
1762 interface CollectionChain<T> {
1763 /**
1764 * @see _.uniqWith
1765 */
1766 uniqWith(comparator?: Comparator<T>): CollectionChain<T>;
1767 }
1768 interface LoDashStatic {
1769 /**
1770 * This method is like _.zip except that it accepts an array of grouped elements and creates an array
1771 * regrouping the elements to their pre-zip configuration.
1772 *
1773 * @param array The array of grouped elements to process.
1774 * @return Returns the new array of regrouped elements.
1775 */
1776 unzip<T>(array: T[][] | List<List<T>> | null | undefined): T[][];
1777 }
1778 interface Collection<T> {
1779 /**
1780 * @see _.unzip
1781 */
1782 unzip(): T extends List<infer U> ? Collection<U[]> : unknown;
1783 }
1784 interface CollectionChain<T> {
1785 /**
1786 * @see _.unzip
1787 */
1788 unzip(): T extends List<infer U> ? CollectionChain<U[]> : unknown;
1789 }
1790 interface LoDashStatic {
1791 /**
1792 * This method is like _.unzip except that it accepts an iteratee to specify how regrouped values should be
1793 * combined. The iteratee is invoked with four arguments: (accumulator, value, index, group).
1794 *
1795 * @param array The array of grouped elements to process.
1796 * @param iteratee The function to combine regrouped values.
1797 * @return Returns the new array of regrouped elements.
1798 */
1799 unzipWith<T, TResult>(array: List<List<T>> | null | undefined, iteratee: (...values: T[]) => TResult): TResult[];
1800 /**
1801 * @see _.unzipWith
1802 */
1803 unzipWith<T>(array: List<List<T>> | null | undefined): T[][];
1804 }
1805 interface Collection<T> {
1806 /**
1807 * @see _.unzipWith
1808 */
1809 unzipWith<TResult>(iteratee: (...values: Array<T extends List<infer U> ? U : unknown>) => TResult): Collection<TResult>;
1810 /**
1811 * @see _.unzipWith
1812 */
1813 unzipWith(): T extends List<infer U> ? Collection<U[]> : unknown;
1814 }
1815 interface CollectionChain<T> {
1816 /**
1817 * @see _.unzipWith
1818 */
1819 unzipWith<TResult>(iteratee: (...values: Array<T extends List<infer U> ? U : unknown>) => TResult): CollectionChain<TResult>;
1820 /**
1821 * @see _.unzipWith
1822 */
1823 unzipWith(): T extends List<infer U> ? CollectionChain<U[]> : unknown;
1824 }
1825 interface LoDashStatic {
1826 /**
1827 * Creates an array excluding all provided values using SameValueZero for equality comparisons.
1828 *
1829 * @param array The array to filter.
1830 * @param values The values to exclude.
1831 * @return Returns the new array of filtered values.
1832 */
1833 without<T>(array: List<T> | null | undefined, ...values: T[]): T[];
1834 }
1835 interface Collection<T> {
1836 /**
1837 * @see _.without
1838 */
1839 without(...values: T[]): Collection<T>;
1840 }
1841 interface CollectionChain<T> {
1842 /**
1843 * @see _.without
1844 */
1845 without(...values: T[]): CollectionChain<T>;
1846 }
1847 interface LoDashStatic {
1848 /**
1849 * Creates an array of unique values that is the symmetric difference of the provided arrays.
1850 *
1851 * @param arrays The arrays to inspect.
1852 * @return Returns the new array of values.
1853 */
1854 xor<T>(...arrays: Array<List<T> | null | undefined>): T[];
1855 }
1856 interface Collection<T> {
1857 /**
1858 * @see _.xor
1859 */
1860 xor(...arrays: Array<List<T> | null | undefined>): Collection<T>;
1861 }
1862 interface CollectionChain<T> {
1863 /**
1864 * @see _.xor
1865 */
1866 xor(...arrays: Array<List<T> | null | undefined>): CollectionChain<T>;
1867 }
1868 interface LoDashStatic {
1869 /**
1870 * This method is like `_.xor` except that it accepts `iteratee` which is
1871 * invoked for each element of each `arrays` to generate the criterion by which
1872 * uniqueness is computed. The iteratee is invoked with one argument: (value).
1873 *
1874 * @category Array
1875 * @param [arrays] The arrays to inspect.
1876 * @param [iteratee=_.identity] The iteratee invoked per element.
1877 * @returns Returns the new array of values.
1878 * @example
1879 *
1880 * _.xorBy([2.1, 1.2], [4.3, 2.4], Math.floor);
1881 * // => [1.2, 4.3]
1882 *
1883 * // using the `_.property` iteratee shorthand
1884 * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
1885 * // => [{ 'x': 2 }]
1886 */
1887 xorBy<T>(arrays: List<T> | null | undefined, iteratee?: ValueIteratee<T>): T[];
1888 /**
1889 * @see _.xorBy
1890 */
1891 xorBy<T>(arrays: List<T> | null | undefined, arrays2: List<T> | null | undefined, iteratee?: ValueIteratee<T>): T[];
1892 /**
1893 * @see _.xorBy
1894 */
1895 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[];
1896 }
1897 interface Collection<T> {
1898 /**
1899 * @see _.xorBy
1900 */
1901 xorBy(arrays2: List<T> | null | undefined, iteratee?: ValueIteratee<T>): Collection<T>;
1902 /**
1903 * @see _.xorBy
1904 */
1905 xorBy(...iteratee: Array<ValueIteratee<T> | List<T> | null | undefined>): Collection<T>;
1906 }
1907 interface CollectionChain<T> {
1908 /**
1909 * @see _.xorBy
1910 */
1911 xorBy(arrays2: List<T> | null | undefined, iteratee?: ValueIteratee<T>): CollectionChain<T>;
1912 /**
1913 * @see _.xorBy
1914 */
1915 xorBy(...iteratee: Array<ValueIteratee<T> | List<T> | null | undefined>): CollectionChain<T>;
1916 }
1917 interface LoDashStatic {
1918 /**
1919 * This method is like `_.xor` except that it accepts `comparator` which is
1920 * invoked to compare elements of `arrays`. The comparator is invoked with
1921 * two arguments: (arrVal, othVal).
1922 *
1923 * @category Array
1924 * @param [arrays] The arrays to inspect.
1925 * @param [comparator] The comparator invoked per element.
1926 * @returns Returns the new array of values.
1927 * @example
1928 *
1929 * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
1930 * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
1931 *
1932 * _.xorWith(objects, others, _.isEqual);
1933 * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]
1934 */
1935 xorWith<T>(arrays: List<T> | null | undefined, comparator?: Comparator<T>): T[];
1936 /**
1937 * @see _.xorWith
1938 */
1939 xorWith<T>(arrays: List<T> | null | undefined, arrays2: List<T> | null | undefined, comparator?: Comparator<T>): T[];
1940 /**
1941 * @see _.xorWith
1942 */
1943 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[];
1944 }
1945 interface Collection<T> {
1946 /**
1947 * @see _.xorWith
1948 */
1949 xorWith(arrays2: List<T> | null | undefined, comparator?: Comparator<T>): Collection<T>;
1950 /**
1951 * @see _.xorWith
1952 */
1953 xorWith(...comparator: Array<Comparator<T> | List<T> | null | undefined>): Collection<T>;
1954 }
1955 interface CollectionChain<T> {
1956 /**
1957 * @see _.xorWith
1958 */
1959 xorWith(arrays2: List<T> | null | undefined, comparator?: Comparator<T>): CollectionChain<T>;
1960 /**
1961 * @see _.xorWith
1962 */
1963 xorWith(...comparator: Array<Comparator<T> | List<T> | null | undefined>): CollectionChain<T>;
1964 }
1965 interface LoDashStatic {
1966 /**
1967 * Creates an array of grouped elements, the first of which contains the first elements of the given arrays,
1968 * the second of which contains the second elements of the given arrays, and so on.
1969 *
1970 * @param arrays The arrays to process.
1971 * @return Returns the new array of grouped elements.
1972 */
1973 zip<T1, T2>(arrays1: List<T1>, arrays2: List<T2>): Array<[T1 | undefined, T2 | undefined]>;
1974 /**
1975 * @see _.zip
1976 */
1977 zip<T1, T2, T3>(arrays1: List<T1>, arrays2: List<T2>, arrays3: List<T3>): Array<[T1 | undefined, T2 | undefined, T3 | undefined]>;
1978 /**
1979 * @see _.zip
1980 */
1981 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]>;
1982 /**
1983 * @see _.zip
1984 */
1985 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]>;
1986 /**
1987 * @see _.zip
1988 */
1989 zip<T>(...arrays: Array<List<T> | null | undefined>): Array<Array<T | undefined>>;
1990 }
1991 interface Collection<T> {
1992 /**
1993 * @see _.zip
1994 */
1995 zip<T2>(arrays2: List<T2>): Collection<[T | undefined, T2 | undefined]>;
1996 /**
1997 * @see _.zip
1998 */
1999 zip(...arrays: Array<List<T> | null | undefined>): Collection<Array<T | undefined>>;
2000 }
2001 interface CollectionChain<T> {
2002 /**
2003 * @see _.zip
2004 */
2005 zip<T2>(arrays2: List<T2>): CollectionChain<[T | undefined, T2 | undefined]>;
2006 /**
2007 * @see _.zip
2008 */
2009 zip(...arrays: Array<List<T> | null | undefined>): CollectionChain<Array<T | undefined>>;
2010 }
2011 interface LoDashStatic {
2012 /**
2013 * This method is like _.fromPairs except that it accepts two arrays, one of property
2014 * identifiers and one of corresponding values.
2015 *
2016 * @param props The property names.
2017 * @param values The property values.
2018 * @return Returns the new object.
2019 */
2020 zipObject<T>(props: List<PropertyName>, values: List<T>): Dictionary<T>;
2021 /**
2022 * @see _.zipObject
2023 */
2024 zipObject(props?: List<PropertyName>): Dictionary<undefined>;
2025 }
2026 interface Collection<T> {
2027 /**
2028 * @see _.zipObject
2029 */
2030 zipObject<U>(values: List<U>): Object<Dictionary<U>>;
2031 /**
2032 * @see _.zipObject
2033 */
2034 zipObject(): Object<Dictionary<undefined>>;
2035 }
2036 interface CollectionChain<T> {
2037 /**
2038 * @see _.zipObject
2039 */
2040 zipObject<U>(values: List<U>): ObjectChain<Dictionary<U>>;
2041 /**
2042 * @see _.zipObject
2043 */
2044 zipObject(): ObjectChain<Dictionary<undefined>>;
2045 }
2046 interface LoDashStatic {
2047 /**
2048 * This method is like _.zipObject except that it supports property paths.
2049 *
2050 * @param paths The property names.
2051 * @param values The property values.
2052 * @return Returns the new object.
2053 */
2054 zipObjectDeep(paths?: List<PropertyPath>, values?: List<any>): object;
2055 }
2056 interface Collection<T> {
2057 /**
2058 * @see _.zipObjectDeep
2059 */
2060 zipObjectDeep(values?: List<any>): Object<object>;
2061 }
2062 interface CollectionChain<T> {
2063 /**
2064 * @see _.zipObjectDeep
2065 */
2066 zipObjectDeep(values?: List<any>): ObjectChain<object>;
2067 }
2068 interface LoDashStatic {
2069 /**
2070 * This method is like _.zip except that it accepts an iteratee to specify how grouped values should be
2071 * combined. The iteratee is invoked with four arguments: (accumulator, value, index,
2072 * group).
2073 * @param arrays The arrays to process.
2074 * @param iteratee The function to combine grouped values.
2075 * @return Returns the new array of grouped elements.
2076 */
2077 zipWith<T, TResult>(arrays: List<T>, iteratee: (value1: T) => TResult): TResult[];
2078 /**
2079 * @see _.zipWith
2080 */
2081 zipWith<T1, T2, TResult>(arrays1: List<T1>, arrays2: List<T2>, iteratee: (value1: T1, value2: T2) => TResult): TResult[];
2082 /**
2083 * @see _.zipWith
2084 */
2085 zipWith<T1, T2, T3, TResult>(arrays1: List<T1>, arrays2: List<T2>, arrays3: List<T3>, iteratee: (value1: T1, value2: T2, value3: T3) => TResult): TResult[];
2086 /**
2087 * @see _.zipWith
2088 */
2089 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[];
2090 /**
2091 * @see _.zipWith
2092 */
2093 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[];
2094 /**
2095 * @see _.zipWith
2096 */
2097 zipWith<T, TResult>(...iteratee: Array<((...group: T[]) => TResult) | List<T> | null | undefined>): TResult[];
2098 }
2099 interface Collection<T> {
2100 /**
2101 * @see _.zipWith
2102 */
2103 zipWith<T2, TResult>(arrays2: List<T2>, iteratee: (value1: T, value2: T2) => TResult): Collection<TResult>;
2104 /**
2105 * @see _.zipWith
2106 */
2107 zipWith<T2, T3, TResult>(arrays2: List<T2>, arrays3: List<T3>, iteratee: (value1: T, value2: T2, value3: T3) => TResult): Collection<TResult>;
2108 /**
2109 * @see _.zipWith
2110 */
2111 zipWith<TResult>(...iteratee: Array<((...group: T[]) => TResult) | List<T> | null | undefined>): Collection<TResult>;
2112 }
2113 interface CollectionChain<T> {
2114 /**
2115 * @see _.zipWith
2116 */
2117 zipWith<T2, TResult>(arrays2: List<T2>, iteratee: (value1: T, value2: T2) => TResult): CollectionChain<TResult>;
2118 /**
2119 * @see _.zipWith
2120 */
2121 zipWith<T2, T3, TResult>(arrays2: List<T2>, arrays3: List<T3>, iteratee: (value1: T, value2: T2, value3: T3) => TResult): CollectionChain<TResult>;
2122 /**
2123 * @see _.zipWith
2124 */
2125 zipWith<TResult>(...iteratee: Array<((...group: T[]) => TResult) | List<T> | null | undefined>): CollectionChain<TResult>;
2126 }
2127}
2128
\No newline at end of file