1 | import _ = require("../index");
|
2 | declare module "../index" {
|
3 | interface LoDashStatic {
|
4 | |
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 | countBy<T>(collection: List<T> | null | undefined, iteratee?: ValueIteratee<T>): Dictionary<number>;
|
14 | |
15 |
|
16 |
|
17 | countBy<T extends object>(collection: T | null | undefined, iteratee?: ValueIteratee<T[keyof T]>): Dictionary<number>;
|
18 | }
|
19 | interface Object<T> {
|
20 | |
21 |
|
22 |
|
23 | countBy(iteratee?: ValueIteratee<T[keyof T]>): Object<Dictionary<number>>;
|
24 | }
|
25 | interface String {
|
26 | |
27 |
|
28 |
|
29 | countBy(iteratee?: ValueIteratee<string>): Object<Dictionary<number>>;
|
30 | }
|
31 | interface Collection<T> {
|
32 | |
33 |
|
34 |
|
35 | countBy(iteratee?: ValueIteratee<T>): Object<Dictionary<number>>;
|
36 | }
|
37 | interface ObjectChain<T> {
|
38 | |
39 |
|
40 |
|
41 | countBy(iteratee?: ValueIteratee<T[keyof T]>): ObjectChain<Dictionary<number>>;
|
42 | }
|
43 | interface StringChain {
|
44 | |
45 |
|
46 |
|
47 | countBy(iteratee?: ValueIteratee<string>): ObjectChain<Dictionary<number>>;
|
48 | }
|
49 | interface StringNullableChain {
|
50 | |
51 |
|
52 |
|
53 | countBy(iteratee?: ValueIteratee<string>): ObjectChain<Dictionary<number>>;
|
54 | }
|
55 | interface CollectionChain<T> {
|
56 | |
57 |
|
58 |
|
59 | countBy(iteratee?: ValueIteratee<T>): ObjectChain<Dictionary<number>>;
|
60 | }
|
61 | interface LoDashStatic {
|
62 | |
63 |
|
64 |
|
65 | each: LoDashStatic['forEach'];
|
66 | }
|
67 | interface String {
|
68 | |
69 |
|
70 |
|
71 | each: String['forEach'];
|
72 | }
|
73 | interface Collection<T> {
|
74 | |
75 |
|
76 |
|
77 | each: Collection<T>['forEach'];
|
78 | }
|
79 | interface Object<T> {
|
80 | |
81 |
|
82 |
|
83 | each: Object<T>['forEach'];
|
84 | }
|
85 | interface StringChain {
|
86 | |
87 |
|
88 |
|
89 | each: StringChain['forEach'];
|
90 | }
|
91 | interface StringNullableChain {
|
92 | |
93 |
|
94 |
|
95 | each: StringNullableChain['forEach'];
|
96 | }
|
97 | interface CollectionChain<T> {
|
98 | |
99 |
|
100 |
|
101 | each: CollectionChain<T>['forEach'];
|
102 | }
|
103 | interface ObjectChain<T> {
|
104 | |
105 |
|
106 |
|
107 | each: ObjectChain<T>['forEach'];
|
108 | }
|
109 | interface LoDashStatic {
|
110 | |
111 |
|
112 |
|
113 | eachRight: LoDashStatic["forEachRight"];
|
114 | }
|
115 | interface String {
|
116 | |
117 |
|
118 |
|
119 | eachRight: String['forEachRight'];
|
120 | }
|
121 | interface Collection<T> {
|
122 | |
123 |
|
124 |
|
125 | eachRight: Collection<T>['forEachRight'];
|
126 | }
|
127 | interface Object<T> {
|
128 | |
129 |
|
130 |
|
131 | eachRight: Object<T>['forEachRight'];
|
132 | }
|
133 | interface StringChain {
|
134 | |
135 |
|
136 |
|
137 | eachRight: StringChain['forEachRight'];
|
138 | }
|
139 | interface StringNullableChain {
|
140 | |
141 |
|
142 |
|
143 | eachRight: StringNullableChain['forEachRight'];
|
144 | }
|
145 | interface CollectionChain<T> {
|
146 | |
147 |
|
148 |
|
149 | eachRight: CollectionChain<T>['forEachRight'];
|
150 | }
|
151 | interface ObjectChain<T> {
|
152 | |
153 |
|
154 |
|
155 | eachRight: ObjectChain<T>['forEachRight'];
|
156 | }
|
157 | interface LoDashStatic {
|
158 | |
159 |
|
160 |
|
161 |
|
162 |
|
163 |
|
164 |
|
165 |
|
166 | every<T>(collection: List<T> | null | undefined, predicate?: ListIterateeCustom<T, boolean>): boolean;
|
167 | |
168 |
|
169 |
|
170 | every<T extends object>(collection: T | null | undefined, predicate?: ObjectIterateeCustom<T, boolean>): boolean;
|
171 | }
|
172 | interface Collection<T> {
|
173 | |
174 |
|
175 |
|
176 | every(predicate?: ListIterateeCustom<T, boolean>): boolean;
|
177 | }
|
178 | interface Object<T> {
|
179 | |
180 |
|
181 |
|
182 | every(predicate?: ObjectIterateeCustom<T, boolean>): boolean;
|
183 | }
|
184 | interface CollectionChain<T> {
|
185 | |
186 |
|
187 |
|
188 | every(predicate?: ListIterateeCustom<T, boolean>): PrimitiveChain<boolean>;
|
189 | }
|
190 | interface ObjectChain<T> {
|
191 | |
192 |
|
193 |
|
194 | every(predicate?: ObjectIterateeCustom<T, boolean>): PrimitiveChain<boolean>;
|
195 | }
|
196 | interface LoDashStatic {
|
197 | |
198 |
|
199 |
|
200 |
|
201 |
|
202 |
|
203 |
|
204 |
|
205 | filter(collection: string | null | undefined, predicate?: StringIterator<boolean>): string[];
|
206 | |
207 |
|
208 |
|
209 | filter<T, S extends T>(collection: List<T> | null | undefined, predicate: ListIteratorTypeGuard<T, S>): S[];
|
210 | |
211 |
|
212 |
|
213 | filter<T>(collection: List<T> | null | undefined, predicate?: ListIterateeCustom<T, boolean>): T[];
|
214 | |
215 |
|
216 |
|
217 | filter<T extends object, S extends T[keyof T]>(collection: T | null | undefined, predicate: ObjectIteratorTypeGuard<T, S>): S[];
|
218 | |
219 |
|
220 |
|
221 | filter<T extends object>(collection: T | null | undefined, predicate?: ObjectIterateeCustom<T, boolean>): Array<T[keyof T]>;
|
222 | }
|
223 | interface String {
|
224 | |
225 |
|
226 |
|
227 | filter(predicate?: StringIterator<boolean>): Collection<string>;
|
228 | }
|
229 | interface Collection<T> {
|
230 | |
231 |
|
232 |
|
233 | filter<S extends T>(predicate: ListIteratorTypeGuard<T, S>): Collection<S>;
|
234 | |
235 |
|
236 |
|
237 | filter(predicate?: ListIterateeCustom<T, boolean>): Collection<T>;
|
238 | }
|
239 | interface Object<T> {
|
240 | |
241 |
|
242 |
|
243 | filter<S extends T[keyof T]>(predicate: ObjectIteratorTypeGuard<T, S>): Collection<S>;
|
244 | |
245 |
|
246 |
|
247 | filter(predicate?: ObjectIterateeCustom<T, boolean>): Collection<T[keyof T]>;
|
248 | }
|
249 | interface StringChain {
|
250 | |
251 |
|
252 |
|
253 | filter(predicate?: StringIterator<boolean>): CollectionChain<string>;
|
254 | }
|
255 | interface StringNullableChain {
|
256 | |
257 |
|
258 |
|
259 | filter(predicate?: StringIterator<boolean>): CollectionChain<string>;
|
260 | }
|
261 | interface CollectionChain<T> {
|
262 | |
263 |
|
264 |
|
265 | filter<S extends T>(predicate: ListIteratorTypeGuard<T, S>): CollectionChain<S>;
|
266 | |
267 |
|
268 |
|
269 | filter(predicate?: ListIterateeCustom<T, boolean>): CollectionChain<T>;
|
270 | }
|
271 | interface ObjectChain<T> {
|
272 | |
273 |
|
274 |
|
275 | filter<S extends T[keyof T]>(predicate: ObjectIteratorTypeGuard<T, S>): CollectionChain<S>;
|
276 | |
277 |
|
278 |
|
279 | filter(predicate?: ObjectIterateeCustom<T, boolean>): CollectionChain<T[keyof T]>;
|
280 | }
|
281 | interface LoDashStatic {
|
282 | |
283 |
|
284 |
|
285 |
|
286 |
|
287 |
|
288 |
|
289 |
|
290 |
|
291 | find<T, S extends T>(collection: List<T> | null | undefined, predicate: ListIteratorTypeGuard<T, S>, fromIndex?: number): S|undefined;
|
292 | |
293 |
|
294 |
|
295 | find<T>(collection: List<T> | null | undefined, predicate?: ListIterateeCustom<T, boolean>, fromIndex?: number): T|undefined;
|
296 | |
297 |
|
298 |
|
299 | find<T extends object, S extends T[keyof T]>(collection: T | null | undefined, predicate: ObjectIteratorTypeGuard<T, S>, fromIndex?: number): S|undefined;
|
300 | |
301 |
|
302 |
|
303 | find<T extends object>(collection: T | null | undefined, predicate?: ObjectIterateeCustom<T, boolean>, fromIndex?: number): T[keyof T]|undefined;
|
304 | }
|
305 | interface Collection<T> {
|
306 | |
307 |
|
308 |
|
309 | find<S extends T>(predicate: ListIteratorTypeGuard<T, S>, fromIndex?: number): S|undefined;
|
310 | |
311 |
|
312 |
|
313 | find(predicate?: ListIterateeCustom<T, boolean>, fromIndex?: number): T|undefined;
|
314 | }
|
315 | interface Object<T> {
|
316 | |
317 |
|
318 |
|
319 | find< S extends T[keyof T]>(predicate: ObjectIteratorTypeGuard<T, S>, fromIndex?: number): S|undefined;
|
320 | |
321 |
|
322 |
|
323 | find(predicate?: ObjectIterateeCustom<T, boolean>, fromIndex?: number): T[keyof T]|undefined;
|
324 | }
|
325 | interface CollectionChain<T> {
|
326 | |
327 |
|
328 |
|
329 | find< S extends T>(predicate: ListIteratorTypeGuard<T, S>, fromIndex?: number): ExpChain<S|undefined>;
|
330 | |
331 |
|
332 |
|
333 | find(predicate?: ListIterateeCustom<T, boolean>, fromIndex?: number): ExpChain<T|undefined>;
|
334 | }
|
335 | interface ObjectChain<T> {
|
336 | |
337 |
|
338 |
|
339 | find< S extends T[keyof T]>(predicate: ObjectIteratorTypeGuard<T, S>, fromIndex?: number): ExpChain<S|undefined>;
|
340 | |
341 |
|
342 |
|
343 | find(predicate?: ObjectIterateeCustom<T, boolean>, fromIndex?: number): ExpChain<T[keyof T]|undefined>;
|
344 | }
|
345 | interface LoDashStatic {
|
346 | |
347 |
|
348 |
|
349 |
|
350 |
|
351 |
|
352 |
|
353 |
|
354 | findLast<T, S extends T>(collection: List<T> | null | undefined, predicate: ListIteratorTypeGuard<T, S>, fromIndex?: number): S|undefined;
|
355 | |
356 |
|
357 |
|
358 | findLast<T>(collection: List<T> | null | undefined, predicate?: ListIterateeCustom<T, boolean>, fromIndex?: number): T|undefined;
|
359 | |
360 |
|
361 |
|
362 | findLast<T extends object, S extends T[keyof T]>(collection: T | null | undefined, predicate: ObjectIteratorTypeGuard<T, S>, fromIndex?: number): S|undefined;
|
363 | |
364 |
|
365 |
|
366 | findLast<T extends object>(collection: T | null | undefined, predicate?: ObjectIterateeCustom<T, boolean>, fromIndex?: number): T[keyof T]|undefined;
|
367 | }
|
368 | interface Collection<T> {
|
369 | |
370 |
|
371 |
|
372 | findLast<S extends T>(predicate: ListIteratorTypeGuard<T, S>, fromIndex?: number): S|undefined;
|
373 | |
374 |
|
375 |
|
376 | findLast(predicate?: ListIterateeCustom<T, boolean>, fromIndex?: number): T|undefined;
|
377 | }
|
378 | interface Object<T> {
|
379 | |
380 |
|
381 |
|
382 | findLast< S extends T[keyof T]>(predicate: ObjectIteratorTypeGuard<T, S>, fromIndex?: number): S|undefined;
|
383 | |
384 |
|
385 |
|
386 | findLast(predicate?: ObjectIterateeCustom<T, boolean>, fromIndex?: number): T[keyof T]|undefined;
|
387 | }
|
388 | interface CollectionChain<T> {
|
389 | |
390 |
|
391 |
|
392 | findLast< S extends T>(predicate: ListIteratorTypeGuard<T, S>, fromIndex?: number): ExpChain<S|undefined>;
|
393 | |
394 |
|
395 |
|
396 | findLast(predicate?: ListIterateeCustom<T, boolean>, fromIndex?: number): ExpChain<T|undefined>;
|
397 | }
|
398 | interface ObjectChain<T> {
|
399 | |
400 |
|
401 |
|
402 | findLast< S extends T[keyof T]>(predicate: ObjectIteratorTypeGuard<T, S>, fromIndex?: number): ExpChain<S|undefined>;
|
403 | |
404 |
|
405 |
|
406 | findLast(predicate?: ObjectIterateeCustom<T, boolean>, fromIndex?: number): ExpChain<T[keyof T]|undefined>;
|
407 | }
|
408 | interface LoDashStatic {
|
409 | |
410 |
|
411 |
|
412 |
|
413 |
|
414 |
|
415 |
|
416 |
|
417 |
|
418 | flatMap<T>(collection: Dictionary<Many<T>> | NumericDictionary<Many<T>> | null | undefined): T[];
|
419 | |
420 |
|
421 |
|
422 | flatMap(collection: object | null | undefined): any[];
|
423 | |
424 |
|
425 |
|
426 | flatMap<T, TResult>(collection: List<T> | null | undefined, iteratee: ListIterator<T, Many<TResult>>): TResult[];
|
427 | |
428 |
|
429 |
|
430 | flatMap<T extends object, TResult>(collection: T | null | undefined, iteratee: ObjectIterator<T, Many<TResult>>): TResult[];
|
431 | |
432 |
|
433 |
|
434 | flatMap(collection: object | null | undefined, iteratee: string): any[];
|
435 | |
436 |
|
437 |
|
438 | flatMap(collection: object | null | undefined, iteratee: object): boolean[];
|
439 | }
|
440 | interface String {
|
441 | |
442 |
|
443 |
|
444 | flatMap<TResult>(iteratee: StringIterator<Many<TResult>>): Collection<TResult>;
|
445 | |
446 |
|
447 |
|
448 | flatMap(): Collection<string>;
|
449 | }
|
450 | interface Collection<T> {
|
451 | |
452 |
|
453 |
|
454 | flatMap<TResult = any>(iteratee: ListIterator<T, Many<TResult>> | PropertyName): Collection<TResult>;
|
455 | |
456 |
|
457 |
|
458 | flatMap(iteratee: [PropertyName, any] | object): Collection<boolean>;
|
459 | |
460 |
|
461 |
|
462 | flatMap(): T extends Many<infer U> ? Collection<U> : Collection<T>;
|
463 | }
|
464 | interface Object<T> {
|
465 | |
466 |
|
467 |
|
468 | flatMap<TResult = any>(iteratee: ObjectIterator<T, Many<TResult>> | PropertyName): Collection<TResult>;
|
469 | |
470 |
|
471 |
|
472 | flatMap(iteratee: [PropertyName, any] | object): Collection<boolean>;
|
473 | |
474 |
|
475 |
|
476 | flatMap(): Collection<T[keyof T]>;
|
477 | }
|
478 | interface StringChain {
|
479 | |
480 |
|
481 |
|
482 | flatMap<TResult>(iteratee: StringIterator<Many<TResult>>): CollectionChain<TResult>;
|
483 | |
484 |
|
485 |
|
486 | flatMap(): CollectionChain<string>;
|
487 | }
|
488 | interface StringNullableChain {
|
489 | |
490 |
|
491 |
|
492 | flatMap<TResult>(iteratee: StringIterator<Many<TResult>>): CollectionChain<TResult>;
|
493 | |
494 |
|
495 |
|
496 | flatMap(): CollectionChain<string>;
|
497 | }
|
498 | interface CollectionChain<T> {
|
499 | |
500 |
|
501 |
|
502 | flatMap<TResult = any>(iteratee: ListIterator<T, Many<TResult>> | PropertyName): CollectionChain<TResult>;
|
503 | |
504 |
|
505 |
|
506 | flatMap(iteratee: [PropertyName, any] | object): CollectionChain<boolean>;
|
507 | |
508 |
|
509 |
|
510 | flatMap(): T extends Many<infer U> ? CollectionChain<U> : CollectionChain<T>;
|
511 | }
|
512 | interface ObjectChain<T> {
|
513 | |
514 |
|
515 |
|
516 | flatMap<TResult = any>(iteratee: ObjectIterator<T, Many<TResult>> | PropertyName): CollectionChain<TResult>;
|
517 | |
518 |
|
519 |
|
520 | flatMap(iteratee: [PropertyName, any] | object): CollectionChain<boolean>;
|
521 | |
522 |
|
523 |
|
524 | flatMap(): CollectionChain<T[keyof T]>;
|
525 | }
|
526 | interface LoDashStatic {
|
527 | |
528 |
|
529 |
|
530 |
|
531 |
|
532 |
|
533 |
|
534 |
|
535 |
|
536 |
|
537 |
|
538 |
|
539 |
|
540 |
|
541 |
|
542 |
|
543 |
|
544 |
|
545 | flatMapDeep<T>(collection: Dictionary<ListOfRecursiveArraysOrValues<T> | T> | NumericDictionary<ListOfRecursiveArraysOrValues<T> | T> | null | undefined): T[];
|
546 | |
547 |
|
548 |
|
549 | flatMapDeep<T, TResult>(collection: List<T> | null | undefined, iteratee: ListIterator<T, ListOfRecursiveArraysOrValues<TResult> | TResult>): TResult[];
|
550 | |
551 |
|
552 |
|
553 | flatMapDeep<T extends object, TResult>(collection: T | null | undefined, iteratee: ObjectIterator<T, ListOfRecursiveArraysOrValues<TResult> | TResult>): TResult[];
|
554 | |
555 |
|
556 |
|
557 | flatMapDeep(collection: object | null | undefined, iteratee: string): any[];
|
558 | |
559 |
|
560 |
|
561 | flatMapDeep(collection: object | null | undefined, iteratee: object): boolean[];
|
562 | }
|
563 | interface String {
|
564 | |
565 |
|
566 |
|
567 | flatMapDeep<TResult>(iteratee: StringIterator<ListOfRecursiveArraysOrValues<TResult> | TResult>): Collection<TResult>;
|
568 | |
569 |
|
570 |
|
571 | flatMapDeep(): Collection<string>;
|
572 | }
|
573 | interface Collection<T> {
|
574 | |
575 |
|
576 |
|
577 | flatMapDeep<TResult = any>(iteratee: ListIterator<T, ListOfRecursiveArraysOrValues<TResult> | TResult> | PropertyName): Collection<TResult>;
|
578 | |
579 |
|
580 |
|
581 | flatMapDeep(iteratee: [PropertyName, any] | object): Collection<boolean>;
|
582 | |
583 |
|
584 |
|
585 | flatMapDeep(): Collection<T>;
|
586 | }
|
587 | interface Object<T> {
|
588 | |
589 |
|
590 |
|
591 | flatMapDeep<TResult = any>(iteratee: ObjectIterator<T, ListOfRecursiveArraysOrValues<TResult> | TResult> | PropertyName): Collection<TResult>;
|
592 | |
593 |
|
594 |
|
595 | flatMapDeep(iteratee: [PropertyName, any] | object): Collection<boolean>;
|
596 | |
597 |
|
598 |
|
599 | flatMapDeep(): Collection<T[keyof T]>;
|
600 | }
|
601 | interface StringChain {
|
602 | |
603 |
|
604 |
|
605 | flatMapDeep<TResult>(iteratee: StringIterator<ListOfRecursiveArraysOrValues<TResult> | TResult>): CollectionChain<TResult>;
|
606 | |
607 |
|
608 |
|
609 | flatMapDeep(): CollectionChain<string>;
|
610 | }
|
611 | interface StringNullableChain {
|
612 | |
613 |
|
614 |
|
615 | flatMapDeep<TResult>(iteratee: StringIterator<ListOfRecursiveArraysOrValues<TResult> | TResult>): CollectionChain<TResult>;
|
616 | |
617 |
|
618 |
|
619 | flatMapDeep(): CollectionChain<string>;
|
620 | }
|
621 | interface CollectionChain<T> {
|
622 | |
623 |
|
624 |
|
625 | flatMapDeep<TResult = any>(iteratee: ListIterator<T, ListOfRecursiveArraysOrValues<TResult> | TResult> | PropertyName): CollectionChain<TResult>;
|
626 | |
627 |
|
628 |
|
629 | flatMapDeep(iteratee: [PropertyName, any] | object): CollectionChain<boolean>;
|
630 | |
631 |
|
632 |
|
633 | flatMapDeep(): CollectionChain<T>;
|
634 | }
|
635 | interface ObjectChain<T> {
|
636 | |
637 |
|
638 |
|
639 | flatMapDeep<TResult = any>(iteratee: ObjectIterator<T, ListOfRecursiveArraysOrValues<TResult> | TResult> | PropertyName): CollectionChain<TResult>;
|
640 | |
641 |
|
642 |
|
643 | flatMapDeep(iteratee: [PropertyName, any] | object): CollectionChain<boolean>;
|
644 | |
645 |
|
646 |
|
647 | flatMapDeep(): CollectionChain<T[keyof T]>;
|
648 | }
|
649 | interface LoDashStatic {
|
650 | |
651 |
|
652 |
|
653 |
|
654 |
|
655 |
|
656 |
|
657 |
|
658 |
|
659 |
|
660 |
|
661 |
|
662 |
|
663 |
|
664 |
|
665 |
|
666 |
|
667 |
|
668 |
|
669 | flatMapDepth<T>(collection: Dictionary<ListOfRecursiveArraysOrValues<T> | T> | NumericDictionary<ListOfRecursiveArraysOrValues<T> | T> | null | undefined): T[];
|
670 | |
671 |
|
672 |
|
673 | flatMapDepth<T, TResult>(collection: List<T> | null | undefined, iteratee: ListIterator<T, ListOfRecursiveArraysOrValues<TResult> | TResult>, depth?: number): TResult[];
|
674 | |
675 |
|
676 |
|
677 | flatMapDepth<T extends object, TResult>(collection: T | null | undefined, iteratee: ObjectIterator<T, ListOfRecursiveArraysOrValues<TResult> | TResult>, depth?: number): TResult[];
|
678 | |
679 |
|
680 |
|
681 | flatMapDepth(collection: object | null | undefined, iteratee: string, depth?: number): any[];
|
682 | |
683 |
|
684 |
|
685 | flatMapDepth(collection: object | null | undefined, iteratee: object, depth?: number): boolean[];
|
686 | }
|
687 | interface String {
|
688 | |
689 |
|
690 |
|
691 | flatMapDepth<TResult>(iteratee: StringIterator<ListOfRecursiveArraysOrValues<TResult> | TResult>, depth?: number): Collection<TResult>;
|
692 | |
693 |
|
694 |
|
695 | flatMapDepth(depth?: number): Collection<string>;
|
696 | }
|
697 | interface Collection<T> {
|
698 | |
699 |
|
700 |
|
701 | flatMapDepth<TResult = any>(iteratee: ListIterator<T, ListOfRecursiveArraysOrValues<TResult> | TResult> | PropertyName, depth?: number): Collection<TResult>;
|
702 | |
703 |
|
704 |
|
705 | flatMapDepth(iteratee: [PropertyName, any] | object, depth?: number): Collection<boolean>;
|
706 | |
707 |
|
708 |
|
709 | flatMapDepth(depth?: number): Collection<T>;
|
710 | }
|
711 | interface Object<T> {
|
712 | |
713 |
|
714 |
|
715 | flatMapDepth<TResult = any>(iteratee: ObjectIterator<T, ListOfRecursiveArraysOrValues<TResult> | TResult> | PropertyName, depth?: number): Collection<TResult>;
|
716 | |
717 |
|
718 |
|
719 | flatMapDepth(iteratee: [PropertyName, any] | object, depth?: number): Collection<boolean>;
|
720 | |
721 |
|
722 |
|
723 | flatMapDepth(depth?: number): Collection<T[keyof T]>;
|
724 | }
|
725 | interface StringChain {
|
726 | |
727 |
|
728 |
|
729 | flatMapDepth<TResult>(iteratee: StringIterator<ListOfRecursiveArraysOrValues<TResult> | TResult>, depth?: number): CollectionChain<TResult>;
|
730 | |
731 |
|
732 |
|
733 | flatMapDepth(depth?: number): CollectionChain<string>;
|
734 | }
|
735 | interface StringNullableChain {
|
736 | |
737 |
|
738 |
|
739 | flatMapDepth<TResult>(iteratee: StringIterator<ListOfRecursiveArraysOrValues<TResult> | TResult>, depth?: number): CollectionChain<TResult>;
|
740 | |
741 |
|
742 |
|
743 | flatMapDepth(depth?: number): CollectionChain<string>;
|
744 | }
|
745 | interface CollectionChain<T> {
|
746 | |
747 |
|
748 |
|
749 | flatMapDepth<TResult = any>(iteratee: ListIterator<T, ListOfRecursiveArraysOrValues<TResult> | TResult> | PropertyName, depth?: number): CollectionChain<TResult>;
|
750 | |
751 |
|
752 |
|
753 | flatMapDepth(iteratee: [PropertyName, any] | object, depth?: number): CollectionChain<boolean>;
|
754 | |
755 |
|
756 |
|
757 | flatMapDepth(depth?: number): CollectionChain<T>;
|
758 | }
|
759 | interface ObjectChain<T> {
|
760 | |
761 |
|
762 |
|
763 | flatMapDepth<TResult = any>(iteratee: ObjectIterator<T, ListOfRecursiveArraysOrValues<TResult> | TResult> | PropertyName, depth?: number): CollectionChain<TResult>;
|
764 | |
765 |
|
766 |
|
767 | flatMapDepth(iteratee: [PropertyName, any] | object, depth?: number): CollectionChain<boolean>;
|
768 | |
769 |
|
770 |
|
771 | flatMapDepth(depth?: number): CollectionChain<T[keyof T]>;
|
772 | }
|
773 | interface LoDashStatic {
|
774 | |
775 |
|
776 |
|
777 |
|
778 |
|
779 |
|
780 |
|
781 |
|
782 |
|
783 |
|
784 |
|
785 |
|
786 | forEach<T>(collection: T[], iteratee?: ArrayIterator<T, any>): T[];
|
787 | |
788 |
|
789 |
|
790 | forEach(collection: string, iteratee?: StringIterator<any>): string;
|
791 | |
792 |
|
793 |
|
794 | forEach<T>(collection: List<T>, iteratee?: ListIterator<T, any>): List<T>;
|
795 | |
796 |
|
797 |
|
798 | forEach<T extends object>(collection: T, iteratee?: ObjectIterator<T, any>): T;
|
799 | |
800 |
|
801 |
|
802 | forEach<T, TArray extends T[] | null | undefined>(collection: TArray & (T[] | null | undefined), iteratee?: ArrayIterator<T, any>): TArray;
|
803 | |
804 |
|
805 |
|
806 | forEach<TString extends string | null | undefined>(collection: TString, iteratee?: StringIterator<any>): TString;
|
807 | |
808 |
|
809 |
|
810 | forEach<T, TList extends List<T> | null | undefined>(collection: TList & (List<T> | null | undefined), iteratee?: ListIterator<T, any>): TList;
|
811 | |
812 |
|
813 |
|
814 | forEach<T extends object>(collection: T | null | undefined, iteratee?: ObjectIterator<T, any>): T | null | undefined;
|
815 | }
|
816 | interface String {
|
817 | |
818 |
|
819 |
|
820 | forEach(iteratee?: StringIterator<any>): String;
|
821 | }
|
822 | interface Object<T> {
|
823 | |
824 |
|
825 |
|
826 | forEach(iteratee?: ObjectIterator<T, any>): Object<T>;
|
827 | }
|
828 | interface Collection<T> {
|
829 | |
830 |
|
831 |
|
832 | forEach(iteratee?: ListIterator<T, any>): Collection<T>;
|
833 | }
|
834 | interface StringChain {
|
835 | |
836 |
|
837 |
|
838 | forEach(iteratee?: StringIterator<any>): StringChain;
|
839 | }
|
840 | interface StringNullableChain {
|
841 | |
842 |
|
843 |
|
844 | forEach(iteratee?: StringIterator<any>): StringNullableChain;
|
845 | }
|
846 | interface ObjectChain<T> {
|
847 | |
848 |
|
849 |
|
850 | forEach(iteratee?: ObjectIterator<T, any>): ObjectChain<T>;
|
851 | }
|
852 | interface CollectionChain<T> {
|
853 | |
854 |
|
855 |
|
856 | forEach(iteratee?: ListIterator<T, any>): CollectionChain<T>;
|
857 | }
|
858 | interface LoDashStatic {
|
859 | |
860 |
|
861 |
|
862 |
|
863 |
|
864 |
|
865 |
|
866 |
|
867 | forEachRight<T>(collection: T[], iteratee?: ArrayIterator<T, any>): T[];
|
868 | |
869 |
|
870 |
|
871 | forEachRight(collection: string, iteratee?: StringIterator<any>): string;
|
872 | |
873 |
|
874 |
|
875 | forEachRight<T>(collection: List<T>, iteratee?: ListIterator<T, any>): List<T>;
|
876 | |
877 |
|
878 |
|
879 | forEachRight<T extends object>(collection: T, iteratee?: ObjectIterator<T, any>): T;
|
880 | |
881 |
|
882 |
|
883 | forEachRight<T, TArray extends T[] | null | undefined>(collection: TArray & (T[] | null | undefined), iteratee?: ArrayIterator<T, any>): TArray;
|
884 | |
885 |
|
886 |
|
887 | forEachRight<TString extends string | null | undefined>(collection: TString, iteratee?: StringIterator<any>): TString;
|
888 | |
889 |
|
890 |
|
891 | forEachRight<T, TList extends List<T> | null | undefined>(collection: TList & (List<T> | null | undefined), iteratee?: ListIterator<T, any>): TList;
|
892 | |
893 |
|
894 |
|
895 | forEachRight<T extends object>(collection: T | null | undefined, iteratee?: ObjectIterator<T, any>): T | null | undefined;
|
896 | }
|
897 | interface String {
|
898 | |
899 |
|
900 |
|
901 | forEachRight(iteratee?: StringIterator<any>): String;
|
902 | }
|
903 | interface Object<T> {
|
904 | |
905 |
|
906 |
|
907 | forEachRight(iteratee?: ObjectIterator<T, any>): Object<T>;
|
908 | }
|
909 | interface Collection<T> {
|
910 | |
911 |
|
912 |
|
913 | forEachRight(iteratee?: ListIterator<T, any>): Collection<T>;
|
914 | }
|
915 | interface StringChain {
|
916 | |
917 |
|
918 |
|
919 | forEachRight(iteratee?: StringIterator<any>): StringChain;
|
920 | }
|
921 | interface StringNullableChain {
|
922 | |
923 |
|
924 |
|
925 | forEachRight(iteratee?: StringIterator<any>): StringNullableChain;
|
926 | }
|
927 | interface ObjectChain<T> {
|
928 | |
929 |
|
930 |
|
931 | forEachRight(iteratee?: ObjectIterator<T, any>): ObjectChain<T>;
|
932 | }
|
933 | interface CollectionChain<T> {
|
934 | |
935 |
|
936 |
|
937 | forEachRight(iteratee?: ListIterator<T, any>): CollectionChain<T>;
|
938 | }
|
939 | interface LoDashStatic {
|
940 | |
941 |
|
942 |
|
943 |
|
944 |
|
945 |
|
946 |
|
947 |
|
948 |
|
949 | groupBy<T>(collection: List<T> | null | undefined, iteratee?: ValueIteratee<T>): Dictionary<T[]>;
|
950 | |
951 |
|
952 |
|
953 | groupBy<T extends object>(collection: T | null | undefined, iteratee?: ValueIteratee<T[keyof T]>): Dictionary<Array<T[keyof T]>>;
|
954 | }
|
955 | interface String {
|
956 | |
957 |
|
958 |
|
959 | groupBy(iteratee?: ValueIteratee<string>): Object<Dictionary<string[]>>;
|
960 | }
|
961 | interface Collection<T> {
|
962 | |
963 |
|
964 |
|
965 | groupBy(iteratee?: ValueIteratee<T>): Object<Dictionary<T[]>>;
|
966 | }
|
967 | interface Object<T> {
|
968 | |
969 |
|
970 |
|
971 | groupBy(iteratee?: ValueIteratee<T[keyof T]>): Object<Dictionary<Array<T[keyof T]>>>;
|
972 | }
|
973 | interface StringChain {
|
974 | |
975 |
|
976 |
|
977 | groupBy(iteratee?: ValueIteratee<string>): ObjectChain<Dictionary<string[]>>;
|
978 | }
|
979 | interface StringNullableChain {
|
980 | |
981 |
|
982 |
|
983 | groupBy(iteratee?: ValueIteratee<string>): ObjectChain<Dictionary<string[]>>;
|
984 | }
|
985 | interface CollectionChain<T> {
|
986 | |
987 |
|
988 |
|
989 | groupBy(iteratee?: ValueIteratee<T>): ObjectChain<Dictionary<T[]>>;
|
990 | }
|
991 | interface ObjectChain<T> {
|
992 | |
993 |
|
994 |
|
995 | groupBy(iteratee?: ValueIteratee<T[keyof T]>): ObjectChain<Dictionary<Array<T[keyof T]>>>;
|
996 | }
|
997 | interface LoDashStatic {
|
998 | |
999 |
|
1000 |
|
1001 |
|
1002 |
|
1003 |
|
1004 |
|
1005 |
|
1006 |
|
1007 | includes<T>(collection: Dictionary<T> | NumericDictionary<T> | null | undefined, target: T, fromIndex?: number): boolean;
|
1008 | }
|
1009 | interface Object<T> {
|
1010 | |
1011 |
|
1012 |
|
1013 | includes(target: T[keyof T], fromIndex?: number): boolean;
|
1014 | }
|
1015 | interface Collection<T> {
|
1016 | |
1017 |
|
1018 |
|
1019 | includes(target: T, fromIndex?: number): boolean;
|
1020 | }
|
1021 | interface String {
|
1022 | |
1023 |
|
1024 |
|
1025 | includes(target: string, fromIndex?: number): boolean;
|
1026 | }
|
1027 | interface ObjectChain<T> {
|
1028 | |
1029 |
|
1030 |
|
1031 | includes(target: T[keyof T], fromIndex?: number): PrimitiveChain<boolean>;
|
1032 | }
|
1033 | interface CollectionChain<T> {
|
1034 | |
1035 |
|
1036 |
|
1037 | includes(target: T, fromIndex?: number): PrimitiveChain<boolean>;
|
1038 | }
|
1039 | interface StringChain {
|
1040 | |
1041 |
|
1042 |
|
1043 | includes(target: string, fromIndex?: number): PrimitiveChain<boolean>;
|
1044 | }
|
1045 | interface LoDashStatic {
|
1046 | |
1047 |
|
1048 |
|
1049 |
|
1050 |
|
1051 |
|
1052 |
|
1053 |
|
1054 |
|
1055 | invokeMap(collection: object | null | undefined, methodName: string, ...args: any[]): any[];
|
1056 | |
1057 |
|
1058 |
|
1059 | invokeMap<TResult>(collection: object | null | undefined, method: (...args: any[]) => TResult, ...args: any[]): TResult[];
|
1060 | }
|
1061 | interface LoDashImplicitWrapper<TValue> {
|
1062 | /**
|
1063 | * @see _.invokeMap
|
1064 | */
|
1065 | invokeMap(methodName: string, ...args: any[]): Collection<any>;
|
1066 | /**
|
1067 | * @see _.invokeMap
|
1068 | */
|
1069 | invokeMap<TResult>(method: (...args: any[]) => TResult, ...args: any[]): Collection<TResult>;
|
1070 | }
|
1071 | interface LoDashExplicitWrapper<TValue> {
|
1072 | /**
|
1073 | * @see _.invokeMap
|
1074 | */
|
1075 | invokeMap(methodName: string, ...args: any[]): CollectionChain<any>;
|
1076 | /**
|
1077 | * @see _.invokeMap
|
1078 | */
|
1079 | invokeMap<TResult>(method: (...args: any[]) => TResult, ...args: any[]): CollectionChain<TResult>;
|
1080 | }
|
1081 | interface LoDashStatic {
|
1082 | /**
|
1083 | * Creates an object composed of keys generated from the results of running each element of collection through
|
1084 | * iteratee. The corresponding value of each key is the last element responsible for generating the key. The
|
1085 | * iteratee function is invoked with one argument: (value).
|
1086 | *
|
1087 | * @param collection The collection to iterate over.
|
1088 | * @param iteratee The function invoked per iteration.
|
1089 | * @return Returns the composed aggregate object.
|
1090 | */
|
1091 | keyBy<T>(collection: List<T> | null | undefined, iteratee?: ValueIterateeCustom<T, PropertyName>): Dictionary<T>;
|
1092 | /**
|
1093 | * @see _.keyBy
|
1094 | */
|
1095 | keyBy<T extends object>(collection: T | null | undefined, iteratee?: ValueIterateeCustom<T[keyof T], PropertyName>): Dictionary<T[keyof T]>;
|
1096 | }
|
1097 | interface String {
|
1098 | /**
|
1099 | * @see _.keyBy
|
1100 | */
|
1101 | keyBy(iteratee?: ValueIterateeCustom<string, PropertyName>): Object<Dictionary<string>>;
|
1102 | }
|
1103 | interface Collection<T> {
|
1104 | /**
|
1105 | * @see _.keyBy
|
1106 | */
|
1107 | keyBy(iteratee?: ValueIterateeCustom<T, PropertyName>): Object<Dictionary<T>>;
|
1108 | }
|
1109 | interface Object<T> {
|
1110 | /**
|
1111 | * @see _.keyBy
|
1112 | */
|
1113 | keyBy(iteratee?: ValueIterateeCustom<T[keyof T], PropertyName>): Object<Dictionary<T[keyof T]>>;
|
1114 | }
|
1115 | interface StringChain {
|
1116 | /**
|
1117 | * @see _.keyBy
|
1118 | */
|
1119 | keyBy(iteratee?: ValueIterateeCustom<string, PropertyName>): ObjectChain<Dictionary<string>>;
|
1120 | }
|
1121 | interface StringNullableChain {
|
1122 | /**
|
1123 | * @see _.keyBy
|
1124 | */
|
1125 | keyBy(iteratee?: ValueIterateeCustom<string, PropertyName>): ObjectChain<Dictionary<string>>;
|
1126 | }
|
1127 | interface CollectionChain<T> {
|
1128 | /**
|
1129 | * @see _.keyBy
|
1130 | */
|
1131 | keyBy(iteratee?: ValueIterateeCustom<T, PropertyName>): ObjectChain<Dictionary<T>>;
|
1132 | }
|
1133 | interface ObjectChain<T> {
|
1134 | /**
|
1135 | * @see _.keyBy
|
1136 | */
|
1137 | keyBy(iteratee?: ValueIterateeCustom<T[keyof T], PropertyName>): ObjectChain<Dictionary<T[keyof T]>>;
|
1138 | }
|
1139 | interface LoDashStatic {
|
1140 | /**
|
1141 | * Creates an array of values by running each element in collection through iteratee. The iteratee is
|
1142 | * invoked with three arguments: (value, index|key, collection).
|
1143 | *
|
1144 | * Many lodash methods are guarded to work as iteratees for methods like _.every, _.filter, _.map, _.mapValues,
|
1145 | * _.reject, and _.some.
|
1146 | *
|
1147 | * The guarded methods are:
|
1148 | * ary, callback, chunk, clone, create, curry, curryRight, drop, dropRight, every, fill, flatten, invert, max,
|
1149 | * min, parseInt, slice, sortBy, take, takeRight, template, trim, trimLeft, trimRight, trunc, random, range,
|
1150 | * sample, some, sum, uniq, and words
|
1151 | *
|
1152 | * @param collection The collection to iterate over.
|
1153 | * @param iteratee The function invoked per iteration.
|
1154 | * @return Returns the new mapped array.
|
1155 | */
|
1156 | map<T extends readonly [unknown, ...unknown[]], TResult>(collection: T, iteratee: TupleIterator<T, TResult>): { [K in keyof T]: TResult };
|
1157 | /**
|
1158 | * @see _.map
|
1159 | */
|
1160 | map<T, TResult>(collection: T[] | null | undefined, iteratee: ArrayIterator<T, TResult>): TResult[];
|
1161 | /**
|
1162 | * @see _.map
|
1163 | */
|
1164 | map<T, TResult>(collection: List<T> | null | undefined, iteratee: ListIterator<T, TResult>): TResult[];
|
1165 | /**
|
1166 | * @see _.map
|
1167 | */
|
1168 | map<T>(collection: Dictionary<T> | NumericDictionary<T> | null | undefined): T[];
|
1169 | /**
|
1170 | * @see _.map
|
1171 | */
|
1172 | map<T extends object, TResult>(collection: T | null | undefined, iteratee: ObjectIterator<T, TResult>): TResult[];
|
1173 | /**
|
1174 | * @see _.map
|
1175 | */
|
1176 | map<T, K extends keyof T>(collection: Dictionary<T> | NumericDictionary<T> | null | undefined, iteratee: K): Array<T[K]>;
|
1177 | /**
|
1178 | * @see _.map
|
1179 | */
|
1180 | map<T>(collection: Dictionary<T> | NumericDictionary<T> | null | undefined, iteratee?: string): any[];
|
1181 | /**
|
1182 | * @see _.map
|
1183 | */
|
1184 | map<T>(collection: Dictionary<T> | NumericDictionary<T> | null | undefined, iteratee?: object): boolean[];
|
1185 | }
|
1186 |
|
1187 | interface String {
|
1188 | /**
|
1189 | * @see _.map
|
1190 | */
|
1191 | map<TResult>(iteratee: StringIterator<TResult>): Collection<TResult>;
|
1192 | /**
|
1193 | * @see _.map
|
1194 | */
|
1195 | map(): Collection<string>;
|
1196 | }
|
1197 | interface Collection<T> {
|
1198 | /**
|
1199 | * @see _.map
|
1200 | */
|
1201 | map<K extends keyof T>(key: K): Collection<T[K]>;
|
1202 | /**
|
1203 | * @see _.map
|
1204 | */
|
1205 | map<TResult>(iteratee: ListIterator<T, TResult>): Collection<TResult>;
|
1206 | /**
|
1207 | * @see _.map
|
1208 | */
|
1209 | map(iteratee: PropertyName): Collection<any>;
|
1210 | /**
|
1211 | * @see _.map
|
1212 | */
|
1213 | map(iteratee: [PropertyName, any] | object): Collection<boolean>;
|
1214 | /**
|
1215 | * @see _.map
|
1216 | */
|
1217 | map(): Collection<T>;
|
1218 | }
|
1219 | interface Object<T> {
|
1220 | /**
|
1221 | * @see _.map
|
1222 | */
|
1223 | map<K extends keyof T[keyof T]>(key: K): Collection<T[keyof T][K]>;
|
1224 | /**
|
1225 | * @see _.map
|
1226 | */
|
1227 | map<TResult>(iteratee: ObjectIterator<T, TResult>): Collection<TResult>;
|
1228 | /**
|
1229 | * @see _.map
|
1230 | */
|
1231 | map(iteratee: PropertyName): Collection<any>;
|
1232 | /**
|
1233 | * @see _.map
|
1234 | */
|
1235 | map(iteratee: [PropertyName, any] | object): Collection<boolean>;
|
1236 | /**
|
1237 | * @see _.map
|
1238 | */
|
1239 | map(): Collection<T[keyof T]>;
|
1240 | }
|
1241 | interface StringChain {
|
1242 | /**
|
1243 | * @see _.map
|
1244 | */
|
1245 | map<TResult>(iteratee: StringIterator<TResult>): CollectionChain<TResult>;
|
1246 | /**
|
1247 | * @see _.map
|
1248 | */
|
1249 | map(): CollectionChain<string>;
|
1250 | }
|
1251 | interface StringNullableChain {
|
1252 | /**
|
1253 | * @see _.map
|
1254 | */
|
1255 | map<TResult>(iteratee: StringIterator<TResult>): CollectionChain<TResult>;
|
1256 | /**
|
1257 | * @see _.map
|
1258 | */
|
1259 | map(): CollectionChain<string>;
|
1260 | }
|
1261 | interface CollectionChain<T> {
|
1262 | /**
|
1263 | * @see _.map
|
1264 | */
|
1265 | map<K extends keyof T>(key: K): CollectionChain<T[K]>;
|
1266 | /**
|
1267 | * @see _.map
|
1268 | */
|
1269 | map<TResult>(iteratee: ListIterator<T, TResult>): CollectionChain<TResult>;
|
1270 | /**
|
1271 | * @see _.map
|
1272 | */
|
1273 | map(iteratee: PropertyName): CollectionChain<any>;
|
1274 | /**
|
1275 | * @see _.map
|
1276 | */
|
1277 | map(iteratee: [PropertyName, any] | object): CollectionChain<boolean>;
|
1278 | /**
|
1279 | * @see _.map
|
1280 | */
|
1281 | map(): CollectionChain<T>;
|
1282 | }
|
1283 | interface ObjectChain<T> {
|
1284 | /**
|
1285 | * @see _.map
|
1286 | */
|
1287 | map<K extends keyof T[keyof T]>(key: K): CollectionChain<T[keyof T][K]>;
|
1288 | /**
|
1289 | * @see _.map
|
1290 | */
|
1291 | map<TResult>(iteratee: ObjectIterator<T, TResult>): CollectionChain<TResult>;
|
1292 | /**
|
1293 | * @see _.map
|
1294 | */
|
1295 | map(iteratee: PropertyName): CollectionChain<any>;
|
1296 | /**
|
1297 | * @see _.map
|
1298 | */
|
1299 | map(iteratee: [PropertyName, any] | object): CollectionChain<boolean>;
|
1300 | /**
|
1301 | * @see _.map
|
1302 | */
|
1303 | map(): CollectionChain<T[keyof T]>;
|
1304 | }
|
1305 | interface LoDashStatic {
|
1306 | /**
|
1307 | * This method is like `_.sortBy` except that it allows specifying the sort
|
1308 | * orders of the iteratees to sort by. If `orders` is unspecified, all values
|
1309 | * are sorted in ascending order. Otherwise, specify an order of "desc" for
|
1310 | * descending or "asc" for ascending sort order of corresponding values.
|
1311 | *
|
1312 | * @category Collection
|
1313 | * @param collection The collection to iterate over.
|
1314 | * @param [iteratees=[_.identity]] The iteratees to sort by.
|
1315 | * @param [orders] The sort orders of `iteratees`.
|
1316 | * @param [guard] Enables use as an iteratee for functions like `_.reduce`.
|
1317 | * @returns Returns the new sorted array.
|
1318 | * @example
|
1319 | *
|
1320 | * var users = [
|
1321 | * { 'user': 'fred', 'age': 48 },
|
1322 | * { 'user': 'barney', 'age': 34 },
|
1323 | * { 'user': 'fred', 'age': 42 },
|
1324 | * { 'user': 'barney', 'age': 36 }
|
1325 | * ];
|
1326 | *
|
1327 | * // sort by `user` in ascending order and by `age` in descending order
|
1328 | * _.orderBy(users, ['user', 'age'], ['asc', 'desc']);
|
1329 | * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 42]]
|
1330 | */
|
1331 | orderBy<T>(collection: List<T> | null | undefined, iteratees?: Many<ListIterator<T, NotVoid>>, orders?: Many<boolean|"asc"|"desc">): T[];
|
1332 | |
1333 |
|
1334 |
|
1335 | orderBy<T>(collection: List<T> | null | undefined, iteratees?: Many<ListIteratee<T>>, orders?: Many<boolean|"asc"|"desc">): T[];
|
1336 | |
1337 |
|
1338 |
|
1339 | orderBy<T extends object>(collection: T | null | undefined, iteratees?: Many<ObjectIterator<T, NotVoid>>, orders?: Many<boolean|"asc"|"desc">): Array<T[keyof T]>;
|
1340 | |
1341 |
|
1342 |
|
1343 | orderBy<T extends object>(collection: T | null | undefined, iteratees?: Many<ObjectIteratee<T>>, orders?: Many<boolean|"asc"|"desc">): Array<T[keyof T]>;
|
1344 | }
|
1345 | interface Collection<T> {
|
1346 | |
1347 |
|
1348 |
|
1349 | orderBy(iteratees?: Many<ListIterator<T, NotVoid> | PropertyName | PartialShallow<T>>, orders?: Many<boolean|"asc"|"desc">): Collection<T>;
|
1350 | }
|
1351 | interface Object<T> {
|
1352 | |
1353 |
|
1354 |
|
1355 | orderBy(iteratees?: Many<ObjectIterator<T, NotVoid>>, orders?: Many<boolean|"asc"|"desc">): Collection<T[keyof T]>;
|
1356 | }
|
1357 | interface CollectionChain<T> {
|
1358 | |
1359 |
|
1360 |
|
1361 | orderBy(iteratees?: Many<ListIterator<T, NotVoid> | PropertyName | PartialShallow<T>>, orders?: Many<boolean|"asc"|"desc">): CollectionChain<T>;
|
1362 | }
|
1363 | interface ObjectChain<T> {
|
1364 | |
1365 |
|
1366 |
|
1367 | orderBy(iteratees?: Many<ObjectIterator<T, NotVoid>>, orders?: Many<boolean|"asc"|"desc">): CollectionChain<T[keyof T]>;
|
1368 | }
|
1369 | interface LoDashStatic {
|
1370 | |
1371 |
|
1372 |
|
1373 |
|
1374 |
|
1375 |
|
1376 |
|
1377 |
|
1378 |
|
1379 | partition<T, U extends T>(collection: List<T> | null | undefined, callback: ValueIteratorTypeGuard<T, U>): [U[], Array<Exclude<T, U>>];
|
1380 | |
1381 |
|
1382 |
|
1383 | partition<T>(collection: List<T> | null | undefined, callback: ValueIteratee<T>): [T[], T[]];
|
1384 | |
1385 |
|
1386 |
|
1387 | partition<T extends object>(collection: T | null | undefined, callback: ValueIteratee<T[keyof T]>): [Array<T[keyof T]>, Array<T[keyof T]>];
|
1388 | }
|
1389 | interface String {
|
1390 | |
1391 |
|
1392 |
|
1393 | partition(callback: StringIterator<NotVoid>): LoDashImplicitWrapper<[string[], string[]]>;
|
1394 | }
|
1395 | interface Collection<T> {
|
1396 | |
1397 |
|
1398 |
|
1399 | partition<U extends T>(callback: ValueIteratorTypeGuard<T, U>): LoDashImplicitWrapper<[U[], Array<Exclude<T, U>>]>;
|
1400 | |
1401 |
|
1402 |
|
1403 | partition(callback: ValueIteratee<T>): LoDashImplicitWrapper<[T[], T[]]>;
|
1404 | }
|
1405 | interface Object<T> {
|
1406 | |
1407 |
|
1408 |
|
1409 | partition(callback: ValueIteratee<T[keyof T]>): LoDashImplicitWrapper<[Array<T[keyof T]>, Array<T[keyof T]>]>;
|
1410 | }
|
1411 | interface StringChain {
|
1412 | |
1413 |
|
1414 |
|
1415 | partition(callback: StringIterator<NotVoid>): LoDashExplicitWrapper<[string[], string[]]>;
|
1416 | }
|
1417 | interface StringNullableChain {
|
1418 | |
1419 |
|
1420 |
|
1421 | partition(callback: StringIterator<NotVoid>): LoDashExplicitWrapper<[string[], string[]]>;
|
1422 | }
|
1423 | interface CollectionChain<T> {
|
1424 | |
1425 |
|
1426 |
|
1427 | partition<U extends T>(callback: ValueIteratorTypeGuard<T, U>): LoDashExplicitWrapper<[U[], Array<Exclude<T, U>>]>;
|
1428 | |
1429 |
|
1430 |
|
1431 | partition(callback: ValueIteratee<T>): LoDashExplicitWrapper<[T[], T[]]>;
|
1432 | }
|
1433 | interface ObjectChain<T> {
|
1434 | |
1435 |
|
1436 |
|
1437 | partition(callback: ValueIteratee<T[keyof T]>): LoDashExplicitWrapper<[Array<T[keyof T]>, Array<T[keyof T]>]>;
|
1438 | }
|
1439 | interface LoDashStatic {
|
1440 | |
1441 |
|
1442 |
|
1443 |
|
1444 |
|
1445 |
|
1446 |
|
1447 |
|
1448 |
|
1449 |
|
1450 |
|
1451 | reduce<T, TResult>(collection: T[] | null | undefined, callback: MemoListIterator<T, TResult, T[]>, accumulator: TResult): TResult;
|
1452 | |
1453 |
|
1454 |
|
1455 | reduce<T, TResult>(collection: List<T> | null | undefined, callback: MemoListIterator<T, TResult, List<T>>, accumulator: TResult): TResult;
|
1456 | |
1457 |
|
1458 |
|
1459 | reduce<T extends object, TResult>(collection: T | null | undefined, callback: MemoObjectIterator<T[keyof T], TResult, T>, accumulator: TResult): TResult;
|
1460 | |
1461 |
|
1462 |
|
1463 | reduce<T>(collection: T[] | null | undefined, callback: MemoListIterator<T, T, T[]>): T | undefined;
|
1464 | |
1465 |
|
1466 |
|
1467 | reduce<T>(collection: List<T> | null | undefined, callback: MemoListIterator<T, T, List<T>>): T | undefined;
|
1468 | |
1469 |
|
1470 |
|
1471 | reduce<T extends object>(collection: T | null | undefined, callback: MemoObjectIterator<T[keyof T], T[keyof T], T>): T[keyof T] | undefined;
|
1472 | }
|
1473 | interface Collection<T> {
|
1474 | |
1475 |
|
1476 |
|
1477 | reduce<TResult>(callback: MemoListIterator<T, TResult, List<T>>, accumulator: TResult): TResult;
|
1478 | |
1479 |
|
1480 |
|
1481 | reduce(callback: MemoListIterator<T, T, List<T>>): T | undefined;
|
1482 | }
|
1483 | interface Object<T> {
|
1484 | |
1485 |
|
1486 |
|
1487 | reduce<TResult>(callback: MemoObjectIterator<T[keyof T], TResult, T>, accumulator: TResult): TResult;
|
1488 | |
1489 |
|
1490 |
|
1491 | reduce(callback: MemoObjectIterator<T[keyof T], T[keyof T], T>): T[keyof T] | undefined;
|
1492 | }
|
1493 | interface CollectionChain<T> {
|
1494 | |
1495 |
|
1496 |
|
1497 | reduce<TResult>(callback: MemoListIterator<T, TResult, List<T>>, accumulator: TResult): ExpChain<TResult>;
|
1498 | |
1499 |
|
1500 |
|
1501 | reduce(callback: MemoListIterator<T, T, List<T>>): ExpChain<T | undefined>;
|
1502 | }
|
1503 | interface ObjectChain<T> {
|
1504 | |
1505 |
|
1506 |
|
1507 | reduce<TResult>(callback: MemoObjectIterator<T[keyof T], TResult, T>, accumulator: TResult): ExpChain<TResult>;
|
1508 | |
1509 |
|
1510 |
|
1511 | reduce(callback: MemoObjectIterator<T[keyof T], T[keyof T], T>): ExpChain<T[keyof T] | undefined>;
|
1512 | }
|
1513 | interface LoDashStatic {
|
1514 | |
1515 |
|
1516 |
|
1517 |
|
1518 |
|
1519 |
|
1520 |
|
1521 |
|
1522 | reduceRight<T, TResult>(collection: T[] | null | undefined, callback: MemoListIterator<T, TResult, T[]>, accumulator: TResult): TResult;
|
1523 | |
1524 |
|
1525 |
|
1526 | reduceRight<T, TResult>(collection: List<T> | null | undefined, callback: MemoListIterator<T, TResult, List<T>>, accumulator: TResult): TResult;
|
1527 | |
1528 |
|
1529 |
|
1530 | reduceRight<T extends object, TResult>(collection: T | null | undefined, callback: MemoObjectIterator<T[keyof T], TResult, T>, accumulator: TResult): TResult;
|
1531 | |
1532 |
|
1533 |
|
1534 | reduceRight<T>(collection: T[] | null | undefined, callback: MemoListIterator<T, T, T[]>): T | undefined;
|
1535 | |
1536 |
|
1537 |
|
1538 | reduceRight<T>(collection: List<T> | null | undefined, callback: MemoListIterator<T, T, List<T>>): T | undefined;
|
1539 | |
1540 |
|
1541 |
|
1542 | reduceRight<T extends object>(collection: T | null | undefined, callback: MemoObjectIterator<T[keyof T], T[keyof T], T>): T[keyof T] | undefined;
|
1543 | }
|
1544 | interface Collection<T> {
|
1545 | |
1546 |
|
1547 |
|
1548 | reduceRight<TResult>(callback: MemoListIterator<T, TResult, List<T>>, accumulator: TResult): TResult;
|
1549 | |
1550 |
|
1551 |
|
1552 | reduceRight(callback: MemoListIterator<T, T, List<T>>): T | undefined;
|
1553 | }
|
1554 | interface Object<T> {
|
1555 | |
1556 |
|
1557 |
|
1558 | reduceRight<TResult>(callback: MemoObjectIterator<T[keyof T], TResult, T>, accumulator: TResult): TResult;
|
1559 | |
1560 |
|
1561 |
|
1562 | reduceRight(callback: MemoObjectIterator<T[keyof T], T[keyof T], T>): T[keyof T] | undefined;
|
1563 | }
|
1564 | interface CollectionChain<T> {
|
1565 | |
1566 |
|
1567 |
|
1568 | reduceRight<TResult>(callback: MemoListIterator<T, TResult, List<T>>, accumulator: TResult): ExpChain<TResult>;
|
1569 | |
1570 |
|
1571 |
|
1572 | reduceRight(callback: MemoListIterator<T, T, List<T>>): ExpChain<T | undefined>;
|
1573 | }
|
1574 | interface ObjectChain<T> {
|
1575 | |
1576 |
|
1577 |
|
1578 | reduceRight<TResult>(callback: MemoObjectIterator<T[keyof T], TResult, T>, accumulator: TResult): ExpChain<TResult>;
|
1579 | |
1580 |
|
1581 |
|
1582 | reduceRight(callback: MemoObjectIterator<T[keyof T], T[keyof T], T>): ExpChain<T[keyof T] | undefined>;
|
1583 | }
|
1584 | interface LoDashStatic {
|
1585 | |
1586 |
|
1587 |
|
1588 |
|
1589 |
|
1590 |
|
1591 |
|
1592 |
|
1593 | reject(collection: string | null | undefined, predicate?: StringIterator<boolean>): string[];
|
1594 | |
1595 |
|
1596 |
|
1597 | reject<T>(collection: List<T> | null | undefined, predicate?: ListIterateeCustom<T, boolean>): T[];
|
1598 | |
1599 |
|
1600 |
|
1601 | reject<T extends object>(collection: T | null | undefined, predicate?: ObjectIterateeCustom<T, boolean>): Array<T[keyof T]>;
|
1602 | }
|
1603 | interface String {
|
1604 | |
1605 |
|
1606 |
|
1607 | reject(predicate?: StringIterator<boolean>): Collection<string>;
|
1608 | }
|
1609 | interface Collection<T> {
|
1610 | |
1611 |
|
1612 |
|
1613 | reject(predicate?: ListIterateeCustom<T, boolean>): Collection<T>;
|
1614 | }
|
1615 | interface Object<T> {
|
1616 | |
1617 |
|
1618 |
|
1619 | reject(predicate?: ObjectIterateeCustom<T, boolean>): Collection<T[keyof T]>;
|
1620 | }
|
1621 | interface StringChain {
|
1622 | |
1623 |
|
1624 |
|
1625 | reject(predicate?: StringIterator<boolean>): CollectionChain<string>;
|
1626 | }
|
1627 | interface StringNullableChain {
|
1628 | |
1629 |
|
1630 |
|
1631 | reject(predicate?: StringIterator<boolean>): CollectionChain<string>;
|
1632 | }
|
1633 | interface CollectionChain<T> {
|
1634 | |
1635 |
|
1636 |
|
1637 | reject(predicate?: ListIterateeCustom<T, boolean>): CollectionChain<T>;
|
1638 | }
|
1639 | interface ObjectChain<T> {
|
1640 | |
1641 |
|
1642 |
|
1643 | reject(predicate?: ObjectIterateeCustom<T, boolean>): CollectionChain<T[keyof T]>;
|
1644 | }
|
1645 | interface LoDashStatic {
|
1646 | |
1647 |
|
1648 |
|
1649 |
|
1650 |
|
1651 |
|
1652 | sample<T>(collection: readonly [T, ...T[]]): T;
|
1653 | |
1654 |
|
1655 |
|
1656 | sample<T>(collection: Dictionary<T> | NumericDictionary<T> | null | undefined): T | undefined;
|
1657 | |
1658 |
|
1659 |
|
1660 | sample<T extends object>(collection: T | null | undefined): T[keyof T] | undefined;
|
1661 | }
|
1662 | interface String {
|
1663 | |
1664 |
|
1665 |
|
1666 | sample(): string | undefined;
|
1667 | }
|
1668 | interface Collection<T> {
|
1669 | |
1670 |
|
1671 |
|
1672 | sample(): T | undefined;
|
1673 | }
|
1674 | interface Object<T> {
|
1675 | |
1676 |
|
1677 |
|
1678 | sample(): T[keyof T] | undefined;
|
1679 | }
|
1680 | interface StringChain {
|
1681 | |
1682 |
|
1683 |
|
1684 | sample(): StringNullableChain;
|
1685 | }
|
1686 | interface StringNullableChain {
|
1687 | |
1688 |
|
1689 |
|
1690 | sample(): StringNullableChain;
|
1691 | }
|
1692 | interface CollectionChain<T> {
|
1693 | |
1694 |
|
1695 |
|
1696 | sample(): ExpChain<T | undefined>;
|
1697 | }
|
1698 | interface ObjectChain<T> {
|
1699 | |
1700 |
|
1701 |
|
1702 | sample(): ExpChain<T[keyof T] | undefined>;
|
1703 | }
|
1704 | interface LoDashStatic {
|
1705 | |
1706 |
|
1707 |
|
1708 |
|
1709 |
|
1710 |
|
1711 |
|
1712 | sampleSize<T>(collection: Dictionary<T> | NumericDictionary<T> | null | undefined, n?: number): T[];
|
1713 | |
1714 |
|
1715 |
|
1716 | sampleSize<T extends object>(collection: T | null | undefined, n?: number): Array<T[keyof T]>;
|
1717 | }
|
1718 | interface String {
|
1719 | |
1720 |
|
1721 |
|
1722 | sampleSize(n?: number): Collection<string>;
|
1723 | }
|
1724 | interface Collection<T> {
|
1725 | |
1726 |
|
1727 |
|
1728 | sampleSize(n?: number): Collection<T>;
|
1729 | }
|
1730 | interface Object<T> {
|
1731 | |
1732 |
|
1733 |
|
1734 | sampleSize(n?: number): Collection<T[keyof T]>;
|
1735 | }
|
1736 | interface StringChain {
|
1737 | |
1738 |
|
1739 |
|
1740 | sampleSize(n?: number): CollectionChain<string>;
|
1741 | }
|
1742 | interface StringNullableChain {
|
1743 | |
1744 |
|
1745 |
|
1746 | sampleSize(n?: number): CollectionChain<string>;
|
1747 | }
|
1748 | interface CollectionChain<T> {
|
1749 | |
1750 |
|
1751 |
|
1752 | sampleSize(n?: number): CollectionChain<T>;
|
1753 | }
|
1754 | interface ObjectChain<T> {
|
1755 | |
1756 |
|
1757 |
|
1758 | sampleSize(n?: number): CollectionChain<T[keyof T]>;
|
1759 | }
|
1760 | interface LoDashStatic {
|
1761 | |
1762 |
|
1763 |
|
1764 |
|
1765 |
|
1766 |
|
1767 | shuffle<T>(collection: List<T> | null | undefined): T[];
|
1768 | |
1769 |
|
1770 |
|
1771 | shuffle<T extends object>(collection: T | null | undefined): Array<T[keyof T]>;
|
1772 | }
|
1773 | interface String {
|
1774 | |
1775 |
|
1776 |
|
1777 | shuffle(): Collection<string>;
|
1778 | }
|
1779 | interface Collection<T> {
|
1780 | |
1781 |
|
1782 |
|
1783 | shuffle(): Collection<T>;
|
1784 | }
|
1785 | interface Object<T> {
|
1786 | |
1787 |
|
1788 |
|
1789 | shuffle(): Collection<T[keyof T]>;
|
1790 | }
|
1791 | interface StringChain {
|
1792 | |
1793 |
|
1794 |
|
1795 | shuffle(): CollectionChain<string>;
|
1796 | }
|
1797 | interface StringNullableChain {
|
1798 | |
1799 |
|
1800 |
|
1801 | shuffle(): CollectionChain<string>;
|
1802 | }
|
1803 | interface CollectionChain<T> {
|
1804 | |
1805 |
|
1806 |
|
1807 | shuffle(): CollectionChain<T>;
|
1808 | }
|
1809 | interface ObjectChain<T> {
|
1810 | |
1811 |
|
1812 |
|
1813 | shuffle(): CollectionChain<T[keyof T]>;
|
1814 | }
|
1815 | interface LoDashStatic {
|
1816 | |
1817 |
|
1818 |
|
1819 |
|
1820 |
|
1821 |
|
1822 |
|
1823 | size(collection: object | string | null | undefined): number;
|
1824 | }
|
1825 | interface LoDashImplicitWrapper<TValue> {
|
1826 | |
1827 |
|
1828 |
|
1829 | size(): number;
|
1830 | }
|
1831 | interface LoDashExplicitWrapper<TValue> {
|
1832 | |
1833 |
|
1834 |
|
1835 | size(): PrimitiveChain<number>;
|
1836 | }
|
1837 | interface LoDashStatic {
|
1838 | |
1839 |
|
1840 |
|
1841 |
|
1842 |
|
1843 |
|
1844 |
|
1845 |
|
1846 | some<T>(collection: List<T> | null | undefined, predicate?: ListIterateeCustom<T, boolean>): boolean;
|
1847 | |
1848 |
|
1849 |
|
1850 | some<T extends object>(collection: T | null | undefined, predicate?: ObjectIterateeCustom<T, boolean>): boolean;
|
1851 | }
|
1852 | interface Collection<T> {
|
1853 | |
1854 |
|
1855 |
|
1856 | some(predicate?: ListIterateeCustom<T, boolean>): boolean;
|
1857 | }
|
1858 | interface Object<T> {
|
1859 | |
1860 |
|
1861 |
|
1862 | some(predicate?: ObjectIterateeCustom<T, boolean>): boolean;
|
1863 | }
|
1864 | interface CollectionChain<T> {
|
1865 | |
1866 |
|
1867 |
|
1868 | some(predicate?: ListIterateeCustom<T, boolean>): PrimitiveChain<boolean>;
|
1869 | }
|
1870 | interface ObjectChain<T> {
|
1871 | |
1872 |
|
1873 |
|
1874 | some(predicate?: ObjectIterateeCustom<T, boolean>): PrimitiveChain<boolean>;
|
1875 | }
|
1876 | interface LoDashStatic {
|
1877 | |
1878 |
|
1879 |
|
1880 |
|
1881 |
|
1882 |
|
1883 |
|
1884 |
|
1885 |
|
1886 |
|
1887 |
|
1888 |
|
1889 |
|
1890 |
|
1891 |
|
1892 |
|
1893 |
|
1894 |
|
1895 |
|
1896 |
|
1897 |
|
1898 |
|
1899 |
|
1900 |
|
1901 |
|
1902 |
|
1903 |
|
1904 |
|
1905 |
|
1906 |
|
1907 |
|
1908 | sortBy<T>(collection: List<T> | null | undefined, ...iteratees: Array<Many<ListIteratee<T>>>): T[];
|
1909 | |
1910 |
|
1911 |
|
1912 | sortBy<T extends object>(collection: T | null | undefined, ...iteratees: Array<Many<ObjectIteratee<T>>>): Array<T[keyof T]>;
|
1913 | }
|
1914 | interface Collection<T> {
|
1915 | |
1916 |
|
1917 |
|
1918 | sortBy(...iteratees: Array<Many<ListIteratee<T>>>): Collection<T>;
|
1919 | }
|
1920 | interface Object<T> {
|
1921 | |
1922 |
|
1923 |
|
1924 | sortBy(...iteratees: Array<Many<ObjectIteratee<T>>>): Collection<T[keyof T]>;
|
1925 | }
|
1926 | interface CollectionChain<T> {
|
1927 | |
1928 |
|
1929 |
|
1930 | sortBy(...iteratees: Array<Many<ListIteratee<T>>>): CollectionChain<T>;
|
1931 | }
|
1932 | interface ObjectChain<T> {
|
1933 | |
1934 |
|
1935 |
|
1936 | sortBy(...iteratees: Array<Many<ObjectIteratee<T>>>): CollectionChain<T[keyof T]>;
|
1937 | }
|
1938 | }
|