@types/lodash 4.14.100 → 4.14.104

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (327) hide show
  1. lodash/README.md +2 -2
  2. lodash/common/array.d.ts +3845 -0
  3. lodash/common/collection.d.ts +3091 -0
  4. lodash/common/common.d.ts +3 -3
  5. lodash/{date/now.d.ts → common/date.d.ts} +3 -1
  6. lodash/common/function.d.ts +1367 -0
  7. lodash/common/lang.d.ts +1937 -0
  8. lodash/common/math.d.ts +536 -0
  9. lodash/{number/random.d.ts → common/number.d.ts} +98 -1
  10. lodash/common/object.d.ts +3653 -0
  11. lodash/common/seq.d.ts +198 -0
  12. lodash/common/string.d.ts +1059 -0
  13. lodash/common/util.d.ts +1455 -0
  14. lodash/index.d.ts +11 -338
  15. lodash/package.json +2 -7
  16. lodash/array/chunk.d.ts +0 -37
  17. lodash/array/compact.d.ts +0 -27
  18. lodash/array/concat.d.ts +0 -39
  19. lodash/array/difference.d.ts +0 -37
  20. lodash/array/differenceBy.d.ts +0 -243
  21. lodash/array/differenceWith.d.ts +0 -132
  22. lodash/array/drop.d.ts +0 -27
  23. lodash/array/dropRight.d.ts +0 -30
  24. lodash/array/dropRightWhile.d.ts +0 -47
  25. lodash/array/dropWhile.d.ts +0 -47
  26. lodash/array/fill.d.ts +0 -124
  27. lodash/array/findIndex.d.ts +0 -50
  28. lodash/array/findLastIndex.d.ts +0 -49
  29. lodash/array/first.d.ts +0 -23
  30. lodash/array/flatten.d.ts +0 -43
  31. lodash/array/flattenDeep.d.ts +0 -26
  32. lodash/array/flattenDepth.d.ts +0 -27
  33. lodash/array/fromPairs.d.ts +0 -59
  34. lodash/array/head.d.ts +0 -28
  35. lodash/array/indexOf.d.ts +0 -53
  36. lodash/array/initial.d.ts +0 -26
  37. lodash/array/intersection.d.ts +0 -33
  38. lodash/array/intersectionBy.d.ts +0 -134
  39. lodash/array/intersectionWith.d.ts +0 -133
  40. lodash/array/join.d.ts +0 -30
  41. lodash/array/last.d.ts +0 -26
  42. lodash/array/lastIndexOf.d.ts +0 -40
  43. lodash/array/nth.d.ts +0 -36
  44. lodash/array/pull.d.ts +0 -46
  45. lodash/array/pullAll.d.ts +0 -54
  46. lodash/array/pullAllBy.d.ts +0 -77
  47. lodash/array/pullAllWith.d.ts +0 -77
  48. lodash/array/pullAt.d.ts +0 -34
  49. lodash/array/remove.d.ts +0 -49
  50. lodash/array/reverse.d.ts +0 -27
  51. lodash/array/slice.d.ts +0 -40
  52. lodash/array/sortedIndex.d.ts +0 -45
  53. lodash/array/sortedIndexBy.d.ts +0 -97
  54. lodash/array/sortedIndexOf.d.ts +0 -42
  55. lodash/array/sortedLastIndex.d.ts +0 -43
  56. lodash/array/sortedLastIndexBy.d.ts +0 -48
  57. lodash/array/sortedLastIndexOf.d.ts +0 -42
  58. lodash/array/sortedUniq.d.ts +0 -34
  59. lodash/array/sortedUniqBy.d.ts +0 -66
  60. lodash/array/tail.d.ts +0 -26
  61. lodash/array/take.d.ts +0 -36
  62. lodash/array/takeRight.d.ts +0 -36
  63. lodash/array/takeRightWhile.d.ts +0 -47
  64. lodash/array/takeWhile.d.ts +0 -47
  65. lodash/array/union.d.ts +0 -33
  66. lodash/array/unionBy.d.ts +0 -164
  67. lodash/array/unionWith.d.ts +0 -103
  68. lodash/array/uniq.d.ts +0 -36
  69. lodash/array/uniqBy.d.ts +0 -71
  70. lodash/array/uniqWith.d.ts +0 -45
  71. lodash/array/unzip.d.ts +0 -27
  72. lodash/array/unzipWith.d.ts +0 -60
  73. lodash/array/without.d.ts +0 -36
  74. lodash/array/xor.d.ts +0 -32
  75. lodash/array/xorBy.d.ts +0 -104
  76. lodash/array/xorWith.d.ts +0 -103
  77. lodash/array/zip.d.ts +0 -129
  78. lodash/array/zipObject.d.ts +0 -58
  79. lodash/array/zipObjectDeep.d.ts +0 -36
  80. lodash/array/zipWith.d.ts +0 -187
  81. lodash/collection/countBy.d.ts +0 -121
  82. lodash/collection/each.d.ts +0 -40
  83. lodash/collection/eachRight.d.ts +0 -40
  84. lodash/collection/every.d.ts +0 -85
  85. lodash/collection/filter.d.ts +0 -143
  86. lodash/collection/find.d.ts +0 -131
  87. lodash/collection/findLast.d.ts +0 -121
  88. lodash/collection/flatMap.d.ts +0 -164
  89. lodash/collection/flatMapDeep.d.ts +0 -164
  90. lodash/collection/flatMapDepth.d.ts +0 -180
  91. lodash/collection/forEach.d.ts +0 -113
  92. lodash/collection/forEachRight.d.ts +0 -108
  93. lodash/collection/groupBy.d.ts +0 -121
  94. lodash/collection/includes.d.ts +0 -41
  95. lodash/collection/invokeMap.d.ts +0 -58
  96. lodash/collection/keyBy.d.ts +0 -121
  97. lodash/collection/map.d.ts +0 -180
  98. lodash/collection/orderBy.d.ts +0 -192
  99. lodash/collection/partition.d.ts +0 -72
  100. lodash/collection/reduce.d.ts +0 -220
  101. lodash/collection/reduceRight.d.ts +0 -217
  102. lodash/collection/reject.d.ts +0 -86
  103. lodash/collection/sample.d.ts +0 -74
  104. lodash/collection/sampleSize.d.ts +0 -60
  105. lodash/collection/shuffle.d.ts +0 -41
  106. lodash/collection/size.d.ts +0 -27
  107. lodash/collection/some.d.ts +0 -85
  108. lodash/collection/sortBy.d.ts +0 -84
  109. lodash/function/after.d.ts +0 -30
  110. lodash/function/ary.d.ts +0 -30
  111. lodash/function/before.d.ts +0 -32
  112. lodash/function/bind.d.ts +0 -50
  113. lodash/function/bindKey.d.ts +0 -51
  114. lodash/function/curry.d.ts +0 -203
  115. lodash/function/curryRight.d.ts +0 -132
  116. lodash/function/debounce.d.ts +0 -67
  117. lodash/function/defer.d.ts +0 -31
  118. lodash/function/delay.d.ts +0 -38
  119. lodash/function/flip.d.ts +0 -28
  120. lodash/function/memoize.d.ts +0 -37
  121. lodash/function/negate.d.ts +0 -20
  122. lodash/function/once.d.ts +0 -20
  123. lodash/function/overArgs.d.ts +0 -31
  124. lodash/function/partial.d.ts +0 -159
  125. lodash/function/partialRight.d.ts +0 -150
  126. lodash/function/rearg.d.ts +0 -28
  127. lodash/function/rest.d.ts +0 -33
  128. lodash/function/spread.d.ts +0 -44
  129. lodash/function/throttle.d.ts +0 -58
  130. lodash/function/unary.d.ts +0 -32
  131. lodash/function/wrap.d.ts +0 -61
  132. lodash/lang/castArray.d.ts +0 -26
  133. lodash/lang/clone.d.ts +0 -31
  134. lodash/lang/cloneDeep.d.ts +0 -26
  135. lodash/lang/cloneDeepWith.d.ts +0 -51
  136. lodash/lang/cloneWith.d.ts +0 -74
  137. lodash/lang/conformsTo.d.ts +0 -31
  138. lodash/lang/eq.d.ts +0 -55
  139. lodash/lang/gt.d.ts +0 -30
  140. lodash/lang/gte.d.ts +0 -30
  141. lodash/lang/isArguments.d.ts +0 -26
  142. lodash/lang/isArray.d.ts +0 -31
  143. lodash/lang/isArrayBuffer.d.ts +0 -26
  144. lodash/lang/isArrayLike.d.ts +0 -52
  145. lodash/lang/isArrayLikeObject.d.ts +0 -53
  146. lodash/lang/isBoolean.d.ts +0 -26
  147. lodash/lang/isBuffer.d.ts +0 -26
  148. lodash/lang/isDate.d.ts +0 -26
  149. lodash/lang/isElement.d.ts +0 -26
  150. lodash/lang/isEmpty.d.ts +0 -27
  151. lodash/lang/isEqual.d.ts +0 -52
  152. lodash/lang/isEqualWith.d.ts +0 -61
  153. lodash/lang/isError.d.ts +0 -27
  154. lodash/lang/isFinite.d.ts +0 -28
  155. lodash/lang/isFunction.d.ts +0 -26
  156. lodash/lang/isInteger.d.ts +0 -42
  157. lodash/lang/isLength.d.ts +0 -42
  158. lodash/lang/isMap.d.ts +0 -26
  159. lodash/lang/isMatch.d.ts +0 -42
  160. lodash/lang/isMatchWith.d.ts +0 -51
  161. lodash/lang/isNaN.d.ts +0 -28
  162. lodash/lang/isNative.d.ts +0 -26
  163. lodash/lang/isNil.d.ts +0 -37
  164. lodash/lang/isNull.d.ts +0 -26
  165. lodash/lang/isNumber.d.ts +0 -28
  166. lodash/lang/isObject.d.ts +0 -27
  167. lodash/lang/isObjectLike.d.ts +0 -41
  168. lodash/lang/isPlainObject.d.ts +0 -29
  169. lodash/lang/isRegExp.d.ts +0 -26
  170. lodash/lang/isSafeInteger.d.ts +0 -43
  171. lodash/lang/isSet.d.ts +0 -26
  172. lodash/lang/isString.d.ts +0 -26
  173. lodash/lang/isSymbol.d.ts +0 -34
  174. lodash/lang/isTypedArray.d.ts +0 -26
  175. lodash/lang/isUndefined.d.ts +0 -26
  176. lodash/lang/isWeakMap.d.ts +0 -26
  177. lodash/lang/isWeakSet.d.ts +0 -26
  178. lodash/lang/lt.d.ts +0 -30
  179. lodash/lang/lte.d.ts +0 -30
  180. lodash/lang/toArray.d.ts +0 -46
  181. lodash/lang/toFinite.d.ts +0 -41
  182. lodash/lang/toInteger.d.ts +0 -42
  183. lodash/lang/toLength.d.ts +0 -43
  184. lodash/lang/toNumber.d.ts +0 -40
  185. lodash/lang/toPlainObject.d.ts +0 -27
  186. lodash/lang/toSafeInteger.d.ts +0 -41
  187. lodash/lang/toString.d.ts +0 -24
  188. lodash/math/add.d.ts +0 -30
  189. lodash/math/ceil.d.ts +0 -30
  190. lodash/math/divide.d.ts +0 -30
  191. lodash/math/floor.d.ts +0 -30
  192. lodash/math/max.d.ts +0 -30
  193. lodash/math/maxBy.d.ts +0 -49
  194. lodash/math/mean.d.ts +0 -33
  195. lodash/math/meanBy.d.ts +0 -41
  196. lodash/math/min.d.ts +0 -30
  197. lodash/math/minBy.d.ts +0 -49
  198. lodash/math/multiply.d.ts +0 -29
  199. lodash/math/round.d.ts +0 -30
  200. lodash/math/subtract.d.ts +0 -39
  201. lodash/math/sum.d.ts +0 -31
  202. lodash/math/sumBy.d.ts +0 -53
  203. lodash/number/clamp.d.ts +0 -56
  204. lodash/number/inRange.d.ts +0 -39
  205. lodash/object/assign.d.ts +0 -172
  206. lodash/object/assignIn.d.ts +0 -171
  207. lodash/object/assignInWith.d.ts +0 -183
  208. lodash/object/assignWith.d.ts +0 -180
  209. lodash/object/at.d.ts +0 -61
  210. lodash/object/create.d.ts +0 -31
  211. lodash/object/defaults.d.ts +0 -155
  212. lodash/object/defaultsDeep.d.ts +0 -28
  213. lodash/object/entries.d.ts +0 -38
  214. lodash/object/entriesIn.d.ts +0 -38
  215. lodash/object/extend.d.ts +0 -147
  216. lodash/object/extendWith.d.ts +0 -159
  217. lodash/object/findKey.d.ts +0 -47
  218. lodash/object/findLastKey.d.ts +0 -46
  219. lodash/object/forIn.d.ts +0 -37
  220. lodash/object/forInRight.d.ts +0 -35
  221. lodash/object/forOwn.d.ts +0 -37
  222. lodash/object/forOwnRight.d.ts +0 -35
  223. lodash/object/functions.d.ts +0 -39
  224. lodash/object/functionsIn.d.ts +0 -39
  225. lodash/object/get.d.ts +0 -238
  226. lodash/object/has.d.ts +0 -47
  227. lodash/object/hasIn.d.ts +0 -46
  228. lodash/object/invert.d.ts +0 -30
  229. lodash/object/invertBy.d.ts +0 -62
  230. lodash/object/invoke.d.ts +0 -33
  231. lodash/object/keys.d.ts +0 -28
  232. lodash/object/keysIn.d.ts +0 -28
  233. lodash/object/mapKeys.d.ts +0 -86
  234. lodash/object/mapValues.d.ts +0 -189
  235. lodash/object/merge.d.ts +0 -156
  236. lodash/object/mergeWith.d.ts +0 -133
  237. lodash/object/omit.d.ts +0 -69
  238. lodash/object/omitBy.d.ts +0 -45
  239. lodash/object/pick.d.ts +0 -68
  240. lodash/object/pickBy.d.ts +0 -44
  241. lodash/object/result.d.ts +0 -39
  242. lodash/object/set.d.ts +0 -65
  243. lodash/object/setWith.d.ts +0 -71
  244. lodash/object/toPairs.d.ts +0 -41
  245. lodash/object/toPairsIn.d.ts +0 -41
  246. lodash/object/transform.d.ts +0 -163
  247. lodash/object/unset.d.ts +0 -32
  248. lodash/object/update.d.ts +0 -39
  249. lodash/object/updateWith.d.ts +0 -83
  250. lodash/object/values.d.ts +0 -56
  251. lodash/object/valuesIn.d.ts +0 -41
  252. lodash/seq/chain.d.ts +0 -26
  253. lodash/seq/prototype.at.d.ts +0 -12
  254. lodash/seq/prototype.chain.d.ts +0 -26
  255. lodash/seq/prototype.commit.d.ts +0 -11
  256. lodash/seq/prototype.plant.d.ts +0 -18
  257. lodash/seq/prototype.reverse.d.ts +0 -14
  258. lodash/seq/prototype.toJSON.d.ts +0 -9
  259. lodash/seq/prototype.toString.d.ts +0 -11
  260. lodash/seq/prototype.value.d.ts +0 -13
  261. lodash/seq/prototype.valueOf.d.ts +0 -9
  262. lodash/seq/tap.d.ts +0 -28
  263. lodash/seq/thru.d.ts +0 -31
  264. lodash/string/camelCase.d.ts +0 -26
  265. lodash/string/capitalize.d.ts +0 -26
  266. lodash/string/deburr.d.ts +0 -27
  267. lodash/string/endsWith.d.ts +0 -38
  268. lodash/string/escape.d.ts +0 -37
  269. lodash/string/escapeRegExp.d.ts +0 -27
  270. lodash/string/kebabCase.d.ts +0 -26
  271. lodash/string/lowerCase.d.ts +0 -26
  272. lodash/string/lowerFirst.d.ts +0 -26
  273. lodash/string/pad.d.ts +0 -39
  274. lodash/string/padEnd.d.ts +0 -39
  275. lodash/string/padStart.d.ts +0 -39
  276. lodash/string/parseInt.d.ts +0 -33
  277. lodash/string/repeat.d.ts +0 -32
  278. lodash/string/replace.d.ts +0 -59
  279. lodash/string/snakeCase.d.ts +0 -26
  280. lodash/string/split.d.ts +0 -56
  281. lodash/string/startCase.d.ts +0 -26
  282. lodash/string/startsWith.d.ts +0 -38
  283. lodash/string/template.d.ts +0 -61
  284. lodash/string/toLower.d.ts +0 -26
  285. lodash/string/toUpper.d.ts +0 -26
  286. lodash/string/trim.d.ts +0 -44
  287. lodash/string/trimEnd.d.ts +0 -44
  288. lodash/string/trimStart.d.ts +0 -44
  289. lodash/string/truncate.d.ts +0 -40
  290. lodash/string/unescape.d.ts +0 -30
  291. lodash/string/upperCase.d.ts +0 -26
  292. lodash/string/upperFirst.d.ts +0 -26
  293. lodash/string/words.d.ts +0 -44
  294. lodash/util/attempt.d.ts +0 -27
  295. lodash/util/bindAll.d.ts +0 -28
  296. lodash/util/cond.d.ts +0 -33
  297. lodash/util/conforms.d.ts +0 -28
  298. lodash/util/constant.d.ts +0 -26
  299. lodash/util/defaultTo.d.ts +0 -53
  300. lodash/util/flow.d.ts +0 -171
  301. lodash/util/flowRight.d.ts +0 -156
  302. lodash/util/identity.d.ts +0 -31
  303. lodash/util/iteratee.d.ts +0 -58
  304. lodash/util/matches.d.ts +0 -36
  305. lodash/util/matchesProperty.d.ts +0 -59
  306. lodash/util/method.d.ts +0 -31
  307. lodash/util/methodOf.d.ts +0 -35
  308. lodash/util/mixin.d.ts +0 -69
  309. lodash/util/noConflict.d.ts +0 -25
  310. lodash/util/noop.d.ts +0 -25
  311. lodash/util/nthArg.d.ts +0 -26
  312. lodash/util/over.d.ts +0 -33
  313. lodash/util/overEvery.d.ts +0 -27
  314. lodash/util/overSome.d.ts +0 -27
  315. lodash/util/property.d.ts +0 -26
  316. lodash/util/propertyOf.d.ts +0 -27
  317. lodash/util/range.d.ts +0 -56
  318. lodash/util/rangeRight.d.ts +0 -77
  319. lodash/util/runInContext.d.ts +0 -19
  320. lodash/util/stubArray.d.ts +0 -25
  321. lodash/util/stubFalse.d.ts +0 -25
  322. lodash/util/stubObject.d.ts +0 -25
  323. lodash/util/stubString.d.ts +0 -25
  324. lodash/util/stubTrue.d.ts +0 -25
  325. lodash/util/times.d.ts +0 -50
  326. lodash/util/toPath.d.ts +0 -43
  327. lodash/util/uniqueId.d.ts +0 -26
@@ -0,0 +1,3091 @@
1
+ import _ = require("../index");
2
+ declare module "../index" {
3
+ // countBy
4
+
5
+ interface LoDashStatic {
6
+ /**
7
+ * Creates an object composed of keys generated from the results of running each element of collection through
8
+ * iteratee. The corresponding value of each key is the number of times the key was returned by iteratee. The
9
+ * iteratee is bound to thisArg and invoked with three arguments:
10
+ * (value, index|key, collection).
11
+ *
12
+ * If a property name is provided for iteratee the created _.property style callback returns the property
13
+ * value of the given element.
14
+ *
15
+ * If a value is also provided for thisArg the created _.matchesProperty style callback returns true for
16
+ * elements that have a matching property value, else false.
17
+ *
18
+ * If an object is provided for iteratee the created _.matches style callback returns true for elements that
19
+ * have the properties of the given object, else false.
20
+ *
21
+ * @param collection The collection to iterate over.
22
+ * @param iteratee The function invoked per iteration.
23
+ * @param thisArg The this binding of iteratee.
24
+ * @return Returns the composed aggregate object.
25
+ */
26
+ countBy<T>(
27
+ collection: string | null | undefined,
28
+ iteratee?: StringIterator<T>
29
+ ): Dictionary<number>;
30
+
31
+ /**
32
+ * @see _.countBy
33
+ */
34
+ countBy<T>(
35
+ collection: List<T> | null | undefined,
36
+ iteratee?: ListIteratee<T>
37
+ ): Dictionary<number>;
38
+
39
+ /**
40
+ * @see _.countBy
41
+ */
42
+ countBy<T>(
43
+ collection: NumericDictionary<T> | null | undefined,
44
+ iteratee?: NumericDictionaryIteratee<T>
45
+ ): Dictionary<number>;
46
+
47
+ /**
48
+ * @see _.countBy
49
+ */
50
+ countBy<T extends object>(
51
+ collection: T | null | undefined,
52
+ iteratee?: ObjectIteratee<T>
53
+ ): Dictionary<number>;
54
+ }
55
+
56
+ interface LoDashImplicitWrapper<TValue> {
57
+ /**
58
+ * @see _.countBy
59
+ */
60
+ countBy<T>(
61
+ this: LoDashImplicitWrapper<string | null | undefined>,
62
+ iteratee?: StringIterator<T>
63
+ ): LoDashImplicitWrapper<Dictionary<number>>;
64
+
65
+ /**
66
+ * @see _.countBy
67
+ */
68
+ countBy<T>(
69
+ this: LoDashImplicitWrapper<List<T> | null | undefined>,
70
+ iteratee?: ListIteratee<T>
71
+ ): LoDashImplicitWrapper<Dictionary<number>>;
72
+
73
+ /**
74
+ * @see _.countBy
75
+ */
76
+ countBy<T extends object>(
77
+ this: LoDashImplicitWrapper<T | null | undefined>,
78
+ iteratee?: ObjectIteratee<T>
79
+ ): LoDashImplicitWrapper<Dictionary<number>>;
80
+
81
+ /**
82
+ * @see _.countBy
83
+ */
84
+ countBy<T>(
85
+ this: LoDashImplicitWrapper<NumericDictionary<T> | null | undefined>,
86
+ iteratee?: NumericDictionaryIteratee<T>
87
+ ): LoDashImplicitWrapper<Dictionary<number>>;
88
+ }
89
+
90
+ interface LoDashExplicitWrapper<TValue> {
91
+ /**
92
+ * @see _.countBy
93
+ */
94
+ countBy<T>(
95
+ this: LoDashExplicitWrapper<string | null | undefined>,
96
+ iteratee?: StringIterator<T>
97
+ ): LoDashExplicitWrapper<Dictionary<number>>;
98
+
99
+ /**
100
+ * @see _.countBy
101
+ */
102
+ countBy<T>(
103
+ this: LoDashExplicitWrapper<List<T> | null | undefined>,
104
+ iteratee?: ListIteratee<T>
105
+ ): LoDashExplicitWrapper<Dictionary<number>>;
106
+
107
+ /**
108
+ * @see _.countBy
109
+ */
110
+ countBy<T extends object>(
111
+ this: LoDashExplicitWrapper<T | null | undefined>,
112
+ iteratee?: ObjectIteratee<T>
113
+ ): LoDashExplicitWrapper<Dictionary<number>>;
114
+
115
+ /**
116
+ * @see _.countBy
117
+ */
118
+ countBy<T>(
119
+ this: LoDashExplicitWrapper<NumericDictionary<T> | null | undefined>,
120
+ iteratee?: NumericDictionaryIteratee<T>
121
+ ): LoDashExplicitWrapper<Dictionary<number>>;
122
+ }
123
+
124
+ // each
125
+
126
+ interface LoDashStatic {
127
+ each: typeof _.forEach; // tslint:disable-line:no-unnecessary-qualifier
128
+ }
129
+
130
+ interface LoDashWrapper<TValue> {
131
+ /**
132
+ * @see _.forEach
133
+ */
134
+ each<T>(
135
+ this: LoDashWrapper<T[] | null | undefined>,
136
+ iteratee?: ArrayIterator<T, any>
137
+ ): this;
138
+
139
+ /**
140
+ * @see _.forEach
141
+ */
142
+ each(
143
+ this: LoDashWrapper<string | null | undefined>,
144
+ iteratee?: StringIterator<any>
145
+ ): this;
146
+
147
+ /**
148
+ * @see _.forEach
149
+ */
150
+ each<T>(
151
+ this: LoDashWrapper<List<T> | null | undefined>,
152
+ iteratee?: ListIterator<T, any>
153
+ ): this;
154
+
155
+ /**
156
+ * @see _.forEach
157
+ */
158
+ each<T extends object>(
159
+ this: LoDashWrapper<T | null | undefined>,
160
+ iteratee?: ObjectIterator<T, any>
161
+ ): this;
162
+ }
163
+
164
+ // eachRight
165
+
166
+ interface LoDashStatic {
167
+ eachRight: typeof _.forEachRight; // tslint:disable-line:no-unnecessary-qualifier
168
+ }
169
+
170
+ interface LoDashWrapper<TValue> {
171
+ /**
172
+ * @see _.forEachRight
173
+ */
174
+ eachRight<T>(
175
+ this: LoDashWrapper<T[] | null | undefined>,
176
+ iteratee?: ArrayIterator<T, any>
177
+ ): this;
178
+
179
+ /**
180
+ * @see _.forEachRight
181
+ */
182
+ eachRight(
183
+ this: LoDashWrapper<string | null | undefined>,
184
+ iteratee?: StringIterator<any>
185
+ ): this;
186
+
187
+ /**
188
+ * @see _.forEachRight
189
+ */
190
+ eachRight<T>(
191
+ this: LoDashWrapper<List<T> | null | undefined>,
192
+ iteratee?: ListIterator<T, any>
193
+ ): this;
194
+
195
+ /**
196
+ * @see _.forEachRight
197
+ */
198
+ eachRight<T extends object>(
199
+ this: LoDashWrapper<T | null | undefined>,
200
+ iteratee?: ObjectIterator<T, any>
201
+ ): this;
202
+ }
203
+
204
+ // every
205
+
206
+ interface LoDashStatic {
207
+ /**
208
+ * Checks if predicate returns truthy for all elements of collection. Iteration is stopped once predicate
209
+ * returns falsey. The predicate is invoked with three arguments: (value, index|key, collection).
210
+ *
211
+ * @param collection The collection to iterate over.
212
+ * @param predicate The function invoked per iteration.
213
+ * @return Returns true if all elements pass the predicate check, else false.
214
+ */
215
+ every<T>(
216
+ collection: List<T> | null | undefined,
217
+ predicate?: ListIterateeCustom<T, boolean>
218
+ ): boolean;
219
+
220
+ /**
221
+ * @see _.every
222
+ */
223
+ every<T>(
224
+ collection: NumericDictionary<T> | null | undefined,
225
+ predicate?: NumericDictionaryIterateeCustom<T, boolean>
226
+ ): boolean;
227
+
228
+ /**
229
+ * @see _.every
230
+ */
231
+ every<T extends object>(
232
+ collection: T | null | undefined,
233
+ predicate?: ObjectIterateeCustom<T, boolean>
234
+ ): boolean;
235
+ }
236
+
237
+ interface LoDashImplicitWrapper<TValue> {
238
+ /**
239
+ * @see _.every
240
+ */
241
+ every<T>(
242
+ this: LoDashImplicitWrapper<List<T> | null | undefined>,
243
+ predicate?: ListIterateeCustom<T, boolean>
244
+ ): boolean;
245
+
246
+ /**
247
+ * @see _.every
248
+ */
249
+ every<T extends object>(
250
+ this: LoDashImplicitWrapper<T | null | undefined>,
251
+ predicate?: ObjectIterateeCustom<T, boolean>
252
+ ): boolean;
253
+
254
+ /**
255
+ * @see _.every
256
+ */
257
+ every<T>(
258
+ this: LoDashImplicitWrapper<NumericDictionary<T> | null | undefined>,
259
+ predicate?: NumericDictionaryIterateeCustom<T, boolean>
260
+ ): boolean;
261
+ }
262
+
263
+ interface LoDashExplicitWrapper<TValue> {
264
+ /**
265
+ * @see _.every
266
+ */
267
+ every<T>(
268
+ this: LoDashExplicitWrapper<List<T> | null | undefined>,
269
+ predicate?: ListIterateeCustom<T, boolean>
270
+ ): LoDashExplicitWrapper<boolean>;
271
+
272
+ /**
273
+ * @see _.every
274
+ */
275
+ every<T extends object>(
276
+ this: LoDashExplicitWrapper<T | null | undefined>,
277
+ predicate?: ObjectIterateeCustom<T, boolean>
278
+ ): LoDashExplicitWrapper<boolean>;
279
+
280
+ /**
281
+ * @see _.every
282
+ */
283
+ every<T>(
284
+ this: LoDashExplicitWrapper<NumericDictionary<T> | null | undefined>,
285
+ predicate?: NumericDictionaryIterateeCustom<T, boolean>
286
+ ): LoDashExplicitWrapper<boolean>;
287
+ }
288
+
289
+ // filter
290
+
291
+ interface LoDashStatic {
292
+ /**
293
+ * Iterates over elements of collection, returning an array of all elements predicate returns truthy for. The
294
+ * predicate is bound to thisArg and invoked with three arguments: (value, index|key, collection).
295
+ *
296
+ * If a property name is provided for predicate the created _.property style callback returns the property
297
+ * value of the given element.
298
+ *
299
+ * If a value is also provided for thisArg the created _.matchesProperty style callback returns true for
300
+ * elements that have a matching property value, else false.
301
+ *
302
+ * If an object is provided for predicate the created _.matches style callback returns true for elements that
303
+ * have the properties of the given object, else false.
304
+ *
305
+ * @param collection The collection to iterate over.
306
+ * @param predicate The function invoked per iteration.
307
+ * @param thisArg The this binding of predicate.
308
+ * @return Returns the new filtered array.
309
+ */
310
+ filter(
311
+ collection: string | null | undefined,
312
+ predicate?: StringIterator<boolean>
313
+ ): string[];
314
+
315
+ /**
316
+ * @see _.filter
317
+ */
318
+ filter<T, S extends T>(
319
+ collection: List<T> | null | undefined,
320
+ predicate: ListIteratorTypeGuard<T, S>
321
+ ): S[];
322
+
323
+ /**
324
+ * @see _.filter
325
+ */
326
+ filter<T>(
327
+ collection: List<T> | null | undefined,
328
+ predicate?: ListIterateeCustom<T, boolean>
329
+ ): T[];
330
+
331
+ /**
332
+ * @see _.filter
333
+ */
334
+ filter<T extends object, S extends T[keyof T]>(
335
+ collection: T | null | undefined,
336
+ predicate: ObjectIteratorTypeGuard<T, S>
337
+ ): S[];
338
+
339
+ /**
340
+ * @see _.filter
341
+ */
342
+ filter<T extends object>(
343
+ collection: T | null | undefined,
344
+ predicate?: ObjectIterateeCustom<T, boolean>
345
+ ): Array<T[keyof T]>;
346
+ }
347
+
348
+ interface LoDashImplicitWrapper<TValue> {
349
+ /**
350
+ * @see _.filter
351
+ */
352
+ filter(
353
+ this: LoDashImplicitWrapper<string | null | undefined>,
354
+ predicate?: StringIterator<boolean>
355
+ ): LoDashImplicitWrapper<string[]>;
356
+
357
+ /**
358
+ * @see _.filter
359
+ */
360
+ filter<T, S extends T>(
361
+ this: LoDashImplicitWrapper<List<T> | null | undefined>,
362
+ predicate: ListIteratorTypeGuard<T, S>
363
+ ): LoDashImplicitWrapper<S[]>;
364
+
365
+ /**
366
+ * @see _.filter
367
+ */
368
+ filter<T>(
369
+ this: LoDashImplicitWrapper<List<T> | null | undefined>,
370
+ predicate?: ListIterateeCustom<T, boolean>
371
+ ): LoDashImplicitWrapper<T[]>;
372
+
373
+ /**
374
+ * @see _.filter
375
+ */
376
+ filter<T extends object, S extends T[keyof T]>(
377
+ this: LoDashImplicitWrapper<T | null | undefined>,
378
+ predicate: ObjectIteratorTypeGuard<T, S>
379
+ ): LoDashImplicitWrapper<S[]>;
380
+
381
+ /**
382
+ * @see _.filter
383
+ */
384
+ filter<T extends object>(
385
+ this: LoDashImplicitWrapper<T | null | undefined>,
386
+ predicate?: ObjectIterateeCustom<T, boolean>
387
+ ): LoDashImplicitWrapper<Array<T[keyof T]>>;
388
+ }
389
+
390
+ interface LoDashExplicitWrapper<TValue> {
391
+ /**
392
+ * @see _.filter
393
+ */
394
+ filter(
395
+ this: LoDashExplicitWrapper<string | null | undefined>,
396
+ predicate?: StringIterator<boolean>
397
+ ): LoDashExplicitWrapper<string[]>;
398
+
399
+ /**
400
+ * @see _.filter
401
+ */
402
+ filter<T, S extends T>(
403
+ this: LoDashExplicitWrapper<List<T> | null | undefined>,
404
+ predicate: ListIteratorTypeGuard<T, S>
405
+ ): LoDashExplicitWrapper<S[]>;
406
+
407
+ /**
408
+ * @see _.filter
409
+ */
410
+ filter<T>(
411
+ this: LoDashExplicitWrapper<List<T> | null | undefined>,
412
+ predicate?: ListIterateeCustom<T, boolean>
413
+ ): LoDashExplicitWrapper<T[]>;
414
+
415
+ /**
416
+ * @see _.filter
417
+ */
418
+ filter<T extends object, S extends T[keyof T]>(
419
+ this: LoDashExplicitWrapper<T | null | undefined>,
420
+ predicate: ObjectIteratorTypeGuard<T, S>
421
+ ): LoDashExplicitWrapper<S[]>;
422
+
423
+ /**
424
+ * @see _.filter
425
+ */
426
+ filter<T extends object>(
427
+ this: LoDashExplicitWrapper<T | null | undefined>,
428
+ predicate?: ObjectIterateeCustom<T, boolean>
429
+ ): LoDashExplicitWrapper<Array<T[keyof T]>>;
430
+ }
431
+
432
+ // find
433
+
434
+ interface LoDashStatic {
435
+ /**
436
+ * Iterates over elements of collection, returning the first element predicate returns truthy for.
437
+ * The predicate is bound to thisArg and invoked with three arguments: (value, index|key, collection).
438
+ *
439
+ * If a property name is provided for predicate the created _.property style callback returns the property
440
+ * value of the given element.
441
+ *
442
+ * If a value is also provided for thisArg the created _.matchesProperty style callback returns true for
443
+ * elements that have a matching property value, else false.
444
+ *
445
+ * If an object is provided for predicate the created _.matches style callback returns true for elements that
446
+ * have the properties of the given object, else false.
447
+ *
448
+ * @param collection The collection to search.
449
+ * @param predicate The function invoked per iteration.
450
+ * @param fromIndex The index to search from.
451
+ * @return Returns the matched element, else undefined.
452
+ */
453
+ find<T, S extends T>(
454
+ collection: List<T> | null | undefined,
455
+ predicate: ListIteratorTypeGuard<T, S>,
456
+ fromIndex?: number
457
+ ): S|undefined;
458
+
459
+ /**
460
+ * @see _.find
461
+ */
462
+ find<T>(
463
+ collection: List<T> | null | undefined,
464
+ predicate?: ListIterateeCustom<T, boolean>,
465
+ fromIndex?: number
466
+ ): T|undefined;
467
+
468
+ /**
469
+ * @see _.find
470
+ */
471
+ find<T extends object, S extends T[keyof T]>(
472
+ collection: T | null | undefined,
473
+ predicate: ObjectIteratorTypeGuard<T, S>,
474
+ fromIndex?: number
475
+ ): S|undefined;
476
+
477
+ /**
478
+ * @see _.find
479
+ */
480
+ find<T extends object>(
481
+ collection: T | null | undefined,
482
+ predicate?: ObjectIterateeCustom<T, boolean>,
483
+ fromIndex?: number
484
+ ): T[keyof T]|undefined;
485
+ }
486
+
487
+ interface LoDashImplicitWrapper<TValue> {
488
+ /**
489
+ * @see _.find
490
+ */
491
+ find<T, S extends T>(
492
+ this: LoDashImplicitWrapper<List<T> | null | undefined>,
493
+ predicate: ListIteratorTypeGuard<T, S>,
494
+ fromIndex?: number
495
+ ): S|undefined;
496
+
497
+ /**
498
+ * @see _.find
499
+ */
500
+ find<T>(
501
+ this: LoDashImplicitWrapper<List<T> | null | undefined>,
502
+ predicate?: ListIterateeCustom<T, boolean>,
503
+ fromIndex?: number
504
+ ): T|undefined;
505
+
506
+ /**
507
+ * @see _.find
508
+ */
509
+ find<T extends object, S extends T[keyof T]>(
510
+ this: LoDashImplicitWrapper<T | null | undefined>,
511
+ predicate: ObjectIteratorTypeGuard<T, S>,
512
+ fromIndex?: number
513
+ ): S|undefined;
514
+
515
+ /**
516
+ * @see _.find
517
+ */
518
+ find<T extends object>(
519
+ this: LoDashImplicitWrapper<T | null | undefined>,
520
+ predicate?: ObjectIterateeCustom<T, boolean>,
521
+ fromIndex?: number
522
+ ): T[keyof T]|undefined;
523
+ }
524
+
525
+ interface LoDashExplicitWrapper<TValue> {
526
+ /**
527
+ * @see _.find
528
+ */
529
+ find<T, S extends T>(
530
+ this: LoDashExplicitWrapper<List<T> | null | undefined>,
531
+ predicate: ListIteratorTypeGuard<T, S>,
532
+ fromIndex?: number
533
+ ): LoDashExplicitWrapper<S|undefined>;
534
+
535
+ /**
536
+ * @see _.find
537
+ */
538
+ find<T>(
539
+ this: LoDashExplicitWrapper<List<T> | null | undefined>,
540
+ predicate?: ListIterateeCustom<T, boolean>,
541
+ fromIndex?: number
542
+ ): LoDashExplicitWrapper<T|undefined>;
543
+
544
+ /**
545
+ * @see _.find
546
+ */
547
+ find<T extends object, S extends T[keyof T]>(
548
+ this: LoDashExplicitWrapper<T | null | undefined>,
549
+ predicate: ObjectIteratorTypeGuard<T, S>,
550
+ fromIndex?: number
551
+ ): LoDashExplicitWrapper<S|undefined>;
552
+
553
+ /**
554
+ * @see _.find
555
+ */
556
+ find<T extends object>(
557
+ this: LoDashExplicitWrapper<T | null | undefined>,
558
+ predicate?: ObjectIterateeCustom<T, boolean>,
559
+ fromIndex?: number
560
+ ): LoDashExplicitWrapper<T[keyof T]|undefined>;
561
+ }
562
+
563
+ // findLast
564
+
565
+ interface LoDashStatic {
566
+ /**
567
+ * This method is like _.find except that it iterates over elements of a collection from
568
+ * right to left.
569
+ * @param collection Searches for a value in this list.
570
+ * @param predicate The function called per iteration.
571
+ * @param fromIndex The index to search from.
572
+ * @return The found element, else undefined.
573
+ **/
574
+ findLast<T, S extends T>(
575
+ collection: List<T> | null | undefined,
576
+ predicate: ListIteratorTypeGuard<T, S>,
577
+ fromIndex?: number
578
+ ): S|undefined;
579
+
580
+ /**
581
+ * @see _.findLast
582
+ */
583
+ findLast<T>(
584
+ collection: List<T> | null | undefined,
585
+ predicate?: ListIterateeCustom<T, boolean>,
586
+ fromIndex?: number
587
+ ): T|undefined;
588
+
589
+ /**
590
+ * @see _.findLast
591
+ */
592
+ findLast<T extends object, S extends T[keyof T]>(
593
+ collection: T | null | undefined,
594
+ predicate: ObjectIteratorTypeGuard<T, S>,
595
+ fromIndex?: number
596
+ ): S|undefined;
597
+
598
+ /**
599
+ * @see _.findLast
600
+ */
601
+ findLast<T extends object>(
602
+ collection: T | null | undefined,
603
+ predicate?: ObjectIterateeCustom<T, boolean>,
604
+ fromIndex?: number
605
+ ): T[keyof T]|undefined;
606
+ }
607
+
608
+ interface LoDashImplicitWrapper<TValue> {
609
+ /**
610
+ * @see _.findLast
611
+ */
612
+ findLast<T, S extends T>(
613
+ this: LoDashImplicitWrapper<List<T> | null | undefined>,
614
+ predicate: ListIteratorTypeGuard<T, S>,
615
+ fromIndex?: number
616
+ ): S | undefined;
617
+
618
+ /**
619
+ * @see _.findLast
620
+ */
621
+ findLast<T>(
622
+ this: LoDashImplicitWrapper<List<T> | null | undefined>,
623
+ predicate?: ListIterateeCustom<T, boolean>,
624
+ fromIndex?: number
625
+ ): T | undefined;
626
+
627
+ /**
628
+ * @see _.findLast
629
+ */
630
+ findLast<T extends object, S extends T[keyof T]>(
631
+ this: LoDashImplicitWrapper<T | null | undefined>,
632
+ predicate: ObjectIteratorTypeGuard<T, S>,
633
+ fromIndex?: number
634
+ ): S|undefined;
635
+
636
+ /**
637
+ * @see _.findLast
638
+ */
639
+ findLast<T extends object>(
640
+ this: LoDashImplicitWrapper<T | null | undefined>,
641
+ predicate?: ObjectIterateeCustom<T, boolean>,
642
+ fromIndex?: number
643
+ ): T[keyof T]|undefined;
644
+ }
645
+
646
+ interface LoDashExplicitWrapper<TValue> {
647
+ /**
648
+ * @see _.findLast
649
+ */
650
+ findLast<T, S extends T>(
651
+ this: LoDashExplicitWrapper<List<T> | null | undefined>,
652
+ predicate: ListIteratorTypeGuard<T, S>,
653
+ fromIndex?: number
654
+ ): LoDashExplicitWrapper<S | undefined>;
655
+
656
+ /**
657
+ * @see _.findLast
658
+ */
659
+ findLast<T>(
660
+ this: LoDashExplicitWrapper<List<T> | null | undefined>,
661
+ predicate?: ListIterateeCustom<T, boolean>,
662
+ fromIndex?: number
663
+ ): LoDashExplicitWrapper<T | undefined>;
664
+
665
+ /**
666
+ * @see _.findLast
667
+ */
668
+ findLast<T extends object, S extends T[keyof T]>(
669
+ this: LoDashExplicitWrapper<T | null | undefined>,
670
+ predicate: ObjectIteratorTypeGuard<T, S>,
671
+ fromIndex?: number
672
+ ): LoDashExplicitWrapper<S|undefined>;
673
+
674
+ /**
675
+ * @see _.findLast
676
+ */
677
+ findLast<T extends object>(
678
+ this: LoDashExplicitWrapper<T | null | undefined>,
679
+ predicate?: ObjectIterateeCustom<T, boolean>,
680
+ fromIndex?: number
681
+ ): LoDashExplicitWrapper<T[keyof T]|undefined>;
682
+ }
683
+
684
+ // flatMap
685
+
686
+ interface LoDashStatic {
687
+ /**
688
+ * Creates an array of flattened values by running each element in collection through iteratee
689
+ * and concating its result to the other mapped values. The iteratee is invoked with three arguments:
690
+ * (value, index|key, collection).
691
+ *
692
+ * @param collection The collection to iterate over.
693
+ * @param iteratee The function invoked per iteration.
694
+ * @return Returns the new flattened array.
695
+ */
696
+ flatMap<T>(
697
+ collection: List<Many<T>> | Dictionary<Many<T>> | NumericDictionary<Many<T>> | null | undefined
698
+ ): T[];
699
+
700
+ /**
701
+ * @see _.flatMap
702
+ */
703
+ flatMap(
704
+ collection: object | null | undefined
705
+ ): any[];
706
+
707
+ /**
708
+ * @see _.flatMap
709
+ */
710
+ flatMap<T, TResult>(
711
+ collection: List<T> | null | undefined,
712
+ iteratee: ListIterator<T, Many<TResult>>
713
+ ): TResult[];
714
+
715
+ /**
716
+ * @see _.flatMap
717
+ */
718
+ flatMap<T, TResult>(
719
+ collection: NumericDictionary<T> | null | undefined,
720
+ iteratee: NumericDictionaryIterator<T, Many<TResult>>
721
+ ): TResult[];
722
+
723
+ /**
724
+ * @see _.flatMap
725
+ */
726
+ flatMap<T extends object, TResult>(
727
+ collection: T | null | undefined,
728
+ iteratee: ObjectIterator<T, Many<TResult>>
729
+ ): TResult[];
730
+
731
+ /**
732
+ * @see _.flatMap
733
+ */
734
+ flatMap(
735
+ collection: object | null | undefined,
736
+ iteratee: string
737
+ ): any[];
738
+
739
+ /**
740
+ * @see _.flatMap
741
+ */
742
+ flatMap(
743
+ collection: object | null | undefined,
744
+ iteratee: object
745
+ ): boolean[];
746
+ }
747
+
748
+ interface LoDashImplicitWrapper<TValue> {
749
+ /**
750
+ * @see _.flatMap
751
+ */
752
+ flatMap<T>(this: LoDashImplicitWrapper<List<Many<T>> | Dictionary<Many<T>> | NumericDictionary<Many<T>> | null | undefined>): LoDashImplicitWrapper<T[]>;
753
+
754
+ /**
755
+ * @see _.flatMap
756
+ */
757
+ flatMap(): LoDashImplicitWrapper<any[]>;
758
+
759
+ /**
760
+ * @see _.flatMap
761
+ */
762
+ flatMap<T, TResult>(
763
+ this: LoDashImplicitWrapper<List<T> | null | undefined>,
764
+ iteratee: ListIterator<T, Many<TResult>>
765
+ ): LoDashImplicitWrapper<TResult[]>;
766
+
767
+ /**
768
+ * @see _.flatMap
769
+ */
770
+ flatMap<T extends object, TResult>(
771
+ this: LoDashImplicitWrapper<T | null | undefined>,
772
+ iteratee: ObjectIterator<T, Many<TResult>>
773
+ ): LoDashImplicitWrapper<TResult[]>;
774
+
775
+ /**
776
+ * @see _.flatMap
777
+ */
778
+ flatMap<T, TResult>(
779
+ this: LoDashImplicitWrapper<NumericDictionary<T> | null | undefined>,
780
+ iteratee: NumericDictionaryIterator<T, Many<TResult>>
781
+ ): LoDashImplicitWrapper<TResult[]>;
782
+
783
+ /**
784
+ * @see _.flatMap
785
+ */
786
+ flatMap(
787
+ iteratee: string
788
+ ): LoDashImplicitWrapper<any[]>;
789
+
790
+ /**
791
+ * @see _.flatMap
792
+ */
793
+ flatMap(
794
+ iteratee: object
795
+ ): LoDashImplicitWrapper<boolean[]>;
796
+ }
797
+
798
+ interface LoDashExplicitWrapper<TValue> {
799
+ /**
800
+ * @see _.flatMap
801
+ */
802
+ flatMap<T>(this: LoDashExplicitWrapper<List<Many<T>> | Dictionary<Many<T>> | NumericDictionary<Many<T>> | null | undefined>): LoDashExplicitWrapper<T[]>;
803
+
804
+ /**
805
+ * @see _.flatMap
806
+ */
807
+ flatMap(): LoDashExplicitWrapper<any[]>;
808
+
809
+ /**
810
+ * @see _.flatMap
811
+ */
812
+ flatMap<T, TResult>(
813
+ this: LoDashExplicitWrapper<List<T> | null | undefined>,
814
+ iteratee: ListIterator<T, Many<TResult>>
815
+ ): LoDashExplicitWrapper<TResult[]>;
816
+
817
+ /**
818
+ * @see _.flatMap
819
+ */
820
+ flatMap<T, TResult>(
821
+ this: LoDashExplicitWrapper<NumericDictionary<T> | null | undefined>,
822
+ iteratee: NumericDictionaryIterator<T, Many<TResult>>
823
+ ): LoDashExplicitWrapper<TResult[]>;
824
+
825
+ /**
826
+ * @see _.flatMap
827
+ */
828
+ flatMap<T extends object, TResult>(
829
+ this: LoDashExplicitWrapper<T | null | undefined>,
830
+ iteratee: ObjectIterator<T, Many<TResult>>
831
+ ): LoDashExplicitWrapper<TResult[]>;
832
+
833
+ /**
834
+ * @see _.flatMap
835
+ */
836
+ flatMap(
837
+ iteratee: string
838
+ ): LoDashExplicitWrapper<any[]>;
839
+
840
+ /**
841
+ * @see _.flatMap
842
+ */
843
+ flatMap(
844
+ iteratee: object
845
+ ): LoDashExplicitWrapper<boolean[]>;
846
+ }
847
+
848
+ // flatMapDeep
849
+
850
+ interface LoDashStatic {
851
+ /**
852
+ * This method is like `_.flatMap` except that it recursively flattens the
853
+ * mapped results.
854
+ *
855
+ * @since 4.7.0
856
+ * @category Collection
857
+ * @param collection The collection to iterate over.
858
+ * @param [iteratee=_.identity] The function invoked per iteration.
859
+ * @returns Returns the new flattened array.
860
+ * @example
861
+ *
862
+ * function duplicate(n) {
863
+ * return [[[n, n]]];
864
+ * }
865
+ *
866
+ * _.flatMapDeep([1, 2], duplicate);
867
+ * // => [1, 1, 2, 2]
868
+ */
869
+ flatMapDeep<T>(
870
+ collection: List<ListOfRecursiveArraysOrValues<T> | T> | Dictionary<ListOfRecursiveArraysOrValues<T> | T> | NumericDictionary<ListOfRecursiveArraysOrValues<T> | T> | null | undefined
871
+ ): T[];
872
+
873
+ /**
874
+ * @see _.flatMapDeep
875
+ */
876
+ flatMapDeep<T, TResult>(
877
+ collection: List<T> | null | undefined,
878
+ iteratee: ListIterator<T, ListOfRecursiveArraysOrValues<TResult> | TResult>
879
+ ): TResult[];
880
+
881
+ /**
882
+ * @see _.flatMapDeep
883
+ */
884
+ flatMapDeep<T, TResult>(
885
+ collection: NumericDictionary<T> | null | undefined,
886
+ iteratee: NumericDictionaryIterator<T, ListOfRecursiveArraysOrValues<TResult> | TResult>
887
+ ): TResult[];
888
+
889
+ /**
890
+ * @see _.flatMapDeep
891
+ */
892
+ flatMapDeep<T extends object, TResult>(
893
+ collection: T | null | undefined,
894
+ iteratee: ObjectIterator<T, ListOfRecursiveArraysOrValues<TResult> | TResult>
895
+ ): TResult[];
896
+
897
+ /**
898
+ * @see _.flatMapDeep
899
+ */
900
+ flatMapDeep(
901
+ collection: object | null | undefined,
902
+ iteratee: string
903
+ ): any[];
904
+
905
+ /**
906
+ * @see _.flatMapDeep
907
+ */
908
+ flatMapDeep(
909
+ collection: object | null | undefined,
910
+ iteratee: object
911
+ ): boolean[];
912
+ }
913
+
914
+ interface LoDashImplicitWrapper<TValue> {
915
+ /**
916
+ * @see _.flatMapDeep
917
+ */
918
+ flatMapDeep<T>(
919
+ this: LoDashImplicitWrapper<List<ListOfRecursiveArraysOrValues<T> | T> | Dictionary<ListOfRecursiveArraysOrValues<T> | T> | NumericDictionary<ListOfRecursiveArraysOrValues<T> | T> | null | undefined>
920
+ ): LoDashImplicitWrapper<T[]>;
921
+
922
+ /**
923
+ * @see _.flatMapDeep
924
+ */
925
+ flatMapDeep<T, TResult>(
926
+ this: LoDashImplicitWrapper<List<T> | null | undefined>,
927
+ iteratee: ListIterator<T, ListOfRecursiveArraysOrValues<TResult> | TResult>
928
+ ): LoDashImplicitWrapper<TResult[]>;
929
+
930
+ /**
931
+ * @see _.flatMapDeep
932
+ */
933
+ flatMapDeep<T, TResult>(
934
+ this: LoDashImplicitWrapper<NumericDictionary<T> | null | undefined>,
935
+ iteratee: NumericDictionaryIterator<T, ListOfRecursiveArraysOrValues<TResult> | TResult>
936
+ ): LoDashImplicitWrapper<TResult[]>;
937
+
938
+ /**
939
+ * @see _.flatMapDeep
940
+ */
941
+ flatMapDeep<T extends object, TResult>(
942
+ this: LoDashImplicitWrapper<T | null | undefined>,
943
+ iteratee: ObjectIterator<T, ListOfRecursiveArraysOrValues<TResult> | TResult>
944
+ ): LoDashImplicitWrapper<TResult[]>;
945
+
946
+ /**
947
+ * @see _.flatMapDeep
948
+ */
949
+ flatMapDeep(
950
+ this: LoDashImplicitWrapper<object | null | undefined>,
951
+ iteratee: string
952
+ ): LoDashImplicitWrapper<any[]>;
953
+
954
+ /**
955
+ * @see _.flatMapDeep
956
+ */
957
+ flatMapDeep(
958
+ this: LoDashImplicitWrapper<object | null | undefined>,
959
+ iteratee: object
960
+ ): LoDashImplicitWrapper<boolean[]>;
961
+ }
962
+
963
+ interface LoDashExplicitWrapper<TValue> {
964
+ /**
965
+ * @see _.flatMapDeep
966
+ */
967
+ flatMapDeep<T>(
968
+ this: LoDashExplicitWrapper<List<ListOfRecursiveArraysOrValues<T> | T> | Dictionary<ListOfRecursiveArraysOrValues<T> | T> | NumericDictionary<ListOfRecursiveArraysOrValues<T> | T> | null | undefined>
969
+ ): LoDashExplicitWrapper<T[]>;
970
+
971
+ /**
972
+ * @see _.flatMapDeep
973
+ */
974
+ flatMapDeep<T, TResult>(
975
+ this: LoDashExplicitWrapper<List<T> | null | undefined>,
976
+ iteratee: ListIterator<T, ListOfRecursiveArraysOrValues<TResult> | TResult>
977
+ ): LoDashExplicitWrapper<TResult[]>;
978
+
979
+ /**
980
+ * @see _.flatMapDeep
981
+ */
982
+ flatMapDeep<T, TResult>(
983
+ this: LoDashExplicitWrapper<NumericDictionary<T> | null | undefined>,
984
+ iteratee: NumericDictionaryIterator<T, ListOfRecursiveArraysOrValues<TResult> | TResult>
985
+ ): LoDashExplicitWrapper<TResult[]>;
986
+
987
+ /**
988
+ * @see _.flatMapDeep
989
+ */
990
+ flatMapDeep<T extends object, TResult>(
991
+ this: LoDashExplicitWrapper<T | null | undefined>,
992
+ iteratee: ObjectIterator<T, ListOfRecursiveArraysOrValues<TResult> | TResult>
993
+ ): LoDashExplicitWrapper<TResult[]>;
994
+
995
+ /**
996
+ * @see _.flatMapDeep
997
+ */
998
+ flatMapDeep(
999
+ this: LoDashExplicitWrapper<object | null | undefined>,
1000
+ iteratee: string
1001
+ ): LoDashExplicitWrapper<any[]>;
1002
+
1003
+ /**
1004
+ * @see _.flatMapDeep
1005
+ */
1006
+ flatMapDeep(
1007
+ this: LoDashExplicitWrapper<object | null | undefined>,
1008
+ iteratee: object
1009
+ ): LoDashExplicitWrapper<boolean[]>;
1010
+ }
1011
+
1012
+ // flatMapDepth
1013
+
1014
+ interface LoDashStatic {
1015
+ /**
1016
+ * This method is like `_.flatMap` except that it recursively flattens the
1017
+ * mapped results up to `depth` times.
1018
+ *
1019
+ * @since 4.7.0
1020
+ * @category Collection
1021
+ * @param collection The collection to iterate over.
1022
+ * @param [iteratee=_.identity] The function invoked per iteration.
1023
+ * @param [depth=1] The maximum recursion depth.
1024
+ * @returns Returns the new flattened array.
1025
+ * @example
1026
+ *
1027
+ * function duplicate(n) {
1028
+ * return [[[n, n]]];
1029
+ * }
1030
+ *
1031
+ * _.flatMapDepth([1, 2], duplicate, 2);
1032
+ * // => [[1, 1], [2, 2]]
1033
+ */
1034
+ flatMapDepth<T>(
1035
+ collection: List<ListOfRecursiveArraysOrValues<T> | T> | Dictionary<ListOfRecursiveArraysOrValues<T> | T> | NumericDictionary<ListOfRecursiveArraysOrValues<T> | T> | null | undefined
1036
+ ): T[];
1037
+
1038
+ /**
1039
+ * @see _.flatMapDepth
1040
+ */
1041
+ flatMapDepth<T, TResult>(
1042
+ collection: List<T> | null | undefined,
1043
+ iteratee: ListIterator<T, ListOfRecursiveArraysOrValues<TResult> | TResult>,
1044
+ depth?: number
1045
+ ): TResult[];
1046
+
1047
+ /**
1048
+ * @see _.flatMapDepth
1049
+ */
1050
+ flatMapDepth<T, TResult>(
1051
+ collection: NumericDictionary<T> | null | undefined,
1052
+ iteratee: NumericDictionaryIterator<T, ListOfRecursiveArraysOrValues<TResult> | TResult>,
1053
+ depth?: number
1054
+ ): TResult[];
1055
+
1056
+ /**
1057
+ * @see _.flatMapDepth
1058
+ */
1059
+ flatMapDepth<T extends object, TResult>(
1060
+ collection: T | null | undefined,
1061
+ iteratee: ObjectIterator<T, ListOfRecursiveArraysOrValues<TResult> | TResult>,
1062
+ depth?: number
1063
+ ): TResult[];
1064
+
1065
+ /**
1066
+ * @see _.flatMapDepth
1067
+ */
1068
+ flatMapDepth(
1069
+ collection: object | null | undefined,
1070
+ iteratee: string,
1071
+ depth?: number
1072
+ ): any[];
1073
+
1074
+ /**
1075
+ * @see _.flatMapDepth
1076
+ */
1077
+ flatMapDepth(
1078
+ collection: object | null | undefined,
1079
+ iteratee: object,
1080
+ depth?: number
1081
+ ): boolean[];
1082
+ }
1083
+
1084
+ interface LoDashImplicitWrapper<TValue> {
1085
+ /**
1086
+ * @see _.flatMapDepth
1087
+ */
1088
+ flatMapDepth<T>(
1089
+ this: LoDashImplicitWrapper<List<ListOfRecursiveArraysOrValues<T> | T> | Dictionary<ListOfRecursiveArraysOrValues<T> | T> | NumericDictionary<ListOfRecursiveArraysOrValues<T> | T> | null | undefined>
1090
+ ): LoDashImplicitWrapper<T[]>;
1091
+
1092
+ /**
1093
+ * @see _.flatMapDepth
1094
+ */
1095
+ flatMapDepth<T, TResult>(
1096
+ this: LoDashImplicitWrapper<List<T> | null | undefined>,
1097
+ iteratee: ListIterator<T, ListOfRecursiveArraysOrValues<TResult> | TResult>,
1098
+ depth?: number
1099
+ ): LoDashImplicitWrapper<TResult[]>;
1100
+
1101
+ /**
1102
+ * @see _.flatMapDepth
1103
+ */
1104
+ flatMapDepth<T, TResult>(
1105
+ this: LoDashImplicitWrapper<NumericDictionary<T> | null | undefined>,
1106
+ iteratee: NumericDictionaryIterator<T, ListOfRecursiveArraysOrValues<TResult> | TResult>,
1107
+ depth?: number
1108
+ ): LoDashImplicitWrapper<TResult[]>;
1109
+
1110
+ /**
1111
+ * @see _.flatMapDepth
1112
+ */
1113
+ flatMapDepth<T extends object, TResult>(
1114
+ this: LoDashImplicitWrapper<T | null | undefined>,
1115
+ iteratee: ObjectIterator<T, ListOfRecursiveArraysOrValues<TResult> | TResult>,
1116
+ depth?: number
1117
+ ): LoDashImplicitWrapper<TResult[]>;
1118
+
1119
+ /**
1120
+ * @see _.flatMapDepth
1121
+ */
1122
+ flatMapDepth(
1123
+ this: LoDashImplicitWrapper<object | null | undefined>,
1124
+ iteratee: string,
1125
+ depth?: number
1126
+ ): LoDashImplicitWrapper<any[]>;
1127
+
1128
+ /**
1129
+ * @see _.flatMapDepth
1130
+ */
1131
+ flatMapDepth(
1132
+ this: LoDashImplicitWrapper<object | null | undefined>,
1133
+ iteratee: object,
1134
+ depth?: number
1135
+ ): LoDashImplicitWrapper<boolean[]>;
1136
+ }
1137
+
1138
+ interface LoDashExplicitWrapper<TValue> {
1139
+ /**
1140
+ * @see _.flatMapDepth
1141
+ */
1142
+ flatMapDepth<T>(
1143
+ this: LoDashExplicitWrapper<List<ListOfRecursiveArraysOrValues<T> | T> | Dictionary<ListOfRecursiveArraysOrValues<T> | T> | NumericDictionary<ListOfRecursiveArraysOrValues<T> | T> | null | undefined>
1144
+ ): LoDashExplicitWrapper<T[]>;
1145
+
1146
+ /**
1147
+ * @see _.flatMapDepth
1148
+ */
1149
+ flatMapDepth<T, TResult>(
1150
+ this: LoDashExplicitWrapper<List<T> | null | undefined>,
1151
+ iteratee: ListIterator<T, ListOfRecursiveArraysOrValues<TResult> | TResult>,
1152
+ depth?: number
1153
+ ): LoDashExplicitWrapper<TResult[]>;
1154
+
1155
+ /**
1156
+ * @see _.flatMapDepth
1157
+ */
1158
+ flatMapDepth<T, TResult>(
1159
+ this: LoDashExplicitWrapper<NumericDictionary<T> | null | undefined>,
1160
+ iteratee: NumericDictionaryIterator<T, ListOfRecursiveArraysOrValues<TResult> | TResult>,
1161
+ depth?: number
1162
+ ): LoDashExplicitWrapper<TResult[]>;
1163
+
1164
+ /**
1165
+ * @see _.flatMapDepth
1166
+ */
1167
+ flatMapDepth<T extends object, TResult>(
1168
+ this: LoDashExplicitWrapper<T | null | undefined>,
1169
+ iteratee: ObjectIterator<T, ListOfRecursiveArraysOrValues<TResult> | TResult>,
1170
+ depth?: number
1171
+ ): LoDashExplicitWrapper<TResult[]>;
1172
+
1173
+ /**
1174
+ * @see _.flatMapDepth
1175
+ */
1176
+ flatMapDepth(
1177
+ this: LoDashExplicitWrapper<object | null | undefined>,
1178
+ iteratee: string,
1179
+ depth?: number
1180
+ ): LoDashExplicitWrapper<any[]>;
1181
+
1182
+ /**
1183
+ * @see _.flatMapDepth
1184
+ */
1185
+ flatMapDepth(
1186
+ this: LoDashExplicitWrapper<object | null | undefined>,
1187
+ iteratee: object,
1188
+ depth?: number
1189
+ ): LoDashExplicitWrapper<boolean[]>;
1190
+ }
1191
+
1192
+ // forEach
1193
+
1194
+ interface LoDashStatic {
1195
+ /**
1196
+ * Iterates over elements of collection invoking iteratee for each element. The iteratee is bound to thisArg
1197
+ * and invoked with three arguments:
1198
+ * (value, index|key, collection). Iteratee functions may exit iteration early by explicitly returning false.
1199
+ *
1200
+ * Note: As with other "Collections" methods, objects with a "length" property are iterated like arrays. To
1201
+ * avoid this behavior _.forIn or _.forOwn may be used for object iteration.
1202
+ *
1203
+ * @alias _.each
1204
+ *
1205
+ * @param collection The collection to iterate over.
1206
+ * @param iteratee The function invoked per iteration.
1207
+ * @param thisArg The this binding of iteratee.
1208
+ */
1209
+ forEach<T>(
1210
+ collection: T[],
1211
+ iteratee?: ArrayIterator<T, any>
1212
+ ): T[];
1213
+
1214
+ /**
1215
+ * @see _.forEach
1216
+ */
1217
+ forEach(
1218
+ collection: string,
1219
+ iteratee?: StringIterator<any>
1220
+ ): string;
1221
+
1222
+ /**
1223
+ * @see _.forEach
1224
+ */
1225
+ forEach<T>(
1226
+ collection: List<T>,
1227
+ iteratee?: ListIterator<T, any>
1228
+ ): List<T>;
1229
+
1230
+ /**
1231
+ * @see _.forEach
1232
+ */
1233
+ forEach<T extends object>(
1234
+ collection: T,
1235
+ iteratee?: ObjectIterator<T, any>
1236
+ ): T;
1237
+
1238
+ /**
1239
+ * @see _.forEach
1240
+ */
1241
+ forEach<T, TArray extends T[] | null | undefined>(
1242
+ collection: TArray & (T[] | null | undefined),
1243
+ iteratee?: ArrayIterator<T, any>
1244
+ ): TArray;
1245
+
1246
+ /**
1247
+ * @see _.forEach
1248
+ */
1249
+ forEach<TString extends string | null | undefined>(
1250
+ collection: TString,
1251
+ iteratee?: StringIterator<any>
1252
+ ): TString;
1253
+
1254
+ /**
1255
+ * @see _.forEach
1256
+ */
1257
+ forEach<T, TList extends List<T> | null | undefined>(
1258
+ collection: TList & (List<T> | null | undefined),
1259
+ iteratee?: ListIterator<T, any>
1260
+ ): TList;
1261
+
1262
+ /**
1263
+ * @see _.forEach
1264
+ */
1265
+ forEach<T extends object>(
1266
+ collection: T | null | undefined,
1267
+ iteratee?: ObjectIterator<T, any>
1268
+ ): T | null | undefined;
1269
+ }
1270
+
1271
+ interface LoDashWrapper<TValue> {
1272
+ /**
1273
+ * @see _.forEach
1274
+ */
1275
+ forEach<T>(
1276
+ this: LoDashWrapper<T[] | null | undefined>,
1277
+ iteratee?: ArrayIterator<T, any>
1278
+ ): this;
1279
+
1280
+ /**
1281
+ * @see _.forEach
1282
+ */
1283
+ forEach(
1284
+ this: LoDashWrapper<string | null | undefined>,
1285
+ iteratee?: StringIterator<any>
1286
+ ): this;
1287
+
1288
+ /**
1289
+ * @see _.forEach
1290
+ */
1291
+ forEach<T>(
1292
+ this: LoDashWrapper<List<T> | null | undefined>,
1293
+ iteratee?: ListIterator<T, any>
1294
+ ): this;
1295
+
1296
+ /**
1297
+ * @see _.forEach
1298
+ */
1299
+ forEach<T extends object>(
1300
+ this: LoDashWrapper<T | null | undefined>,
1301
+ iteratee?: ObjectIterator<T, any>
1302
+ ): this;
1303
+ }
1304
+
1305
+ // forEachRight
1306
+
1307
+ interface LoDashStatic {
1308
+ /**
1309
+ * This method is like _.forEach except that it iterates over elements of collection from right to left.
1310
+ *
1311
+ * @alias _.eachRight
1312
+ *
1313
+ * @param collection The collection to iterate over.
1314
+ * @param iteratee The function called per iteration.
1315
+ * @param thisArg The this binding of callback.
1316
+ */
1317
+ forEachRight<T>(
1318
+ collection: T[],
1319
+ iteratee?: ArrayIterator<T, any>
1320
+ ): T[];
1321
+
1322
+ /**
1323
+ * @see _.forEachRight
1324
+ */
1325
+ forEachRight(
1326
+ collection: string,
1327
+ iteratee?: StringIterator<any>
1328
+ ): string;
1329
+
1330
+ /**
1331
+ * @see _.forEachRight
1332
+ */
1333
+ forEachRight<T>(
1334
+ collection: List<T>,
1335
+ iteratee?: ListIterator<T, any>
1336
+ ): List<T>;
1337
+
1338
+ /**
1339
+ * @see _.forEachRight
1340
+ */
1341
+ forEachRight<T extends object>(
1342
+ collection: T,
1343
+ iteratee?: ObjectIterator<T, any>
1344
+ ): T;
1345
+
1346
+ /**
1347
+ * @see _.forEachRight
1348
+ */
1349
+ forEachRight<T, TArray extends T[] | null | undefined>(
1350
+ collection: TArray & (T[] | null | undefined),
1351
+ iteratee?: ArrayIterator<T, any>
1352
+ ): TArray;
1353
+
1354
+ /**
1355
+ * @see _.forEachRight
1356
+ */
1357
+ forEachRight<TString extends string | null | undefined>(
1358
+ collection: TString,
1359
+ iteratee?: StringIterator<any>
1360
+ ): TString;
1361
+
1362
+ /**
1363
+ * @see _.forEachRight
1364
+ */
1365
+ forEachRight<T, TList extends List<T> | null | undefined>(
1366
+ collection: TList & (List<T> | null | undefined),
1367
+ iteratee?: ListIterator<T, any>
1368
+ ): TList;
1369
+
1370
+ /**
1371
+ * @see _.forEachRight
1372
+ */
1373
+ forEachRight<T extends object>(
1374
+ collection: T | null | undefined,
1375
+ iteratee?: ObjectIterator<T, any>
1376
+ ): T | null | undefined;
1377
+ }
1378
+
1379
+ interface LoDashWrapper<TValue> {
1380
+ /**
1381
+ * @see _.forEachRight
1382
+ */
1383
+ forEachRight<T>(
1384
+ this: LoDashWrapper<T[] | null | undefined>,
1385
+ iteratee?: ArrayIterator<T, any>
1386
+ ): this;
1387
+
1388
+ /**
1389
+ * @see _.forEachRight
1390
+ */
1391
+ forEachRight(
1392
+ this: LoDashWrapper<string | null | undefined>,
1393
+ iteratee?: StringIterator<any>
1394
+ ): this;
1395
+
1396
+ /**
1397
+ * @see _.forEachRight
1398
+ */
1399
+ forEachRight<T>(
1400
+ this: LoDashWrapper<List<T> | null | undefined>,
1401
+ iteratee?: ListIterator<T, any>
1402
+ ): this;
1403
+
1404
+ /**
1405
+ * @see _.forEachRight
1406
+ */
1407
+ forEachRight<T extends object>(
1408
+ this: LoDashWrapper<T | null | undefined>,
1409
+ iteratee?: ObjectIterator<T, any>
1410
+ ): this;
1411
+ }
1412
+
1413
+ // groupBy
1414
+
1415
+ interface LoDashStatic {
1416
+ /**
1417
+ * Creates an object composed of keys generated from the results of running each element of collection through
1418
+ * iteratee. The corresponding value of each key is an array of the elements responsible for generating the
1419
+ * key. The iteratee is bound to thisArg and invoked with three arguments:
1420
+ * (value, index|key, collection).
1421
+ *
1422
+ * If a property name is provided for iteratee the created _.property style callback returns the property
1423
+ * value of the given element.
1424
+ *
1425
+ * If a value is also provided for thisArg the created _.matchesProperty style callback returns true for
1426
+ * elements that have a matching property value, else false.
1427
+ *
1428
+ * If an object is provided for iteratee the created _.matches style callback returns true for elements that
1429
+ * have the properties of the given object, else false.
1430
+ *
1431
+ * @param collection The collection to iterate over.
1432
+ * @param iteratee The function invoked per iteration.
1433
+ * @param thisArg The this binding of iteratee.
1434
+ * @return Returns the composed aggregate object.
1435
+ */
1436
+ groupBy(
1437
+ collection: string | null | undefined,
1438
+ iteratee?: StringIterator<NotVoid>
1439
+ ): Dictionary<string[]>;
1440
+
1441
+ /**
1442
+ * @see _.groupBy
1443
+ */
1444
+ groupBy<T>(
1445
+ collection: List<T> | null | undefined,
1446
+ iteratee?: ListIteratee<T>
1447
+ ): Dictionary<T[]>;
1448
+
1449
+ /**
1450
+ * @see _.groupBy
1451
+ */
1452
+ groupBy<T>(
1453
+ collection: NumericDictionary<T> | null | undefined,
1454
+ iteratee?: NumericDictionaryIteratee<T>
1455
+ ): Dictionary<T[]>;
1456
+
1457
+ /**
1458
+ * @see _.groupBy
1459
+ */
1460
+ groupBy<T extends object>(
1461
+ collection: T | null | undefined,
1462
+ iteratee?: ObjectIteratee<T>
1463
+ ): Dictionary<Array<T[keyof T]>>;
1464
+ }
1465
+
1466
+ interface LoDashImplicitWrapper<TValue> {
1467
+ /**
1468
+ * @see _.groupBy
1469
+ */
1470
+ groupBy(
1471
+ this: LoDashImplicitWrapper<string | null | undefined>,
1472
+ iteratee?: StringIterator<NotVoid>
1473
+ ): LoDashImplicitWrapper<Dictionary<string[]>>;
1474
+
1475
+ /**
1476
+ * @see _.groupBy
1477
+ */
1478
+ groupBy<T>(
1479
+ this: LoDashImplicitWrapper<List<T> | null | undefined>,
1480
+ iteratee?: ListIteratee<T>
1481
+ ): LoDashImplicitWrapper<Dictionary<T[]>>;
1482
+
1483
+ /**
1484
+ * @see _.groupBy
1485
+ */
1486
+ groupBy<T extends object>(
1487
+ this: LoDashImplicitWrapper<T | null | undefined>,
1488
+ iteratee?: ObjectIteratee<T>
1489
+ ): LoDashImplicitWrapper<Dictionary<Array<T[keyof T]>>>;
1490
+
1491
+ /**
1492
+ * @see _.groupBy
1493
+ */
1494
+ groupBy<T>(
1495
+ this: LoDashImplicitWrapper<NumericDictionary<T> | null | undefined>,
1496
+ iteratee?: NumericDictionaryIteratee<T>
1497
+ ): LoDashImplicitWrapper<Dictionary<T[]>>;
1498
+ }
1499
+
1500
+ interface LoDashExplicitWrapper<TValue> {
1501
+ /**
1502
+ * @see _.groupBy
1503
+ */
1504
+ groupBy(
1505
+ this: LoDashExplicitWrapper<string | null | undefined>,
1506
+ iteratee?: StringIterator<NotVoid>
1507
+ ): LoDashExplicitWrapper<Dictionary<string[]>>;
1508
+
1509
+ /**
1510
+ * @see _.groupBy
1511
+ */
1512
+ groupBy<T>(
1513
+ this: LoDashExplicitWrapper<List<T> | null | undefined>,
1514
+ iteratee?: ListIteratee<T>
1515
+ ): LoDashExplicitWrapper<Dictionary<T[]>>;
1516
+
1517
+ /**
1518
+ * @see _.groupBy
1519
+ */
1520
+ groupBy<T>(
1521
+ this: LoDashExplicitWrapper<NumericDictionary<T> | null | undefined>,
1522
+ iteratee?: NumericDictionaryIteratee<T>
1523
+ ): LoDashExplicitWrapper<Dictionary<T[]>>;
1524
+
1525
+ /**
1526
+ * @see _.groupBy
1527
+ */
1528
+ groupBy<T extends object>(
1529
+ this: LoDashExplicitWrapper<T | null | undefined>,
1530
+ iteratee?: ObjectIteratee<T>
1531
+ ): LoDashExplicitWrapper<Dictionary<Array<T[keyof T]>>>;
1532
+ }
1533
+
1534
+ // includes
1535
+
1536
+ interface LoDashStatic {
1537
+ /**
1538
+ * Checks if target is in collection using SameValueZero for equality comparisons. If fromIndex is negative,
1539
+ * it’s used as the offset from the end of collection.
1540
+ *
1541
+ * @param collection The collection to search.
1542
+ * @param target The value to search for.
1543
+ * @param fromIndex The index to search from.
1544
+ * @return True if the target element is found, else false.
1545
+ */
1546
+ includes<T>(
1547
+ collection: List<T>|Dictionary<T> | null | undefined,
1548
+ target: T,
1549
+ fromIndex?: number
1550
+ ): boolean;
1551
+ }
1552
+
1553
+ interface LoDashImplicitWrapper<TValue> {
1554
+ /**
1555
+ * @see _.includes
1556
+ */
1557
+ includes<T>(
1558
+ this: LoDashImplicitWrapper<List<T> | Dictionary<T> | null | undefined>,
1559
+ target: T,
1560
+ fromIndex?: number
1561
+ ): boolean;
1562
+ }
1563
+
1564
+ interface LoDashExplicitWrapper<TValue> {
1565
+ /**
1566
+ * @see _.includes
1567
+ */
1568
+ includes<T>(
1569
+ this: LoDashExplicitWrapper<List<T> | Dictionary<T> | null | undefined>,
1570
+ target: T,
1571
+ fromIndex?: number
1572
+ ): LoDashExplicitWrapper<boolean>;
1573
+ }
1574
+
1575
+ // invokeMap
1576
+
1577
+ interface LoDashStatic {
1578
+ /**
1579
+ * Invokes the method named by methodName on each element in the collection returning
1580
+ * an array of the results of each invoked method. Additional arguments will be provided
1581
+ * to each invoked method. If methodName is a function it will be invoked for, and this
1582
+ * bound to, each element in the collection.
1583
+ * @param collection The collection to iterate over.
1584
+ * @param methodName The name of the method to invoke.
1585
+ * @param args Arguments to invoke the method with.
1586
+ **/
1587
+ invokeMap(
1588
+ collection: object | null | undefined,
1589
+ methodName: string,
1590
+ ...args: any[]): any[];
1591
+
1592
+ /**
1593
+ * @see _.invokeMap
1594
+ **/
1595
+ invokeMap<TResult>(
1596
+ collection: object | null | undefined,
1597
+ method: (...args: any[]) => TResult,
1598
+ ...args: any[]): TResult[];
1599
+ }
1600
+
1601
+ interface LoDashImplicitWrapper<TValue> {
1602
+ /**
1603
+ * @see _.invokeMap
1604
+ **/
1605
+ invokeMap(
1606
+ methodName: string,
1607
+ ...args: any[]): LoDashImplicitWrapper<any[]>;
1608
+
1609
+ /**
1610
+ * @see _.invokeMap
1611
+ **/
1612
+ invokeMap<TResult>(
1613
+ method: (...args: any[]) => TResult,
1614
+ ...args: any[]): LoDashImplicitWrapper<TResult[]>;
1615
+ }
1616
+
1617
+ interface LoDashExplicitWrapper<TValue> {
1618
+ /**
1619
+ * @see _.invokeMap
1620
+ **/
1621
+ invokeMap(
1622
+ methodName: string,
1623
+ ...args: any[]): LoDashExplicitWrapper<any[]>;
1624
+
1625
+ /**
1626
+ * @see _.invokeMap
1627
+ **/
1628
+ invokeMap<TResult>(
1629
+ method: (...args: any[]) => TResult,
1630
+ ...args: any[]): LoDashExplicitWrapper<TResult[]>;
1631
+ }
1632
+
1633
+ // keyBy
1634
+
1635
+ interface LoDashStatic {
1636
+ /**
1637
+ * Creates an object composed of keys generated from the results of running each element of collection through
1638
+ * iteratee. The corresponding value of each key is the last element responsible for generating the key. The
1639
+ * iteratee function is bound to thisArg and invoked with three arguments:
1640
+ * (value, index|key, collection).
1641
+ *
1642
+ * If a property name is provided for iteratee the created _.property style callback returns the property
1643
+ * value of the given element.
1644
+ *
1645
+ * If a value is also provided for thisArg the created _.matchesProperty style callback returns true for
1646
+ * elements that have a matching property value, else false.
1647
+ *
1648
+ * If an object is provided for iteratee the created _.matches style callback returns true for elements that
1649
+ * have the properties of the given object, else false.
1650
+ *
1651
+ * @param collection The collection to iterate over.
1652
+ * @param iteratee The function invoked per iteration.
1653
+ * @param thisArg The this binding of iteratee.
1654
+ * @return Returns the composed aggregate object.
1655
+ */
1656
+ keyBy(
1657
+ collection: string | null | undefined,
1658
+ iteratee?: StringIterator<PropertyName>
1659
+ ): Dictionary<string>;
1660
+
1661
+ /**
1662
+ * @see _.keyBy
1663
+ */
1664
+ keyBy<T>(
1665
+ collection: List<T> | null | undefined,
1666
+ iteratee?: ListIterateeCustom<T, PropertyName>
1667
+ ): Dictionary<T>;
1668
+
1669
+ /**
1670
+ * @see _.keyBy
1671
+ */
1672
+ keyBy<T extends object>(
1673
+ collection: T | null | undefined,
1674
+ iteratee?: ObjectIterateeCustom<T, PropertyName>
1675
+ ): Dictionary<T[keyof T]>;
1676
+
1677
+ /**
1678
+ * @see _.keyBy
1679
+ */
1680
+ keyBy<T>(
1681
+ collection: NumericDictionary<T> | null | undefined,
1682
+ iteratee?: NumericDictionaryIterateeCustom<T, PropertyName>
1683
+ ): Dictionary<T>;
1684
+ }
1685
+
1686
+ interface LoDashImplicitWrapper<TValue> {
1687
+ /**
1688
+ * @see _.keyBy
1689
+ */
1690
+ keyBy(
1691
+ this: LoDashImplicitWrapper<string | null | undefined>,
1692
+ iteratee?: StringIterator<PropertyName>
1693
+ ): LoDashImplicitWrapper<Dictionary<string>>;
1694
+
1695
+ /**
1696
+ * @see _.keyBy
1697
+ */
1698
+ keyBy<T>(
1699
+ this: LoDashImplicitWrapper<List<T> | null | undefined>,
1700
+ iteratee?: ListIterateeCustom<T, PropertyName>
1701
+ ): LoDashImplicitWrapper<Dictionary<T>>;
1702
+
1703
+ /**
1704
+ * @see _.keyBy
1705
+ */
1706
+ keyBy<T extends object>(
1707
+ this: LoDashImplicitWrapper<T | null | undefined>,
1708
+ iteratee?: ObjectIterateeCustom<T, PropertyName>
1709
+ ): LoDashImplicitWrapper<Dictionary<T[keyof T]>>;
1710
+
1711
+ /**
1712
+ * @see _.keyBy
1713
+ */
1714
+ keyBy<T>(
1715
+ this: LoDashImplicitWrapper<NumericDictionary<T> | null | undefined>,
1716
+ iteratee?: NumericDictionaryIterateeCustom<T, PropertyName>
1717
+ ): LoDashImplicitWrapper<Dictionary<T>>;
1718
+ }
1719
+
1720
+ interface LoDashExplicitWrapper<TValue> {
1721
+ /**
1722
+ * @see _.keyBy
1723
+ */
1724
+ keyBy(
1725
+ this: LoDashExplicitWrapper<string | null | undefined>,
1726
+ iteratee?: StringIterator<PropertyName>
1727
+ ): LoDashExplicitWrapper<Dictionary<string>>;
1728
+
1729
+ /**
1730
+ * @see _.keyBy
1731
+ */
1732
+ keyBy<T>(
1733
+ this: LoDashExplicitWrapper<List<T> | null | undefined>,
1734
+ iteratee?: ListIterateeCustom<T, PropertyName>
1735
+ ): LoDashExplicitWrapper<Dictionary<T>>;
1736
+
1737
+ /**
1738
+ * @see _.keyBy
1739
+ */
1740
+ keyBy<T extends object>(
1741
+ this: LoDashExplicitWrapper<T | null | undefined>,
1742
+ iteratee?: ObjectIterateeCustom<T, PropertyName>
1743
+ ): LoDashExplicitWrapper<Dictionary<T[keyof T]>>;
1744
+
1745
+ /**
1746
+ * @see _.keyBy
1747
+ */
1748
+ keyBy<T>(
1749
+ this: LoDashExplicitWrapper<NumericDictionary<T> | null | undefined>,
1750
+ iteratee?: NumericDictionaryIterateeCustom<T, PropertyName>
1751
+ ): LoDashExplicitWrapper<Dictionary<T>>;
1752
+ }
1753
+
1754
+ // map
1755
+
1756
+ interface LoDashStatic {
1757
+ /**
1758
+ * Creates an array of values by running each element in collection through iteratee. The iteratee is bound to
1759
+ * thisArg and invoked with three arguments: (value, index|key, collection).
1760
+ *
1761
+ * If a property name is provided for iteratee the created _.property style callback returns the property value
1762
+ * of the given element.
1763
+ *
1764
+ * If a value is also provided for thisArg the created _.matchesProperty style callback returns true for
1765
+ * elements that have a matching property value, else false.
1766
+ *
1767
+ * If an object is provided for iteratee the created _.matches style callback returns true for elements that
1768
+ * have the properties of the given object, else false.
1769
+ *
1770
+ * Many lodash methods are guarded to work as iteratees for methods like _.every, _.filter, _.map, _.mapValues,
1771
+ * _.reject, and _.some.
1772
+ *
1773
+ * The guarded methods are:
1774
+ * ary, callback, chunk, clone, create, curry, curryRight, drop, dropRight, every, fill, flatten, invert, max,
1775
+ * min, parseInt, slice, sortBy, take, takeRight, template, trim, trimLeft, trimRight, trunc, random, range,
1776
+ * sample, some, sum, uniq, and words
1777
+ *
1778
+ * @param collection The collection to iterate over.
1779
+ * @param iteratee The function invoked per iteration.
1780
+ * @param thisArg The this binding of iteratee.
1781
+ * @return Returns the new mapped array.
1782
+ */
1783
+ map<T, TResult>(
1784
+ collection: List<T> | null | undefined,
1785
+ iteratee: ListIterator<T, TResult>
1786
+ ): TResult[];
1787
+
1788
+ /**
1789
+ * @see _.map
1790
+ */
1791
+ map<T>(collection: List<T> | Dictionary<T> | null | undefined): T[];
1792
+
1793
+ /**
1794
+ * @see _.map
1795
+ */
1796
+ map<T, TResult>(
1797
+ collection: Dictionary<T> | null | undefined,
1798
+ iteratee: DictionaryIterator<T, TResult>
1799
+ ): TResult[];
1800
+
1801
+ /** @see _.map */
1802
+ map<T, K extends keyof T>(
1803
+ collection: List<T> | Dictionary<T> | null | undefined,
1804
+ iteratee: K
1805
+ ): Array<T[K]>;
1806
+
1807
+ /** @see _.map */
1808
+ map<T, TResult>(
1809
+ collection: NumericDictionary<T> | null | undefined,
1810
+ iteratee?: NumericDictionaryIterator<T, TResult>
1811
+ ): TResult[];
1812
+
1813
+ /**
1814
+ * @see _.map
1815
+ */
1816
+ map<T, TResult>(
1817
+ collection: List<T>|Dictionary<T>|NumericDictionary<T> | null | undefined,
1818
+ iteratee?: string
1819
+ ): TResult[];
1820
+
1821
+ /**
1822
+ * @see _.map
1823
+ */
1824
+ map<T>(
1825
+ collection: List<T>|Dictionary<T>|NumericDictionary<T> | null | undefined,
1826
+ iteratee?: object
1827
+ ): boolean[];
1828
+ }
1829
+
1830
+ interface LoDashImplicitWrapper<TValue> {
1831
+ /**
1832
+ * @see _.map
1833
+ */
1834
+ map<T, TResult>(
1835
+ this: LoDashImplicitWrapper<List<T> | null | undefined>,
1836
+ iteratee: ListIterator<T, TResult>
1837
+ ): LoDashImplicitWrapper<TResult[]>;
1838
+
1839
+ /**
1840
+ * @see _.map
1841
+ */
1842
+ map<T>(this: LoDashImplicitWrapper<List<T> | Dictionary<T> | null | undefined>): LoDashImplicitWrapper<T[]>;
1843
+
1844
+ /**
1845
+ * @see _.map
1846
+ */
1847
+ map<T, TResult>(
1848
+ this: LoDashImplicitWrapper<Dictionary<T> | null | undefined>,
1849
+ iteratee: DictionaryIterator<T, TResult>
1850
+ ): LoDashImplicitWrapper<TResult[]>;
1851
+
1852
+ /** @see _.map */
1853
+ map<T, K extends keyof T>(
1854
+ this: LoDashImplicitWrapper<List<T> | Dictionary<T> | null | undefined>,
1855
+ iteratee: K
1856
+ ): LoDashImplicitWrapper<Array<T[K]>>;
1857
+
1858
+ /** @see _.map */
1859
+ map<T, TResult>(
1860
+ this: LoDashImplicitWrapper<NumericDictionary<T> | null | undefined>,
1861
+ iteratee?: NumericDictionaryIterator<T, TResult>
1862
+ ): LoDashImplicitWrapper<TResult[]>;
1863
+
1864
+ /**
1865
+ * @see _.map
1866
+ */
1867
+ map<T, TResult>(
1868
+ this: LoDashImplicitWrapper<List<T> | Dictionary<T> | NumericDictionary<T> | null | undefined>,
1869
+ iteratee?: string
1870
+ ): LoDashImplicitWrapper<TResult[]>;
1871
+
1872
+ /**
1873
+ * @see _.map
1874
+ */
1875
+ map<T>(
1876
+ this: LoDashImplicitWrapper<List<T> | Dictionary<T> | NumericDictionary<T> | null | undefined>,
1877
+ iteratee?: object
1878
+ ): LoDashImplicitWrapper<boolean[]>;
1879
+ }
1880
+
1881
+ interface LoDashExplicitWrapper<TValue> {
1882
+ /**
1883
+ * @see _.map
1884
+ */
1885
+ map<T, TResult>(
1886
+ this: LoDashExplicitWrapper<List<T> | null | undefined>,
1887
+ iteratee: ListIterator<T, TResult>
1888
+ ): LoDashExplicitWrapper<TResult[]>;
1889
+
1890
+ /**
1891
+ * @see _.map
1892
+ */
1893
+ map<T>(this: LoDashExplicitWrapper<List<T> | Dictionary<T> | null | undefined>): LoDashExplicitWrapper<T[]>;
1894
+
1895
+ /**
1896
+ * @see _.map
1897
+ */
1898
+ map<T, TResult>(
1899
+ this: LoDashExplicitWrapper<Dictionary<T> | null | undefined>,
1900
+ iteratee: DictionaryIterator<T, TResult>
1901
+ ): LoDashExplicitWrapper<TResult[]>;
1902
+
1903
+ /** @see _.map */
1904
+ map<T, K extends keyof T>(
1905
+ this: LoDashExplicitWrapper<List<T> | Dictionary<T> | null | undefined>,
1906
+ iteratee: K
1907
+ ): LoDashExplicitWrapper<Array<T[K]>>;
1908
+
1909
+ /**
1910
+ * @see _.map
1911
+ */
1912
+ map<T, TResult>(
1913
+ this: LoDashExplicitWrapper<NumericDictionary<T> | null | undefined>,
1914
+ iteratee?: NumericDictionaryIterator<T, TResult>
1915
+ ): LoDashExplicitWrapper<TResult[]>;
1916
+
1917
+ /**
1918
+ * @see _.map
1919
+ */
1920
+ map<T, TResult>(
1921
+ this: LoDashExplicitWrapper<List<T> | Dictionary<T> | NumericDictionary<T> | null | undefined>,
1922
+ iteratee?: string
1923
+ ): LoDashExplicitWrapper<TResult[]>;
1924
+
1925
+ /**
1926
+ * @see _.map
1927
+ */
1928
+ map<T>(
1929
+ this: LoDashExplicitWrapper<List<T> | Dictionary<T> | NumericDictionary<T> | null | undefined>,
1930
+ iteratee?: object
1931
+ ): LoDashExplicitWrapper<boolean[]>;
1932
+ }
1933
+
1934
+ // orderBy
1935
+
1936
+ interface LoDashStatic {
1937
+ /**
1938
+ * This method is like `_.sortBy` except that it allows specifying the sort
1939
+ * orders of the iteratees to sort by. If `orders` is unspecified, all values
1940
+ * are sorted in ascending order. Otherwise, specify an order of "desc" for
1941
+ * descending or "asc" for ascending sort order of corresponding values.
1942
+ *
1943
+ * @category Collection
1944
+ * @param collection The collection to iterate over.
1945
+ * @param [iteratees=[_.identity]] The iteratees to sort by.
1946
+ * @param [orders] The sort orders of `iteratees`.
1947
+ * @param- {Object} [guard] Enables use as an iteratee for functions like `_.reduce`.
1948
+ * @returns Returns the new sorted array.
1949
+ * @example
1950
+ *
1951
+ * var users = [
1952
+ * { 'user': 'fred', 'age': 48 },
1953
+ * { 'user': 'barney', 'age': 34 },
1954
+ * { 'user': 'fred', 'age': 42 },
1955
+ * { 'user': 'barney', 'age': 36 }
1956
+ * ];
1957
+ *
1958
+ * // sort by `user` in ascending order and by `age` in descending order
1959
+ * _.orderBy(users, ['user', 'age'], ['asc', 'desc']);
1960
+ * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 42]]
1961
+ */
1962
+ orderBy<T>(
1963
+ collection: List<T> | null | undefined,
1964
+ iteratees?: Many<ListIterator<T, NotVoid>>,
1965
+ orders?: Many<boolean|string>
1966
+ ): T[];
1967
+
1968
+ /**
1969
+ * @see _.orderBy
1970
+ */
1971
+ orderBy<T>(
1972
+ collection: List<T> | null | undefined,
1973
+ iteratees?: Many<ListIteratee<T>>,
1974
+ orders?: Many<boolean|string>
1975
+ ): T[];
1976
+
1977
+ /**
1978
+ * @see _.orderBy
1979
+ */
1980
+ orderBy<T extends object>(
1981
+ collection: T | null | undefined,
1982
+ iteratees?: Many<ObjectIterator<T, NotVoid>>,
1983
+ orders?: Many<boolean|string>
1984
+ ): Array<T[keyof T]>;
1985
+
1986
+ /**
1987
+ * @see _.orderBy
1988
+ */
1989
+ orderBy<T extends object>(
1990
+ collection: T | null | undefined,
1991
+ iteratees?: Many<ObjectIteratee<T>>,
1992
+ orders?: Many<boolean|string>
1993
+ ): Array<T[keyof T]>;
1994
+
1995
+ /**
1996
+ * @see _.orderBy
1997
+ */
1998
+ orderBy<T>(
1999
+ collection: NumericDictionary<T> | null | undefined,
2000
+ iteratees?: Many<NumericDictionaryIterator<T, NotVoid>>,
2001
+ orders?: Many<boolean|string>
2002
+ ): T[];
2003
+
2004
+ /**
2005
+ * @see _.orderBy
2006
+ */
2007
+ orderBy<T>(
2008
+ collection: NumericDictionary<T> | null | undefined,
2009
+ iteratees?: Many<NumericDictionaryIteratee<T>>,
2010
+ orders?: Many<boolean|string>
2011
+ ): T[];
2012
+ }
2013
+
2014
+ interface LoDashImplicitWrapper<TValue> {
2015
+ /**
2016
+ * @see _.orderBy
2017
+ */
2018
+ orderBy<T>(
2019
+ this: LoDashImplicitWrapper<List<T> | null | undefined>,
2020
+ iteratees?: Many<ListIterator<T, NotVoid>>,
2021
+ orders?: Many<boolean|string>
2022
+ ): LoDashImplicitWrapper<T[]>;
2023
+
2024
+ /**
2025
+ * @see _.orderBy
2026
+ */
2027
+ orderBy<T>(
2028
+ this: LoDashImplicitWrapper<List<T> | null | undefined>,
2029
+ iteratees?: Many<ListIteratee<T>>,
2030
+ orders?: Many<boolean|string>
2031
+ ): LoDashImplicitWrapper<T[]>;
2032
+
2033
+ /**
2034
+ * @see _.orderBy
2035
+ */
2036
+ orderBy<T extends object>(
2037
+ this: LoDashImplicitWrapper<T | null | undefined>,
2038
+ iteratees?: Many<ObjectIterator<T, NotVoid>>,
2039
+ orders?: Many<boolean|string>
2040
+ ): LoDashImplicitWrapper<Array<T[keyof T]>>;
2041
+
2042
+ /**
2043
+ * @see _.orderBy
2044
+ */
2045
+ orderBy<T extends object>(
2046
+ this: LoDashImplicitWrapper<T | null | undefined>,
2047
+ iteratees?: Many<ObjectIteratee<T>>,
2048
+ orders?: Many<boolean|string>
2049
+ ): LoDashImplicitWrapper<Array<T[keyof T]>>;
2050
+
2051
+ /**
2052
+ * @see _.orderBy
2053
+ */
2054
+ orderBy<T>(
2055
+ this: LoDashImplicitWrapper<NumericDictionary<T> | null | undefined>,
2056
+ iteratees?: Many<NumericDictionaryIterator<T, NotVoid>>,
2057
+ orders?: Many<boolean|string>
2058
+ ): LoDashImplicitWrapper<T[]>;
2059
+
2060
+ /**
2061
+ * @see _.orderBy
2062
+ */
2063
+ orderBy<T>(
2064
+ this: LoDashImplicitWrapper<NumericDictionary<T> | null | undefined>,
2065
+ iteratees?: Many<NumericDictionaryIteratee<T>>,
2066
+ orders?: Many<boolean|string>
2067
+ ): LoDashImplicitWrapper<T[]>;
2068
+ }
2069
+
2070
+ interface LoDashExplicitWrapper<TValue> {
2071
+ /**
2072
+ * @see _.orderBy
2073
+ */
2074
+ orderBy<T>(
2075
+ this: LoDashExplicitWrapper<List<T> | null | undefined>,
2076
+ iteratees?: Many<ListIterator<T, NotVoid>>,
2077
+ orders?: Many<boolean|string>
2078
+ ): LoDashExplicitWrapper<T[]>;
2079
+
2080
+ /**
2081
+ * @see _.orderBy
2082
+ */
2083
+ orderBy<T>(
2084
+ this: LoDashExplicitWrapper<List<T> | null | undefined>,
2085
+ iteratees?: Many<ListIteratee<T>>,
2086
+ orders?: Many<boolean|string>
2087
+ ): LoDashExplicitWrapper<T[]>;
2088
+
2089
+ /**
2090
+ * @see _.orderBy
2091
+ */
2092
+ orderBy<T extends object>(
2093
+ this: LoDashExplicitWrapper<T | null | undefined>,
2094
+ iteratees?: Many<ObjectIterator<T, NotVoid>>,
2095
+ orders?: Many<boolean|string>
2096
+ ): LoDashExplicitWrapper<Array<T[keyof T]>>;
2097
+
2098
+ /**
2099
+ * @see _.orderBy
2100
+ */
2101
+ orderBy<T extends object>(
2102
+ this: LoDashExplicitWrapper<T | null | undefined>,
2103
+ iteratees?: Many<ObjectIteratee<T>>,
2104
+ orders?: Many<boolean|string>
2105
+ ): LoDashExplicitWrapper<Array<T[keyof T]>>;
2106
+
2107
+ /**
2108
+ * @see _.orderBy
2109
+ */
2110
+ orderBy<T>(
2111
+ this: LoDashExplicitWrapper<NumericDictionary<T> | null | undefined>,
2112
+ iteratees?: Many<NumericDictionaryIterator<T, NotVoid>>,
2113
+ orders?: Many<boolean|string>
2114
+ ): LoDashExplicitWrapper<T[]>;
2115
+
2116
+ /**
2117
+ * @see _.orderBy
2118
+ */
2119
+ orderBy<T>(
2120
+ this: LoDashExplicitWrapper<NumericDictionary<T> | null | undefined>,
2121
+ iteratees?: Many<NumericDictionaryIteratee<T>>,
2122
+ orders?: Many<boolean|string>
2123
+ ): LoDashExplicitWrapper<T[]>;
2124
+ }
2125
+
2126
+ // partition
2127
+
2128
+ interface LoDashStatic {
2129
+ /**
2130
+ * Creates an array of elements split into two groups, the first of which contains elements predicate returns truthy for,
2131
+ * while the second of which contains elements predicate returns falsey for.
2132
+ * The predicate is bound to thisArg and invoked with three arguments: (value, index|key, collection).
2133
+ *
2134
+ * If a property name is provided for predicate the created _.property style callback
2135
+ * returns the property value of the given element.
2136
+ *
2137
+ * If a value is also provided for thisArg the created _.matchesProperty style callback
2138
+ * returns true for elements that have a matching property value, else false.
2139
+ *
2140
+ * If an object is provided for predicate the created _.matches style callback returns
2141
+ * true for elements that have the properties of the given object, else false.
2142
+ *
2143
+ * @param collection The collection to iterate over.
2144
+ * @param callback The function called per iteration.
2145
+ * @param thisArg The this binding of predicate.
2146
+ * @return Returns the array of grouped elements.
2147
+ **/
2148
+ partition<T>(
2149
+ collection: List<T> | null | undefined,
2150
+ callback: ValueIteratee<T>
2151
+ ): [T[], T[]];
2152
+
2153
+ /**
2154
+ * @see _.partition
2155
+ */
2156
+ partition<T extends object>(
2157
+ collection: T | null | undefined,
2158
+ callback: ValueIteratee<T[keyof T]>
2159
+ ): [Array<T[keyof T]>, Array<T[keyof T]>];
2160
+ }
2161
+
2162
+ interface LoDashImplicitWrapper<TValue> {
2163
+ /**
2164
+ * @see _.partition
2165
+ */
2166
+ partition<T>(
2167
+ this: LoDashImplicitWrapper<List<T> | null | undefined>,
2168
+ callback: ValueIteratee<T>
2169
+ ): LoDashImplicitWrapper<[T[], T[]]>;
2170
+
2171
+ /**
2172
+ * @see _.partition
2173
+ */
2174
+ partition<T>(
2175
+ this: LoDashImplicitWrapper<T | null | undefined>,
2176
+ callback: ValueIteratee<T[keyof T]>
2177
+ ): LoDashImplicitWrapper<[Array<T[keyof T]>, Array<T[keyof T]>]>;
2178
+ }
2179
+
2180
+ interface LoDashExplicitWrapper<TValue> {
2181
+ /**
2182
+ * @see _.partition
2183
+ */
2184
+ partition<T>(
2185
+ this: LoDashExplicitWrapper<List<T> | null | undefined>,
2186
+ callback: ValueIteratee<T>
2187
+ ): LoDashExplicitWrapper<[T[], T[]]>;
2188
+
2189
+ /**
2190
+ * @see _.partition
2191
+ */
2192
+ partition<T>(
2193
+ this: LoDashExplicitWrapper<T | null | undefined>,
2194
+ callback: ValueIteratee<T[keyof T]>
2195
+ ): LoDashExplicitWrapper<[Array<T[keyof T]>, Array<T[keyof T]>]>;
2196
+ }
2197
+
2198
+ // reduce
2199
+
2200
+ interface LoDashStatic {
2201
+ /**
2202
+ * Reduces a collection to a value which is the accumulated result of running each
2203
+ * element in the collection through the callback, where each successive callback execution
2204
+ * consumes the return value of the previous execution. If accumulator is not provided the
2205
+ * first element of the collection will be used as the initial accumulator value. The callback
2206
+ * is bound to thisArg and invoked with four arguments; (accumulator, value, index|key, collection).
2207
+ * @param collection The collection to iterate over.
2208
+ * @param callback The function called per iteration.
2209
+ * @param accumulator Initial value of the accumulator.
2210
+ * @return Returns the accumulated value.
2211
+ **/
2212
+ reduce<T, TResult>(
2213
+ collection: T[] | null | undefined,
2214
+ callback: MemoListIterator<T, TResult, T[]>,
2215
+ accumulator: TResult
2216
+ ): TResult;
2217
+
2218
+ /**
2219
+ * @see _.reduce
2220
+ **/
2221
+ reduce<T, TResult>(
2222
+ collection: List<T> | null | undefined,
2223
+ callback: MemoListIterator<T, TResult, List<T>>,
2224
+ accumulator: TResult
2225
+ ): TResult;
2226
+
2227
+ /**
2228
+ * @see _.reduce
2229
+ **/
2230
+ reduce<T extends object, TResult>(
2231
+ collection: T | null | undefined,
2232
+ callback: MemoObjectIterator<T[keyof T], TResult, T>,
2233
+ accumulator: TResult
2234
+ ): TResult;
2235
+
2236
+ /**
2237
+ * @see _.reduce
2238
+ **/
2239
+ reduce<T, TResult>(
2240
+ collection: NumericDictionary<T> | null | undefined,
2241
+ callback: MemoListIterator<T, TResult, NumericDictionary<T>>,
2242
+ accumulator: TResult
2243
+ ): TResult;
2244
+
2245
+ /**
2246
+ * @see _.reduce
2247
+ **/
2248
+ reduce<T, TResult>(
2249
+ collection: T[] | null | undefined,
2250
+ callback: MemoListIterator<T, TResult, T[]>
2251
+ ): TResult | undefined;
2252
+
2253
+ /**
2254
+ * @see _.reduce
2255
+ **/
2256
+ reduce<T, TResult>(
2257
+ collection: List<T> | null | undefined,
2258
+ callback: MemoListIterator<T, TResult, List<T>>
2259
+ ): TResult | undefined;
2260
+
2261
+ /**
2262
+ * @see _.reduce
2263
+ **/
2264
+ reduce<T extends object, TResult>(
2265
+ collection: T | null | undefined,
2266
+ callback: MemoObjectIterator<T[keyof T], TResult, T>
2267
+ ): TResult | undefined;
2268
+
2269
+ /**
2270
+ * @see _.reduce
2271
+ **/
2272
+ reduce<T, TResult>(
2273
+ collection: NumericDictionary<T> | null | undefined,
2274
+ callback: MemoListIterator<T, TResult, NumericDictionary<T>>
2275
+ ): TResult | undefined;
2276
+ }
2277
+
2278
+ interface LoDashImplicitWrapper<TValue> {
2279
+ /**
2280
+ * @see _.reduce
2281
+ **/
2282
+ reduce<T, TResult>(
2283
+ this: LoDashImplicitWrapper<T[] | null | undefined>,
2284
+ callback: MemoListIterator<T, TResult, T[]>,
2285
+ accumulator: TResult
2286
+ ): TResult;
2287
+
2288
+ /**
2289
+ * @see _.reduce
2290
+ **/
2291
+ reduce<T, TResult>(
2292
+ this: LoDashImplicitWrapper<List<T> | null | undefined>,
2293
+ callback: MemoListIterator<T, TResult, List<T>>,
2294
+ accumulator: TResult
2295
+ ): TResult;
2296
+
2297
+ /**
2298
+ * @see _.reduce
2299
+ **/
2300
+ reduce<T extends object, TResult>(
2301
+ this: LoDashImplicitWrapper<T | null | undefined>,
2302
+ callback: MemoObjectIterator<T[keyof T], TResult, T>,
2303
+ accumulator: TResult
2304
+ ): TResult;
2305
+
2306
+ /**
2307
+ * @see _.reduce
2308
+ **/
2309
+ reduce<T, TResult>(
2310
+ this: LoDashImplicitWrapper<NumericDictionary<T> | null | undefined>,
2311
+ callback: MemoListIterator<T, TResult, NumericDictionary<T>>,
2312
+ accumulator: TResult
2313
+ ): TResult;
2314
+
2315
+ /**
2316
+ * @see _.reduce
2317
+ **/
2318
+ reduce<T, TResult>(
2319
+ this: LoDashImplicitWrapper<T[] | null | undefined>,
2320
+ callback: MemoListIterator<T, TResult, T[]>
2321
+ ): TResult | undefined;
2322
+
2323
+ /**
2324
+ * @see _.reduce
2325
+ **/
2326
+ reduce<T, TResult>(
2327
+ this: LoDashImplicitWrapper<List<T> | null | undefined>,
2328
+ callback: MemoListIterator<T, TResult, List<T>>
2329
+ ): TResult | undefined;
2330
+
2331
+ /**
2332
+ * @see _.reduce
2333
+ **/
2334
+ reduce<T extends object, TResult>(
2335
+ this: LoDashImplicitWrapper<T | null | undefined>,
2336
+ callback: MemoObjectIterator<T[keyof T], TResult, T>
2337
+ ): TResult | undefined;
2338
+
2339
+ /**
2340
+ * @see _.reduce
2341
+ **/
2342
+ reduce<T, TResult>(
2343
+ this: LoDashImplicitWrapper<NumericDictionary<T> | null | undefined>,
2344
+ callback: MemoListIterator<T, TResult, NumericDictionary<T>>
2345
+ ): TResult | undefined;
2346
+ }
2347
+
2348
+ interface LoDashExplicitWrapper<TValue> {
2349
+ /**
2350
+ * @see _.reduce
2351
+ **/
2352
+ reduce<T, TResult>(
2353
+ this: LoDashExplicitWrapper<T[] | null | undefined>,
2354
+ callback: MemoListIterator<T, TResult, T[]>,
2355
+ accumulator: TResult
2356
+ ): LoDashExplicitWrapper<TResult>;
2357
+
2358
+ /**
2359
+ * @see _.reduce
2360
+ **/
2361
+ reduce<T, TResult>(
2362
+ this: LoDashExplicitWrapper<List<T> | null | undefined>,
2363
+ callback: MemoListIterator<T, TResult, List<T>>,
2364
+ accumulator: TResult
2365
+ ): LoDashExplicitWrapper<TResult>;
2366
+
2367
+ /**
2368
+ * @see _.reduce
2369
+ **/
2370
+ reduce<T extends object, TResult>(
2371
+ this: LoDashExplicitWrapper<T | null | undefined>,
2372
+ callback: MemoObjectIterator<T[keyof T], TResult, T>,
2373
+ accumulator: TResult
2374
+ ): LoDashExplicitWrapper<TResult>;
2375
+
2376
+ /**
2377
+ * @see _.reduce
2378
+ **/
2379
+ reduce<T, TResult>(
2380
+ this: LoDashExplicitWrapper<NumericDictionary<T> | null | undefined>,
2381
+ callback: MemoListIterator<T, TResult, NumericDictionary<T>>,
2382
+ accumulator: TResult
2383
+ ): LoDashExplicitWrapper<TResult>;
2384
+
2385
+ /**
2386
+ * @see _.reduce
2387
+ **/
2388
+ reduce<T, TResult>(
2389
+ this: LoDashExplicitWrapper<T[] | null | undefined>,
2390
+ callback: MemoListIterator<T, TResult, T[]>
2391
+ ): LoDashExplicitWrapper<TResult | undefined>;
2392
+
2393
+ /**
2394
+ * @see _.reduce
2395
+ **/
2396
+ reduce<T, TResult>(
2397
+ this: LoDashExplicitWrapper<List<T> | null | undefined>,
2398
+ callback: MemoListIterator<T, TResult, List<T>>
2399
+ ): LoDashExplicitWrapper<TResult | undefined>;
2400
+
2401
+ /**
2402
+ * @see _.reduce
2403
+ **/
2404
+ reduce<T extends object, TResult>(
2405
+ this: LoDashExplicitWrapper<T | null | undefined>,
2406
+ callback: MemoObjectIterator<T[keyof T], TResult, T>
2407
+ ): LoDashExplicitWrapper<TResult | undefined>;
2408
+
2409
+ /**
2410
+ * @see _.reduce
2411
+ **/
2412
+ reduce<T, TResult>(
2413
+ this: LoDashExplicitWrapper<NumericDictionary<T> | null | undefined>,
2414
+ callback: MemoListIterator<T, TResult, NumericDictionary<T>>
2415
+ ): LoDashExplicitWrapper<TResult | undefined>;
2416
+ }
2417
+
2418
+ // reduceRight
2419
+
2420
+ interface LoDashStatic {
2421
+ /**
2422
+ * This method is like _.reduce except that it iterates over elements of a collection from
2423
+ * right to left.
2424
+ * @param collection The collection to iterate over.
2425
+ * @param callback The function called per iteration.
2426
+ * @param accumulator Initial value of the accumulator.
2427
+ * @return The accumulated value.
2428
+ **/
2429
+ reduceRight<T, TResult>(
2430
+ collection: T[] | null | undefined,
2431
+ callback: MemoListIterator<T, TResult, T[]>,
2432
+ accumulator: TResult
2433
+ ): TResult;
2434
+
2435
+ /**
2436
+ * @see _.reduceRight
2437
+ **/
2438
+ reduceRight<T, TResult>(
2439
+ collection: List<T> | null | undefined,
2440
+ callback: MemoListIterator<T, TResult, List<T>>,
2441
+ accumulator: TResult
2442
+ ): TResult;
2443
+
2444
+ /**
2445
+ * @see _.reduceRight
2446
+ **/
2447
+ reduceRight<T extends object, TResult>(
2448
+ collection: T | null | undefined,
2449
+ callback: MemoObjectIterator<T[keyof T], TResult, T>,
2450
+ accumulator: TResult
2451
+ ): TResult;
2452
+
2453
+ /**
2454
+ * @see _.reduceRight
2455
+ **/
2456
+ reduceRight<T, TResult>(
2457
+ collection: NumericDictionary<T> | null | undefined,
2458
+ callback: MemoListIterator<T, TResult, NumericDictionary<T>>,
2459
+ accumulator: TResult
2460
+ ): TResult;
2461
+
2462
+ /**
2463
+ * @see _.reduceRight
2464
+ **/
2465
+ reduceRight<T, TResult>(
2466
+ collection: T[] | null | undefined,
2467
+ callback: MemoListIterator<T, TResult, T[]>
2468
+ ): TResult | undefined;
2469
+
2470
+ /**
2471
+ * @see _.reduceRight
2472
+ **/
2473
+ reduceRight<T, TResult>(
2474
+ collection: List<T> | null | undefined,
2475
+ callback: MemoListIterator<T, TResult, List<T>>
2476
+ ): TResult | undefined;
2477
+
2478
+ /**
2479
+ * @see _.reduceRight
2480
+ **/
2481
+ reduceRight<T extends object, TResult>(
2482
+ collection: T | null | undefined,
2483
+ callback: MemoObjectIterator<T[keyof T], TResult, T>
2484
+ ): TResult | undefined;
2485
+
2486
+ /**
2487
+ * @see _.reduceRight
2488
+ **/
2489
+ reduceRight<T, TResult>(
2490
+ collection: NumericDictionary<T> | null | undefined,
2491
+ callback: MemoListIterator<T, TResult, NumericDictionary<T>>
2492
+ ): TResult | undefined;
2493
+ }
2494
+
2495
+ interface LoDashImplicitWrapper<TValue> {
2496
+ /**
2497
+ * @see _.reduceRight
2498
+ **/
2499
+ reduceRight<T, TResult>(
2500
+ this: LoDashImplicitWrapper<T[] | null | undefined>,
2501
+ callback: MemoListIterator<T, TResult, T[]>,
2502
+ accumulator: TResult
2503
+ ): TResult;
2504
+
2505
+ /**
2506
+ * @see _.reduceRight
2507
+ **/
2508
+ reduceRight<T, TResult>(
2509
+ this: LoDashImplicitWrapper<List<T> | null | undefined>,
2510
+ callback: MemoListIterator<T, TResult, List<T>>,
2511
+ accumulator: TResult
2512
+ ): TResult;
2513
+
2514
+ /**
2515
+ * @see _.reduceRight
2516
+ **/
2517
+ reduceRight<T extends object, TResult>(
2518
+ this: LoDashImplicitWrapper<T | null | undefined>,
2519
+ callback: MemoObjectIterator<T[keyof T], TResult, T>,
2520
+ accumulator: TResult
2521
+ ): TResult;
2522
+
2523
+ /**
2524
+ * @see _.reduceRight
2525
+ **/
2526
+ reduceRight<T, TResult>(
2527
+ this: LoDashImplicitWrapper<NumericDictionary<T> | null | undefined>,
2528
+ callback: MemoListIterator<T, TResult, NumericDictionary<T>>,
2529
+ accumulator: TResult
2530
+ ): TResult;
2531
+
2532
+ /**
2533
+ * @see _.reduceRight
2534
+ **/
2535
+ reduceRight<T, TResult>(
2536
+ this: LoDashImplicitWrapper<T[] | null | undefined>,
2537
+ callback: MemoListIterator<T, TResult, T[]>
2538
+ ): TResult | undefined;
2539
+
2540
+ /**
2541
+ * @see _.reduceRight
2542
+ **/
2543
+ reduceRight<T, TResult>(
2544
+ this: LoDashImplicitWrapper<List<T> | null | undefined>,
2545
+ callback: MemoListIterator<T, TResult, List<T>>
2546
+ ): TResult | undefined;
2547
+
2548
+ /**
2549
+ * @see _.reduceRight
2550
+ **/
2551
+ reduceRight<T extends object, TResult>(
2552
+ this: LoDashImplicitWrapper<T | null | undefined>,
2553
+ callback: MemoObjectIterator<T[keyof T], TResult, T>
2554
+ ): TResult | undefined;
2555
+
2556
+ /**
2557
+ * @see _.reduceRight
2558
+ **/
2559
+ reduceRight<T, TResult>(
2560
+ this: LoDashImplicitWrapper<NumericDictionary<T> | null | undefined>,
2561
+ callback: MemoListIterator<T, TResult, NumericDictionary<T>>
2562
+ ): TResult | undefined;
2563
+ }
2564
+
2565
+ interface LoDashExplicitWrapper<TValue> {
2566
+ /**
2567
+ * @see _.reduceRight
2568
+ **/
2569
+ reduceRight<T, TResult>(
2570
+ this: LoDashExplicitWrapper<T[] | null | undefined>,
2571
+ callback: MemoListIterator<T, TResult, T[]>,
2572
+ accumulator: TResult
2573
+ ): LoDashExplicitWrapper<TResult>;
2574
+
2575
+ /**
2576
+ * @see _.reduceRight
2577
+ **/
2578
+ reduceRight<T, TResult>(
2579
+ this: LoDashExplicitWrapper<List<T> | null | undefined>,
2580
+ callback: MemoListIterator<T, TResult, List<T>>,
2581
+ accumulator: TResult
2582
+ ): LoDashExplicitWrapper<TResult>;
2583
+
2584
+ /**
2585
+ * @see _.reduceRight
2586
+ **/
2587
+ reduceRight<T extends object, TResult>(
2588
+ this: LoDashExplicitWrapper<T | null | undefined>,
2589
+ callback: MemoObjectIterator<T[keyof T], TResult, T>,
2590
+ accumulator: TResult
2591
+ ): LoDashExplicitWrapper<TResult>;
2592
+
2593
+ /**
2594
+ * @see _.reduceRight
2595
+ **/
2596
+ reduceRight<T, TResult>(
2597
+ this: LoDashExplicitWrapper<NumericDictionary<T> | null | undefined>,
2598
+ callback: MemoListIterator<T, TResult, NumericDictionary<T>>,
2599
+ accumulator: TResult
2600
+ ): LoDashExplicitWrapper<TResult>;
2601
+
2602
+ /**
2603
+ * @see _.reduceRight
2604
+ **/
2605
+ reduceRight<T, TResult>(
2606
+ this: LoDashExplicitWrapper<T[] | null | undefined>,
2607
+ callback: MemoListIterator<T, TResult, T[]>
2608
+ ): LoDashExplicitWrapper<TResult | undefined>;
2609
+
2610
+ /**
2611
+ * @see _.reduceRight
2612
+ **/
2613
+ reduceRight<T, TResult>(
2614
+ this: LoDashExplicitWrapper<List<T> | null | undefined>,
2615
+ callback: MemoListIterator<T, TResult, List<T>>
2616
+ ): LoDashExplicitWrapper<TResult | undefined>;
2617
+
2618
+ /**
2619
+ * @see _.reduceRight
2620
+ **/
2621
+ reduceRight<T extends object, TResult>(
2622
+ this: LoDashExplicitWrapper<T | null | undefined>,
2623
+ callback: MemoObjectIterator<T[keyof T], TResult, T>
2624
+ ): LoDashExplicitWrapper<TResult | undefined>;
2625
+
2626
+ /**
2627
+ * @see _.reduceRight
2628
+ **/
2629
+ reduceRight<T, TResult>(
2630
+ this: LoDashExplicitWrapper<NumericDictionary<T> | null | undefined>,
2631
+ callback: MemoListIterator<T, TResult, NumericDictionary<T>>
2632
+ ): LoDashExplicitWrapper<TResult | undefined>;
2633
+ }
2634
+
2635
+ // reject
2636
+
2637
+ interface LoDashStatic {
2638
+ /**
2639
+ * The opposite of _.filter; this method returns the elements of collection that predicate does not return
2640
+ * truthy for.
2641
+ *
2642
+ * @param collection The collection to iterate over.
2643
+ * @param predicate The function invoked per iteration.
2644
+ * @param thisArg The this binding of predicate.
2645
+ * @return Returns the new filtered array.
2646
+ */
2647
+ reject(
2648
+ collection: string | null | undefined,
2649
+ predicate?: StringIterator<boolean>
2650
+ ): string[];
2651
+
2652
+ /**
2653
+ * @see _.reject
2654
+ */
2655
+ reject<T>(
2656
+ collection: List<T> | null | undefined,
2657
+ predicate?: ListIterateeCustom<T, boolean>
2658
+ ): T[];
2659
+
2660
+ /**
2661
+ * @see _.reject
2662
+ */
2663
+ reject<T extends object>(
2664
+ collection: T | null | undefined,
2665
+ predicate?: ObjectIterateeCustom<T, boolean>
2666
+ ): Array<T[keyof T]>;
2667
+ }
2668
+
2669
+ interface LoDashImplicitWrapper<TValue> {
2670
+ /**
2671
+ * @see _.reject
2672
+ */
2673
+ reject(
2674
+ this: LoDashImplicitWrapper<string | null | undefined>,
2675
+ predicate?: StringIterator<boolean>
2676
+ ): LoDashImplicitWrapper<string[]>;
2677
+
2678
+ /**
2679
+ * @see _.reject
2680
+ */
2681
+ reject<T>(
2682
+ this: LoDashImplicitWrapper<List<T> | null | undefined>,
2683
+ predicate?: ListIterateeCustom<T, boolean>
2684
+ ): LoDashImplicitWrapper<T[]>;
2685
+
2686
+ /**
2687
+ * @see _.reject
2688
+ */
2689
+ reject<T extends object>(
2690
+ this: LoDashImplicitWrapper<T | null | undefined>,
2691
+ predicate?: ObjectIterateeCustom<T, boolean>
2692
+ ): LoDashImplicitWrapper<Array<T[keyof T]>>;
2693
+ }
2694
+
2695
+ interface LoDashExplicitWrapper<TValue> {
2696
+ /**
2697
+ * @see _.reject
2698
+ */
2699
+ reject(
2700
+ this: LoDashExplicitWrapper<string | null | undefined>,
2701
+ predicate?: StringIterator<boolean>
2702
+ ): LoDashExplicitWrapper<string[]>;
2703
+
2704
+ /**
2705
+ * @see _.reject
2706
+ */
2707
+ reject<T>(
2708
+ this: LoDashExplicitWrapper<List<T> | null | undefined>,
2709
+ predicate?: ListIterateeCustom<T, boolean>
2710
+ ): LoDashExplicitWrapper<T[]>;
2711
+
2712
+ /**
2713
+ * @see _.reject
2714
+ */
2715
+ reject<T extends object>(
2716
+ this: LoDashExplicitWrapper<T | null | undefined>,
2717
+ predicate?: ObjectIterateeCustom<T, boolean>
2718
+ ): LoDashExplicitWrapper<Array<T[keyof T]>>;
2719
+ }
2720
+
2721
+ // sample
2722
+
2723
+ interface LoDashStatic {
2724
+ /**
2725
+ * Gets a random element from collection.
2726
+ *
2727
+ * @param collection The collection to sample.
2728
+ * @return Returns the random element.
2729
+ */
2730
+ sample<T>(
2731
+ collection: List<T> | Dictionary<T> | NumericDictionary<T> | null | undefined
2732
+ ): T | undefined;
2733
+
2734
+ /**
2735
+ * @see _.sample
2736
+ */
2737
+ sample<T extends object>(
2738
+ collection: T
2739
+ ): T[keyof T];
2740
+
2741
+ /**
2742
+ * @see _.sample
2743
+ */
2744
+ sample<T extends object>(
2745
+ collection: T | null | undefined
2746
+ ): T[keyof T] | undefined;
2747
+ }
2748
+
2749
+ interface LoDashImplicitWrapper<TValue> {
2750
+ /**
2751
+ * @see _.sample
2752
+ */
2753
+ sample<T>(
2754
+ this: LoDashImplicitWrapper<List<T> | Dictionary<T> | NumericDictionary<T> | null | undefined>
2755
+ ): T | undefined;
2756
+
2757
+ /**
2758
+ * @see _.sample
2759
+ */
2760
+ sample<T extends object>(
2761
+ this: LoDashImplicitWrapper<T>,
2762
+ ): T[keyof T];
2763
+
2764
+ /**
2765
+ * @see _.sample
2766
+ */
2767
+ sample<T extends object>(
2768
+ this: LoDashImplicitWrapper<T | null | undefined>
2769
+ ): T[keyof T] | undefined;
2770
+ }
2771
+
2772
+ interface LoDashExplicitWrapper<TValue> {
2773
+ /**
2774
+ * @see _.sample
2775
+ */
2776
+ sample<T>(
2777
+ this: LoDashExplicitWrapper<List<T> | Dictionary<T> | NumericDictionary<T> | null | undefined>
2778
+ ): LoDashExplicitWrapper<T | undefined>;
2779
+
2780
+ /**
2781
+ * @see _.sample
2782
+ */
2783
+ sample<T extends object>(
2784
+ this: LoDashExplicitWrapper<T>,
2785
+ ): LoDashExplicitWrapper<T[keyof T]>;
2786
+
2787
+ /**
2788
+ * @see _.sample
2789
+ */
2790
+ sample<T extends object>(
2791
+ this: LoDashExplicitWrapper<T | null | undefined>
2792
+ ): LoDashExplicitWrapper<T[keyof T] | undefined>;
2793
+ }
2794
+
2795
+ // sampleSize
2796
+
2797
+ interface LoDashStatic {
2798
+ /**
2799
+ * Gets n random elements at unique keys from collection up to the size of collection.
2800
+ *
2801
+ * @param collection The collection to sample.
2802
+ * @param n The number of elements to sample.
2803
+ * @return Returns the random elements.
2804
+ */
2805
+ sampleSize<T>(
2806
+ collection: List<T>|Dictionary<T>|NumericDictionary<T> | null | undefined,
2807
+ n?: number
2808
+ ): T[];
2809
+
2810
+ /**
2811
+ * @see _.sampleSize
2812
+ */
2813
+ sampleSize<T extends object>(
2814
+ collection: T | null | undefined,
2815
+ n?: number
2816
+ ): Array<T[keyof T]>;
2817
+ }
2818
+
2819
+ interface LoDashImplicitWrapper<TValue> {
2820
+ /**
2821
+ * @see _.sampleSize
2822
+ */
2823
+ sampleSize<T>(
2824
+ this: LoDashImplicitWrapper<List<T>|Dictionary<T>|NumericDictionary<T> | null | undefined>,
2825
+ n?: number
2826
+ ): LoDashImplicitWrapper<T[]>;
2827
+
2828
+ /**
2829
+ * @see _.sampleSize
2830
+ */
2831
+ sampleSize<T extends object>(
2832
+ this: LoDashImplicitWrapper<T | null | undefined>,
2833
+ n?: number
2834
+ ): LoDashImplicitWrapper<Array<T[keyof T]>>;
2835
+ }
2836
+
2837
+ interface LoDashExplicitWrapper<TValue> {
2838
+ /**
2839
+ * @see _.sampleSize
2840
+ */
2841
+ sampleSize<T>(
2842
+ this: LoDashExplicitWrapper<List<T>|Dictionary<T>|NumericDictionary<T> | null | undefined>,
2843
+ n?: number
2844
+ ): LoDashExplicitWrapper<T[]>;
2845
+
2846
+ /**
2847
+ * @see _.sampleSize
2848
+ */
2849
+ sampleSize<T extends object>(
2850
+ this: LoDashExplicitWrapper<T | null | undefined>,
2851
+ n?: number
2852
+ ): LoDashExplicitWrapper<Array<T[keyof T]>>;
2853
+ }
2854
+
2855
+ // shuffle
2856
+
2857
+ interface LoDashStatic {
2858
+ /**
2859
+ * Creates an array of shuffled values, using a version of the Fisher-Yates shuffle.
2860
+ *
2861
+ * @param collection The collection to shuffle.
2862
+ * @return Returns the new shuffled array.
2863
+ */
2864
+ shuffle<T>(collection: List<T> | null | undefined): T[];
2865
+
2866
+ /**
2867
+ * @see _.shuffle
2868
+ */
2869
+ shuffle<T extends object>(collection: T | null | undefined): Array<T[keyof T]>;
2870
+ }
2871
+
2872
+ interface LoDashImplicitWrapper<TValue> {
2873
+ /**
2874
+ * @see _.shuffle
2875
+ */
2876
+ shuffle<T>(this: LoDashImplicitWrapper<List<T> | null | undefined>): LoDashImplicitWrapper<T[]>;
2877
+
2878
+ /**
2879
+ * @see _.shuffle
2880
+ */
2881
+ shuffle<T extends object>(this: LoDashImplicitWrapper<T | null | undefined>): LoDashImplicitWrapper<Array<T[keyof T]>>;
2882
+ }
2883
+
2884
+ interface LoDashExplicitWrapper<TValue> {
2885
+ /**
2886
+ * @see _.shuffle
2887
+ */
2888
+ shuffle<T>(this: LoDashExplicitWrapper<List<T> | null | undefined>): LoDashExplicitWrapper<T[]>;
2889
+
2890
+ /**
2891
+ * @see _.shuffle
2892
+ */
2893
+ shuffle<T extends object>(this: LoDashExplicitWrapper<T | null | undefined>): LoDashExplicitWrapper<Array<T[keyof T]>>;
2894
+ }
2895
+
2896
+ // size
2897
+
2898
+ interface LoDashStatic {
2899
+ /**
2900
+ * Gets the size of collection by returning its length for array-like values or the number of own enumerable
2901
+ * properties for objects.
2902
+ *
2903
+ * @param collection The collection to inspect.
2904
+ * @return Returns the size of collection.
2905
+ */
2906
+ size(collection: object | string | null | undefined): number;
2907
+ }
2908
+
2909
+ interface LoDashImplicitWrapper<TValue> {
2910
+ /**
2911
+ * @see _.size
2912
+ */
2913
+ size(): number;
2914
+ }
2915
+
2916
+ interface LoDashExplicitWrapper<TValue> {
2917
+ /**
2918
+ * @see _.size
2919
+ */
2920
+ size(): LoDashExplicitWrapper<number>;
2921
+ }
2922
+
2923
+ // some
2924
+
2925
+ interface LoDashStatic {
2926
+ /**
2927
+ * Checks if predicate returns truthy for any element of collection. Iteration is stopped once predicate
2928
+ * returns truthy. The predicate is invoked with three arguments: (value, index|key, collection).
2929
+ *
2930
+ * @param collection The collection to iterate over.
2931
+ * @param predicate The function invoked per iteration.
2932
+ * @return Returns true if any element passes the predicate check, else false.
2933
+ */
2934
+ some<T>(
2935
+ collection: List<T> | null | undefined,
2936
+ predicate?: ListIterateeCustom<T, boolean>
2937
+ ): boolean;
2938
+
2939
+ /**
2940
+ * @see _.some
2941
+ */
2942
+ some<T extends object>(
2943
+ collection: T | null | undefined,
2944
+ predicate?: ObjectIterateeCustom<T, boolean>
2945
+ ): boolean;
2946
+
2947
+ /**
2948
+ * @see _.some
2949
+ */
2950
+ some<T>(
2951
+ collection: NumericDictionary<T> | null | undefined,
2952
+ predicate?: NumericDictionaryIterateeCustom<T, boolean>
2953
+ ): boolean;
2954
+ }
2955
+
2956
+ interface LoDashImplicitWrapper<TValue> {
2957
+ /**
2958
+ * @see _.some
2959
+ */
2960
+ some<T>(
2961
+ this: LoDashImplicitWrapper<List<T> | null | undefined>,
2962
+ predicate?: ListIterateeCustom<T, boolean>
2963
+ ): boolean;
2964
+
2965
+ /**
2966
+ * @see _.some
2967
+ */
2968
+ some<T extends object>(
2969
+ this: LoDashImplicitWrapper<T | null | undefined>,
2970
+ predicate?: ObjectIterateeCustom<T, boolean>
2971
+ ): boolean;
2972
+
2973
+ /**
2974
+ * @see _.some
2975
+ */
2976
+ some<T>(
2977
+ this: LoDashImplicitWrapper<NumericDictionary<T> | null | undefined>,
2978
+ predicate?: NumericDictionaryIterateeCustom<T, boolean>
2979
+ ): boolean;
2980
+ }
2981
+
2982
+ interface LoDashExplicitWrapper<TValue> {
2983
+ /**
2984
+ * @see _.some
2985
+ */
2986
+ some<T>(
2987
+ this: LoDashExplicitWrapper<List<T> | null | undefined>,
2988
+ predicate?: ListIterateeCustom<T, boolean>
2989
+ ): LoDashExplicitWrapper<boolean>;
2990
+
2991
+ /**
2992
+ * @see _.some
2993
+ */
2994
+ some<T extends object>(
2995
+ this: LoDashExplicitWrapper<T | null | undefined>,
2996
+ predicate?: ObjectIterateeCustom<T, boolean>
2997
+ ): LoDashExplicitWrapper<boolean>;
2998
+
2999
+ /**
3000
+ * @see _.some
3001
+ */
3002
+ some<T>(
3003
+ this: LoDashExplicitWrapper<NumericDictionary<T> | null | undefined>,
3004
+ predicate?: NumericDictionaryIterateeCustom<T, boolean>
3005
+ ): LoDashExplicitWrapper<boolean>;
3006
+ }
3007
+
3008
+ // sortBy
3009
+
3010
+ interface LoDashStatic {
3011
+ /**
3012
+ * Creates an array of elements, sorted in ascending order by the results of
3013
+ * running each element in a collection through each iteratee. This method
3014
+ * performs a stable sort, that is, it preserves the original sort order of
3015
+ * equal elements. The iteratees are invoked with one argument: (value).
3016
+ *
3017
+ * @category Collection
3018
+ * @param collection The collection to iterate over.
3019
+ * @param [iteratees=[_.identity]]
3020
+ * The iteratees to sort by, specified individually or in arrays.
3021
+ * @returns Returns the new sorted array.
3022
+ * @example
3023
+ *
3024
+ * var users = [
3025
+ * { 'user': 'fred', 'age': 48 },
3026
+ * { 'user': 'barney', 'age': 36 },
3027
+ * { 'user': 'fred', 'age': 42 },
3028
+ * { 'user': 'barney', 'age': 34 }
3029
+ * ];
3030
+ *
3031
+ * _.sortBy(users, function(o) { return o.user; });
3032
+ * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 42]]
3033
+ *
3034
+ * _.sortBy(users, ['user', 'age']);
3035
+ * // => objects for [['barney', 34], ['barney', 36], ['fred', 42], ['fred', 48]]
3036
+ *
3037
+ * _.sortBy(users, 'user', function(o) {
3038
+ * return Math.floor(o.age / 10);
3039
+ * });
3040
+ * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 42]]
3041
+ */
3042
+ sortBy<T>(
3043
+ collection: List<T> | null | undefined,
3044
+ ...iteratees: Array<Many<ListIteratee<T>>>
3045
+ ): T[];
3046
+
3047
+ /**
3048
+ * @see _.sortBy
3049
+ */
3050
+ sortBy<T extends object>(
3051
+ collection: T | null | undefined,
3052
+ ...iteratees: Array<Many<ObjectIteratee<T>>>
3053
+ ): Array<T[keyof T]>;
3054
+ }
3055
+
3056
+ interface LoDashImplicitWrapper<TValue> {
3057
+ /**
3058
+ * @see _.sortBy
3059
+ */
3060
+ sortBy<T>(
3061
+ this: LoDashImplicitWrapper<List<T> | null | undefined>,
3062
+ ...iteratees: Array<Many<ListIteratee<T>>>
3063
+ ): LoDashImplicitWrapper<T[]>;
3064
+
3065
+ /**
3066
+ * @see _.sortBy
3067
+ */
3068
+ sortBy<T extends object>(
3069
+ this: LoDashImplicitWrapper<T | null | undefined>,
3070
+ ...iteratees: Array<Many<ObjectIteratee<T>>>
3071
+ ): LoDashImplicitWrapper<Array<T[keyof T]>>;
3072
+ }
3073
+
3074
+ interface LoDashExplicitWrapper<TValue> {
3075
+ /**
3076
+ * @see _.sortBy
3077
+ */
3078
+ sortBy<T>(
3079
+ this: LoDashExplicitWrapper<List<T> | null | undefined>,
3080
+ ...iteratees: Array<Many<ListIteratee<T>>>
3081
+ ): LoDashExplicitWrapper<T[]>;
3082
+
3083
+ /**
3084
+ * @see _.sortBy
3085
+ */
3086
+ sortBy<T extends object>(
3087
+ this: LoDashExplicitWrapper<T | null | undefined>,
3088
+ ...iteratees: Array<Many<ObjectIteratee<T>>>
3089
+ ): LoDashExplicitWrapper<Array<T[keyof T]>>;
3090
+ }
3091
+ }