@types/lodash 4.14.108 → 4.14.109

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