forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
lodash.d.ts
6637 lines (5907 loc) · 187 KB
/
lodash.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Type definitions for Lo-Dash
// Project: http://lodash.com/
// Definitions by: Brian Zengel <https://github.com/bczengel>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare var _: _.LoDashStatic;
declare module _ {
interface LoDashStatic {
/**
* Creates a lodash object which wraps the given value to enable intuitive method chaining.
*
* In addition to Lo-Dash methods, wrappers also have the following Array methods:
* concat, join, pop, push, reverse, shift, slice, sort, splice, and unshift
*
* Chaining is supported in custom builds as long as the value method is implicitly or
* explicitly included in the build.
*
* The chainable wrapper functions are:
* after, assign, bind, bindAll, bindKey, chain, chunk, compact, compose, concat, countBy,
* createCallback, curry, debounce, defaults, defer, delay, difference, filter, flatten,
* forEach, forEachRight, forIn, forInRight, forOwn, forOwnRight, functions, groupBy,
* indexBy, initial, intersection, invert, invoke, keys, map, max, memoize, merge, min,
* object, omit, once, pairs, partial, partialRight, pick, pluck, pull, push, range, reject,
* remove, rest, reverse, shuffle, slice, sort, sortBy, splice, tap, throttle, times,
* toArray, transform, union, uniq, unshift, unzip, values, where, without, wrap, and zip
*
* The non-chainable wrapper functions are:
* clone, cloneDeep, contains, escape, every, find, findIndex, findKey, findLast,
* findLastIndex, findLastKey, has, identity, indexOf, isArguments, isArray, isBoolean,
* isDate, isElement, isEmpty, isEqual, isFinite, isFunction, isNaN, isNull, isNumber,
* isObject, isPlainObject, isRegExp, isString, isUndefined, join, lastIndexOf, mixin,
* noConflict, parseInt, pop, random, reduce, reduceRight, result, shift, size, some,
* sortedIndex, runInContext, template, unescape, uniqueId, and value
*
* The wrapper functions first and last return wrapped values when n is provided, otherwise
* they return unwrapped values.
*
* Explicit chaining can be enabled by using the _.chain method.
**/
(value: number): LoDashWrapper<number>;
(value: string): LoDashWrapper<string>;
(value: boolean): LoDashWrapper<boolean>;
(value: Array<number>): LoDashNumberArrayWrapper;
<T>(value: Array<T>): LoDashArrayWrapper<T>;
<T extends {}>(value: T): LoDashObjectWrapper<T>;
(value: any): LoDashWrapper<any>;
/**
* The semantic version number.
**/
VERSION: string;
/**
* An object used to flag environments features.
**/
support: Support;
/**
* By default, the template delimiters used by Lo-Dash are similar to those in embedded Ruby
* (ERB). Change the following template settings to use alternative delimiters.
**/
templateSettings: TemplateSettings;
}
/**
* By default, the template delimiters used by Lo-Dash are similar to those in embedded Ruby
* (ERB). Change the following template settings to use alternative delimiters.
**/
interface TemplateSettings {
/**
* The "escape" delimiter.
**/
escape?: RegExp;
/**
* The "evaluate" delimiter.
**/
evaluate?: RegExp;
/**
* An object to import into the template as local variables.
**/
imports?: Dictionary<any>;
/**
* The "interpolate" delimiter.
**/
interpolate?: RegExp;
/**
* Used to reference the data object in the template text.
**/
variable?: string;
}
/**
* An object used to flag environments features.
**/
interface Support {
/**
* Detect if an arguments object's [[Class]] is resolvable (all but Firefox < 4, IE < 9).
**/
argsClass: boolean;
/**
* Detect if arguments objects are Object objects (all but Narwhal and Opera < 10.5).
**/
argsObject: boolean;
/**
* Detect if name or message properties of Error.prototype are enumerable by default.
* (IE < 9, Safari < 5.1)
**/
enumErrorProps: boolean;
/**
* Detect if Function#bind exists and is inferred to be fast (all but V8).
**/
fastBind: boolean;
/**
* Detect if functions can be decompiled by Function#toString (all but PS3 and older Opera
* mobile browsers & avoided in Windows 8 apps).
**/
funcDecomp: boolean;
/**
* Detect if Function#name is supported (all but IE).
**/
funcNames: boolean;
/**
* Detect if arguments object indexes are non-enumerable (Firefox < 4, IE < 9, PhantomJS,
* Safari < 5.1).
**/
nonEnumArgs: boolean;
/**
* Detect if properties shadowing those on Object.prototype are non-enumerable.
*
* In IE < 9 an objects own properties, shadowing non-enumerable ones, are made
* non-enumerable as well (a.k.a the JScript [[DontEnum]] bug).
**/
nonEnumShadows: boolean;
/**
* Detect if own properties are iterated after inherited properties (all but IE < 9).
**/
ownLast: boolean;
/**
* Detect if Array#shift and Array#splice augment array-like objects correctly.
*
* Firefox < 10, IE compatibility mode, and IE < 9 have buggy Array shift() and splice()
* functions that fail to remove the last element, value[0], of array-like objects even
* though the length property is set to 0. The shift() method is buggy in IE 8 compatibility
* mode, while splice() is buggy regardless of mode in IE < 9 and buggy in compatibility mode
* in IE 9.
**/
spliceObjects: boolean;
/**
* Detect lack of support for accessing string characters by index.
*
* IE < 8 can't access characters by index and IE 8 can only access characters by index on
* string literals.
**/
unindexedChars: boolean;
}
interface LoDashWrapperBase<T, TWrapper> {
/**
* Produces the toString result of the wrapped value.
* @return Returns the string result.
**/
toString(): string;
/**
* Extracts the wrapped value.
* @return The wrapped value.
**/
valueOf(): T;
/**
* @see valueOf
**/
value(): T;
}
interface LoDashWrapper<T> extends LoDashWrapperBase<T, LoDashWrapper<T>> { }
interface LoDashObjectWrapper<T> extends LoDashWrapperBase<T, LoDashObjectWrapper<T>> { }
interface LoDashArrayWrapper<T> extends LoDashWrapperBase<T[], LoDashArrayWrapper<T>> {
concat(...items: T[]): LoDashArrayWrapper<T>;
join(seperator?: string): LoDashWrapper<string>;
pop(): LoDashWrapper<T>;
push(...items: T[]): void;
reverse(): LoDashArrayWrapper<T>;
shift(): LoDashWrapper<T>;
slice(start: number, end?: number): LoDashArrayWrapper<T>;
sort(compareFn?: (a: T, b: T) => number): LoDashArrayWrapper<T>;
splice(start: number): LoDashArrayWrapper<T>;
splice(start: number, deleteCount: number, ...items: any[]): LoDashArrayWrapper<T>;
unshift(...items: any[]): LoDashWrapper<number>;
}
interface LoDashNumberArrayWrapper extends LoDashArrayWrapper<number> { }
//_.chain
interface LoDashStatic {
/**
* Creates a lodash object that wraps the given value with explicit method chaining enabled.
* @param value The value to wrap.
* @return The wrapper object.
**/
chain(value: number): LoDashWrapper<number>;
chain(value: string): LoDashWrapper<string>;
chain(value: boolean): LoDashWrapper<boolean>;
chain<T>(value: Array<T>): LoDashArrayWrapper<T>;
chain<T extends {}>(value: T): LoDashObjectWrapper<T>;
chain(value: any): LoDashWrapper<any>;
}
interface LoDashWrapperBase<T, TWrapper> {
/**
* Enables explicit method chaining on the wrapper object.
* @see _.chain
* @return The wrapper object.
**/
chain(): TWrapper;
}
//_.tap
interface LoDashStatic {
/**
* Invokes interceptor with the value as the first argument and then returns value. The
* purpose of this method is to "tap into" a method chain in order to perform operations on
* intermediate results within the chain.
* @param value The value to provide to interceptor
* @param interceptor The function to invoke.
* @return value
**/
tap<T>(
value: T,
interceptor: (value: T) => void): T;
}
interface LoDashWrapperBase<T, TWrapper> {
/**
* @see _.tap
**/
tap(interceptor: (value: T) => void): TWrapper;
}
/*********
* Arrays *
**********/
//_.chunk
interface LoDashStatic {
/**
* Creates an array of elements split into groups the length of size. If collection can't be
* split evenly, the final chunk will be the remaining elements.
* @param array The array to process.
* @param size The length of each chunk.
* @return Returns the new array containing chunks.
**/
chunk<T>(array: Array<T>, size?: number): T[][];
/**
* @see _.chunk
**/
chunk<T>(array: List<T>, size?: number): T[][];
}
interface LoDashArrayWrapper<T> {
/**
* @see _.chunk
**/
chunk(size?: number): LoDashArrayWrapper<T>;
}
//_.compact
interface LoDashStatic {
/**
* Returns a copy of the array with all falsy values removed. In JavaScript, false, null, 0, "",
* undefined and NaN are all falsy.
* @param array Array to compact.
* @return (Array) Returns a new array of filtered values.
**/
compact<T>(array?: Array<T>): T[];
/**
* @see _.compact
**/
compact<T>(array?: List<T>): T[];
}
interface LoDashArrayWrapper<T> {
/**
* @see _.compact
**/
compact(): LoDashArrayWrapper<T>;
}
//_.difference
interface LoDashStatic {
/**
* Creates an array excluding all values of the provided arrays using strict equality for comparisons
* , i.e. ===.
* @param array The array to process
* @param others The arrays of values to exclude.
* @return Returns a new array of filtered values.
**/
difference<T>(
array?: Array<T>,
...others: Array<T>[]): T[];
/**
* @see _.difference
**/
difference<T>(
array?: List<T>,
...others: List<T>[]): T[];
}
interface LoDashArrayWrapper<T> {
/**
* @see _.difference
**/
difference(
...others: Array<T>[]): LoDashArrayWrapper<T>;
/**
* @see _.difference
**/
difference(
...others: List<T>[]): LoDashArrayWrapper<T>;
}
//_.findIndex
interface LoDashStatic {
/**
* This method is like _.find except that it returns the index of the first element that passes
* the callback check, instead of the element itself.
* @param array The array to search.
* @param {(Function|Object|string)} callback The function called per iteration. If a property name or object is provided it will be
* used to create a ".pluck" or ".where" style callback, respectively.
* @param thisArg The this binding of callback.
* @return Returns the index of the found element, else -1.
**/
findIndex<T>(
array: Array<T>,
callback: ListIterator<T, boolean>,
thisArg?: any): number;
/**
* @see _.findIndex
**/
findIndex<T>(
array: List<T>,
callback: ListIterator<T, boolean>,
thisArg?: any): number;
/**
* @see _.findIndex
**/
findIndex<T>(
array: Array<T>,
pluckValue: string): number;
/**
* @see _.findIndex
**/
findIndex<T>(
array: List<T>,
pluckValue: string): number;
/**
* @see _.findIndex
**/
findIndex<W, T>(
array: Array<T>,
whereDictionary: W): number;
/**
* @see _.findIndex
**/
findIndex<W, T>(
array: List<T>,
whereDictionary: W): number;
}
//_.findLastIndex
interface LoDashStatic {
/**
* This method is like _.findIndex except that it iterates over elements of a collection from right to left.
* @param array The array to search.
* @param {(Function|Object|string)} callback The function called per iteration. If a property name or object is provided it will be
* used to create a ".pluck" or ".where" style callback, respectively.
* @param thisArg The this binding of callback.
* @return Returns the index of the found element, else -1.
**/
findLastIndex<T>(
array: Array<T>,
callback: ListIterator<T, boolean>,
thisArg?: any): number;
/**
* @see _.findLastIndex
**/
findLastIndex<T>(
array: List<T>,
callback: ListIterator<T, boolean>,
thisArg?: any): number;
/**
* @see _.findLastIndex
**/
findLastIndex<T>(
array: Array<T>,
pluckValue: string): number;
/**
* @see _.findLastIndex
**/
findLastIndex<T>(
array: List<T>,
pluckValue: string): number;
/**
* @see _.findLastIndex
**/
findLastIndex<T>(
array: Array<T>,
whereDictionary: Dictionary<any>): number;
/**
* @see _.findLastIndex
**/
findLastIndex<T>(
array: List<T>,
whereDictionary: Dictionary<any>): number;
}
//_.first
interface LoDashStatic {
/**
* Gets the first element or first n elements of an array. If a callback is provided
* elements at the beginning of the array are returned as long as the callback returns
* truey. The callback is bound to thisArg and invoked with three arguments; (value,
* index, array).
*
* If a property name is provided for callback the created "_.pluck" style callback
* will return the property value of the given element.
*
* If an object is provided for callback the created "_.where" style callback will return ]
* true for elements that have the properties of the given object, else false.
* @param array Retrieves the first element of this array.
* @return Returns the first element of `array`.
**/
first<T>(array?: Array<T>): T;
/**
* @see _.first
**/
first<T>(array?: List<T>): T;
/**
* @see _.first
* @param n The number of elements to return.
**/
first<T>(
array: Array<T>,
n: number): T[];
/**
* @see _.first
* @param n The number of elements to return.
**/
first<T>(
array: List<T>,
n: number): T[];
/**
* @see _.first
* @param callback The function called per element.
* @param [thisArg] The this binding of callback.
**/
first<T>(
array: Array<T>,
callback: ListIterator<T, boolean>,
thisArg?: any): T[];
/**
* @see _.first
* @param callback The function called per element.
* @param [thisArg] The this binding of callback.
**/
first<T>(
array: List<T>,
callback: ListIterator<T, boolean>,
thisArg?: any): T[];
/**
* @see _.first
* @param pluckValue "_.pluck" style callback value
**/
first<T>(
array: Array<T>,
pluckValue: string): T[];
/**
* @see _.first
* @param pluckValue "_.pluck" style callback value
**/
first<T>(
array: List<T>,
pluckValue: string): T[];
/**
* @see _.first
* @param whereValue "_.where" style callback value
**/
first<W, T>(
array: Array<T>,
whereValue: W): T[];
/**
* @see _.first
* @param whereValue "_.where" style callback value
**/
first<W, T>(
array: List<T>,
whereValue: W): T[];
/**
* @see _.first
**/
head<T>(array: Array<T>): T;
/**
* @see _.first
**/
head<T>(array: List<T>): T;
/**
* @see _.first
**/
head<T>(
array: Array<T>,
n: number): T[];
/**
* @see _.first
**/
head<T>(
array: List<T>,
n: number): T[];
/**
* @see _.first
**/
head<T>(
array: Array<T>,
callback: ListIterator<T, boolean>,
thisArg?: any): T[];
/**
* @see _.first
**/
head<T>(
array: List<T>,
callback: ListIterator<T, boolean>,
thisArg?: any): T[];
/**
* @see _.first
**/
head<T>(
array: Array<T>,
pluckValue: string): T[];
/**
* @see _.first
**/
head<T>(
array: List<T>,
pluckValue: string): T[];
/**
* @see _.first
**/
head<W, T>(
array: Array<T>,
whereValue: W): T[];
/**
* @see _.first
**/
head<W, T>(
array: List<T>,
whereValue: W): T[];
/**
* @see _.first
**/
take<T>(array: Array<T>): T;
/**
* @see _.first
**/
take<T>(array: List<T>): T;
/**
* @see _.first
**/
take<T>(
array: Array<T>,
n: number): T[];
/**
* @see _.first
**/
take<T>(
array: List<T>,
n: number): T[];
/**
* @see _.first
**/
take<T>(
array: Array<T>,
callback: ListIterator<T, boolean>,
thisArg?: any): T[];
/**
* @see _.first
**/
take<T>(
array: List<T>,
callback: ListIterator<T, boolean>,
thisArg?: any): T[];
/**
* @see _.first
**/
take<T>(
array: Array<T>,
pluckValue: string): T[];
/**
* @see _.first
**/
take<T>(
array: List<T>,
pluckValue: string): T[];
/**
* @see _.first
**/
take<W, T>(
array: Array<T>,
whereValue: W): T[];
/**
* @see _.first
**/
take<W, T>(
array: List<T>,
whereValue: W): T[];
}
interface LoDashArrayWrapper<T> {
/**
* @see _.first
**/
first(): T;
/**
* @see _.first
* @param n The number of elements to return.
**/
first(n: number): LoDashArrayWrapper<T>;
/**
* @see _.first
* @param callback The function called per element.
* @param [thisArg] The this binding of callback.
**/
first(
callback: ListIterator<T, boolean>,
thisArg?: any): LoDashArrayWrapper<T>;
/**
* @see _.first
* @param pluckValue "_.pluck" style callback value
**/
first(pluckValue: string): LoDashArrayWrapper<T>;
/**
* @see _.first
* @param whereValue "_.where" style callback value
**/
first<W>(whereValue: W): LoDashArrayWrapper<T>;
/**
* @see _.first
**/
head(): T;
/**
* @see _.first
* @param n The number of elements to return.
**/
head(n: number): LoDashArrayWrapper<T>;
/**
* @see _.first
* @param callback The function called per element.
* @param [thisArg] The this binding of callback.
**/
head(
callback: ListIterator<T, boolean>,
thisArg?: any): LoDashArrayWrapper<T>;
/**
* @see _.first
* @param pluckValue "_.pluck" style callback value
**/
head(pluckValue: string): LoDashArrayWrapper<T>;
/**
* @see _.first
* @param whereValue "_.where" style callback value
**/
head<W>(whereValue: W): LoDashArrayWrapper<T>;
/**
* @see _.first
**/
take(): T;
/**
* @see _.first
* @param n The number of elements to return.
**/
take(n: number): LoDashArrayWrapper<T>;
/**
* @see _.first
* @param callback The function called per element.
* @param [thisArg] The this binding of callback.
**/
take(
callback: ListIterator<T, boolean>,
thisArg?: any): LoDashArrayWrapper<T>;
/**
* @see _.first
* @param pluckValue "_.pluck" style callback value
**/
take(pluckValue: string): LoDashArrayWrapper<T>;
/**
* @see _.first
* @param whereValue "_.where" style callback value
**/
take<W>(whereValue: W): LoDashArrayWrapper<T>;
}
//_.flatten
interface LoDashStatic {
/**
* Flattens a nested array (the nesting can be to any depth). If isShallow is truey, the
* array will only be flattened a single level. If a callback is provided each element of
* the array is passed through the callback before flattening. The callback is bound to
* thisArg and invoked with three arguments; (value, index, array).
*
* If a property name is provided for callback the created "_.pluck" style callback will
* return the property value of the given element.
*
* If an object is provided for callback the created "_.where" style callback will return
* true for elements that have the properties of the given object, else false.
* @param array The array to flatten.
* @param shallow If true then only flatten one level, optional, default = false.
* @return `array` flattened.
**/
flatten<T>(array: Array<any>, isShallow?: boolean): T[];
/**
* @see _.flatten
**/
flatten<T>(array: List<any>, isShallow?: boolean): T[];
/**
* @see _.flatten
**/
flatten<T>(
array: Array<any>,
isShallow: boolean,
callback: ListIterator<any, T>,
thisArg?: any): T[];
/**
* @see _.flatten
**/
flatten<T>(
array: List<any>,
isShallow: boolean,
callback: ListIterator<any, T>,
thisArg?: any): T[];
/**
* @see _.flatten
**/
flatten<T>(
array: Array<any>,
callback: ListIterator<any, T>,
thisArg?: any): T[];
/**
* @see _.flatten
**/
flatten<T>(
array: List<any>,
callback: ListIterator<any, T>,
thisArg?: any): T[];
/**
* @see _.flatten
**/
flatten<W, T>(
array: Array<any>,
isShallow: boolean,
whereValue: W): T[];
/**
* @see _.flatten
**/
flatten<W, T>(
array: List<any>,
isShallow: boolean,
whereValue: W): T[];
/**
* @see _.flatten
**/
flatten<W, T>(
array: Array<any>,
whereValue: W): T[];
/**
* @see _.flatten
**/
flatten<W, T>(
array: List<any>,
whereValue: W): T[];
/**
* @see _.flatten
**/
flatten<T>(
array: Array<any>,
isShallow: boolean,
pluckValue: string): T[];
/**
* @see _.flatten
**/
flatten<T>(
array: List<any>,
isShallow: boolean,
pluckValue: string): T[];
/**
* @see _.flatten
**/
flatten<T>(
array: Array<any>,
pluckValue: string): T[];
/**
* @see _.flatten
**/
flatten<T>(
array: List<any>,
pluckValue: string): T[];
}
interface LoDashArrayWrapper<T> {
/**
* @see _.flatten
**/
flatten<Flat>(isShallow?: boolean): LoDashArrayWrapper<Flat>;
/**
* @see _.flatten
**/
flatten<Flat>(
isShallow: boolean,
callback: ListIterator<T, Flat>,
thisArg?: any): LoDashArrayWrapper<Flat>;
/**
* @see _.flatten
**/
flatten<Flat>(
callback: ListIterator<T, Flat>,
thisArg?: any): LoDashArrayWrapper<Flat>;
/**
* @see _.flatten
**/
flatten<Flat>(
isShallow: boolean,
pluckValue: string): LoDashArrayWrapper<Flat>;
/**
* @see _.flatten
**/
flatten<Flat>(
pluckValue: string): LoDashArrayWrapper<Flat>;
/**
* @see _.flatten
**/
flatten<Flat, W>(
isShallow: boolean,
whereValue: W): LoDashArrayWrapper<Flat>;
/**
* @see _.flatten
**/
flatten<Flat, W>(
whereValue: W): LoDashArrayWrapper<Flat>;
}
//_.indexOf
interface LoDashStatic {
/**
* Gets the index at which the first occurrence of value is found using strict equality
* for comparisons, i.e. ===. If the array is already sorted providing true for fromIndex
* will run a faster binary search.
* @param array The array to search.
* @param value The value to search for.
* @param fromIndex The index to search from.
* @return The index of `value` within `array`.
**/
indexOf<T>(
array: Array<T>,
value: T): number;
/**
* @see _.indexOf
**/
indexOf<T>(
array: List<T>,
value: T): number;
/**
* @see _.indexOf
* @param fromIndex The index to search from
**/
indexOf<T>(
array: Array<T>,
value: T,
fromIndex: number): number;
/**
* @see _.indexOf
* @param fromIndex The index to search from
**/
indexOf<T>(
array: List<T>,
value: T,
fromIndex: number): number;
/**
* @see _.indexOf
* @param isSorted True to perform a binary search on a sorted array.
**/
indexOf<T>(
array: Array<T>,
value: T,
isSorted: boolean): number;
/**
* @see _.indexOf
* @param isSorted True to perform a binary search on a sorted array.
**/
indexOf<T>(
array: List<T>,
value: T,
isSorted: boolean): number;
}
//_.initial
interface LoDashStatic {
/**