Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

18545 Zeilen
440 KiB

  1. // Generated by typings
  2. // Source: https://raw.githubusercontent.com/types/npm-lodash/9b83559bbd3454f0cd9e4020c920e36eee80d5a3/index.d.ts
  3. declare module 'lodash' {
  4. /*
  5. ### 4.0.0 Changelog (https://github.com/lodash/lodash/wiki/Changelog)
  6. #### TODO:
  7. removed:
  8. - [x] Removed _.support
  9. - [x] Removed _.findWhere in favor of _.find with iteratee shorthand
  10. - [x] Removed _.where in favor of _.filter with iteratee shorthand
  11. - [x] Removed _.pluck in favor of _.map with iteratee shorthand
  12. renamed:
  13. - [x] Renamed _.first to _.head
  14. - [x] Renamed _.indexBy to _.keyBy
  15. - [x] Renamed _.invoke to _.invokeMap
  16. - [x] Renamed _.overArgs to _.overArgs
  17. - [x] Renamed _.padLeft & _.padRight to _.padStart & _.padEnd
  18. - [x] Renamed _.pairs to _.toPairs
  19. - [x] Renamed _.rest to _.tail
  20. - [x] Renamed _.restParam to _.rest
  21. - [x] Renamed _.sortByOrder to _.orderBy
  22. - [x] Renamed _.trimLeft & _.trimRight to _.trimStart & _.trimEnd
  23. - [x] Renamed _.trunc to _.truncate
  24. split:
  25. - [x] Split _.indexOf & _.lastIndexOf into _.sortedIndexOf & _.sortedLastIndexOf
  26. - [x] Split _.max & _.min into _.maxBy & _.minBy
  27. - [x] Split _.omit & _.pick into _.omitBy & _.pickBy
  28. - [x] Split _.sample into _.sampleSize
  29. - [x] Split _.sortedIndex into _.sortedIndexBy
  30. - [x] Split _.sortedLastIndex into _.sortedLastIndexBy
  31. - [x] Split _.uniq into _.sortedUniq, _.sortedUniqBy, & _.uniqBy
  32. changes:
  33. - [x] Absorbed _.sortByAll into _.sortBy
  34. - [x] Changed the category of _.at to Object
  35. - [x] Changed the category of _.bindAll to Utility
  36. - [x] Made _.capitalize uppercase the first character & lowercase the rest
  37. - [x] Made _.functions return only own method names
  38. added 23 array methods:
  39. - [x] _.concat
  40. - [x] _.differenceBy
  41. - [x] _.differenceWith
  42. - [x] _.flatMap
  43. - [x] _.fromPairs
  44. - [x] _.intersectionBy
  45. - [x] _.intersectionWith
  46. - [x] _.join
  47. - [x] _.pullAll
  48. - [x] _.pullAllBy
  49. - [x] _.reverse
  50. - [x] _.sortedIndexBy
  51. - [x] _.sortedIndexOf
  52. - [x] _.sortedLastIndexBy
  53. - [x] _.sortedLastIndexOf
  54. - [x] _.sortedUniq
  55. - [x] _.sortedUniqBy
  56. - [x] _.unionBy
  57. - [x] _.unionWith
  58. - [x] _.uniqBy
  59. - [x] _.uniqWith
  60. - [x] _.xorBy
  61. - [x] _.xorWith
  62. added 18 lang methods:
  63. - [x] _.cloneDeepWith
  64. - [x] _.cloneWith
  65. - [x] _.eq
  66. - [x] _.isArrayLike
  67. - [x] _.isArrayLikeObject
  68. - [x] _.isEqualWith
  69. - [x] _.isInteger
  70. - [x] _.isLength
  71. - [x] _.isMatchWith
  72. - [x] _.isNil
  73. - [x] _.isObjectLike
  74. - [x] _.isSafeInteger
  75. - [x] _.isSymbol
  76. - [x] _.toInteger
  77. - [x] _.toLength
  78. - [x] _.toNumber
  79. - [x] _.toSafeInteger
  80. - [x] _.toString
  81. added 13 object methods:
  82. - [x] _.assignIn
  83. - [x] _.assignInWith
  84. - [x] _.assignWith
  85. - [x] _.functionsIn
  86. - [x] _.hasIn
  87. - [x] _.mergeWith
  88. - [x] _.omitBy
  89. - [x] _.pickBy
  90. added 8 string methods:
  91. - [x] _.lowerCase
  92. - [x] _.lowerFirst
  93. - [x] _.upperCase
  94. - [x] _.upperFirst
  95. - [x] _.toLower
  96. - [x] _.toUpper
  97. added 8 utility methods:
  98. - [x] _.toPath
  99. added 4 math methods:
  100. - [x] _.maxBy
  101. - [x] _.mean
  102. - [x] _.minBy
  103. - [x] _.sumBy
  104. added 2 function methods:
  105. - [x] _.flip
  106. - [x] _.unary
  107. added 2 number methods:
  108. - [x] _.clamp
  109. - [x] _.subtract
  110. added collection method:
  111. - [x] _.sampleSize
  112. Added 3 aliases
  113. - [x] _.first as an alias of _.head
  114. Removed 17 aliases
  115. - [x] Removed aliase _.all
  116. - [x] Removed aliase _.any
  117. - [x] Removed aliase _.backflow
  118. - [x] Removed aliase _.callback
  119. - [x] Removed aliase _.collect
  120. - [x] Removed aliase _.compose
  121. - [x] Removed aliase _.contains
  122. - [x] Removed aliase _.detect
  123. - [x] Removed aliase _.foldl
  124. - [x] Removed aliase _.foldr
  125. - [x] Removed aliase _.include
  126. - [x] Removed aliase _.inject
  127. - [x] Removed aliase _.methods
  128. - [x] Removed aliase _.object
  129. - [x] Removed aliase _.run
  130. - [x] Removed aliase _.select
  131. - [x] Removed aliase _.unique
  132. Other changes
  133. - [x] Added support for array buffers to _.isEqual
  134. - [x] Added support for converting iterators to _.toArray
  135. - [x] Added support for deep paths to _.zipObject
  136. - [x] Changed UMD to export to window or self when available regardless of other exports
  137. - [x] Ensured debounce cancel clears args & thisArg references
  138. - [x] Ensured _.add, _.subtract, & _.sum dont skip NaN values
  139. - [x] Ensured _.clone treats generators like functions
  140. - [x] Ensured _.clone produces clones with the sources [[Prototype]]
  141. - [x] Ensured _.defaults assigns properties that shadow Object.prototype
  142. - [x] Ensured _.defaultsDeep doesnt merge a string into an array
  143. - [x] Ensured _.defaultsDeep & _.merge dont modify sources
  144. - [x] Ensured _.defaultsDeep works with circular references
  145. - [x] Ensured _.keys skips length on strict mode arguments objects in Safari 9
  146. - [x] Ensured _.merge doesnt convert strings to arrays
  147. - [x] Ensured _.merge merges plain-objects onto non plain-objects
  148. - [x] Ensured _#plant resets iterator data of cloned sequences
  149. - [x] Ensured _.random swaps min & max if min is greater than max
  150. - [x] Ensured _.range preserves the sign of start of -0
  151. - [x] Ensured _.reduce & _.reduceRight use getIteratee in their array branch
  152. - [x] Fixed rounding issue with the precision param of _.floor
  153. ** LATER **
  154. Misc:
  155. - [ ] Made _.forEach, _.forIn, _.forOwn, & _.times implicitly end a chain sequence
  156. - [ ] Removed thisArg params from most methods
  157. - [ ] Made By methods provide a single param to iteratees
  158. - [ ] Made _.words chainable by default
  159. - [ ] Removed isDeep params from _.clone & _.flatten
  160. - [ ] Removed _.bindAll support for binding all methods when no names are provided
  161. - [ ] Removed func-first param signature from _.before & _.after
  162. - [ ] _.extend as an alias of _.assignIn
  163. - [ ] _.extendWith as an alias of _.assignInWith
  164. - [ ] Added clear method to _.memoize.Cache
  165. - [ ] Added flush method to debounced & throttled functions
  166. - [ ] Added support for ES6 maps, sets, & symbols to _.clone, _.isEqual, & _.toArray
  167. - [ ] Enabled _.flow & _.flowRight to accept an array of functions
  168. - [ ] Ensured Collection methods treat functions as objects
  169. - [ ] Ensured _.assign, _.defaults, & _.merge coerce object values to objects
  170. - [ ] Ensured _.bindKey bound functions call object[key] when called with the new operator
  171. - [ ] Ensured _.isFunction returns true for generator functions
  172. - [ ] Ensured _.merge assigns typed arrays directly
  173. - [ ] Made _(...) an iterator & iterable
  174. - [ ] Made _.drop, _.take, & right forms coerce n of undefined to 0
  175. Methods:
  176. - [ ] _.concat
  177. - [ ] _.differenceBy
  178. - [ ] _.differenceWith
  179. - [ ] _.flatMap
  180. - [x] _.fromPairs
  181. - [ ] _.intersectionBy
  182. - [ ] _.intersectionWith
  183. - [ ] _.join
  184. - [ ] _.pullAll
  185. - [ ] _.pullAllBy
  186. - [ ] _.reverse
  187. - [ ] _.sortedLastIndexOf
  188. - [ ] _.unionBy
  189. - [ ] _.unionWith
  190. - [ ] _.uniqWith
  191. - [ ] _.xorBy
  192. - [ ] _.xorWith
  193. - [ ] _.toString
  194. - [ ] _.invoke
  195. - [ ] _.setWith
  196. - [ ] _.toPairs
  197. - [ ] _.toPairsIn
  198. - [ ] _.unset
  199. - [ ] _.replace
  200. - [ ] _.split
  201. - [ ] _.cond
  202. - [ ] _.conforms
  203. - [ ] _.nthArg
  204. - [ ] _.over
  205. - [ ] _.overEvery
  206. - [ ] _.overSome
  207. - [ ] _.rangeRight
  208. - [ ] _.next
  209. */
  210. var _: _.LoDashStatic;
  211. namespace _ {
  212. interface LoDashStatic {
  213. /**
  214. * Creates a lodash object which wraps the given value to enable intuitive method chaining.
  215. *
  216. * In addition to Lo-Dash methods, wrappers also have the following Array methods:
  217. * concat, join, pop, push, reverse, shift, slice, sort, splice, and unshift
  218. *
  219. * Chaining is supported in custom builds as long as the value method is implicitly or
  220. * explicitly included in the build.
  221. *
  222. * The chainable wrapper functions are:
  223. * after, assign, bind, bindAll, bindKey, chain, chunk, compact, compose, concat, countBy,
  224. * createCallback, curry, debounce, defaults, defer, delay, difference, filter, flatten,
  225. * forEach, forEachRight, forIn, forInRight, forOwn, forOwnRight, functions, groupBy,
  226. * keyBy, initial, intersection, invert, invoke, keys, map, max, memoize, merge, min,
  227. * object, omit, once, pairs, partial, partialRight, pick, pluck, pull, push, range, reject,
  228. * remove, rest, reverse, sample, shuffle, slice, sort, sortBy, splice, tap, throttle, times,
  229. * toArray, transform, union, uniq, unset, unshift, unzip, values, where, without, wrap, and zip
  230. *
  231. * The non-chainable wrapper functions are:
  232. * clone, cloneDeep, contains, escape, every, find, findIndex, findKey, findLast,
  233. * findLastIndex, findLastKey, has, identity, indexOf, isArguments, isArray, isBoolean,
  234. * isDate, isElement, isEmpty, isEqual, isFinite, isFunction, isNaN, isNull, isNumber,
  235. * isObject, isPlainObject, isRegExp, isString, isUndefined, join, lastIndexOf, mixin,
  236. * noConflict, parseInt, pop, random, reduce, reduceRight, result, shift, size, some,
  237. * sortedIndex, runInContext, template, unescape, uniqueId, and value
  238. *
  239. * The wrapper functions first and last return wrapped values when n is provided, otherwise
  240. * they return unwrapped values.
  241. *
  242. * Explicit chaining can be enabled by using the _.chain method.
  243. */
  244. (value: number): LoDashImplicitWrapper<number>;
  245. (value: string): LoDashImplicitStringWrapper;
  246. (value: boolean): LoDashImplicitWrapper<boolean>;
  247. (value: Array<number>): LoDashImplicitNumberArrayWrapper;
  248. <T>(value: Array<T>): LoDashImplicitArrayWrapper<T>;
  249. <T extends {}>(value: T): LoDashImplicitObjectWrapper<T>;
  250. (value: any): LoDashImplicitWrapper<any>;
  251. /**
  252. * The semantic version number.
  253. */
  254. VERSION: string;
  255. /**
  256. * By default, the template delimiters used by Lo-Dash are similar to those in embedded Ruby
  257. * (ERB). Change the following template settings to use alternative delimiters.
  258. */
  259. templateSettings: TemplateSettings;
  260. }
  261. /**
  262. * By default, the template delimiters used by Lo-Dash are similar to those in embedded Ruby
  263. * (ERB). Change the following template settings to use alternative delimiters.
  264. */
  265. interface TemplateSettings {
  266. /**
  267. * The "escape" delimiter.
  268. */
  269. escape?: RegExp;
  270. /**
  271. * The "evaluate" delimiter.
  272. */
  273. evaluate?: RegExp;
  274. /**
  275. * An object to import into the template as local variables.
  276. */
  277. imports?: Dictionary<any>;
  278. /**
  279. * The "interpolate" delimiter.
  280. */
  281. interpolate?: RegExp;
  282. /**
  283. * Used to reference the data object in the template text.
  284. */
  285. variable?: string;
  286. }
  287. /**
  288. * Creates a cache object to store key/value pairs.
  289. */
  290. interface MapCache {
  291. /**
  292. * Removes `key` and its value from the cache.
  293. * @param key The key of the value to remove.
  294. * @return Returns `true` if the entry was removed successfully, else `false`.
  295. */
  296. delete(key: string): boolean;
  297. /**
  298. * Gets the cached value for `key`.
  299. * @param key The key of the value to get.
  300. * @return Returns the cached value.
  301. */
  302. get(key: string): any;
  303. /**
  304. * Checks if a cached value for `key` exists.
  305. * @param key The key of the entry to check.
  306. * @return Returns `true` if an entry for `key` exists, else `false`.
  307. */
  308. has(key: string): boolean;
  309. /**
  310. * Sets `value` to `key` of the cache.
  311. * @param key The key of the value to cache.
  312. * @param value The value to cache.
  313. * @return Returns the cache object.
  314. */
  315. set(key: string, value: any): _.Dictionary<any>;
  316. }
  317. interface LoDashWrapperBase<T, TWrapper> { }
  318. interface LoDashImplicitWrapperBase<T, TWrapper> extends LoDashWrapperBase<T, TWrapper> { }
  319. interface LoDashExplicitWrapperBase<T, TWrapper> extends LoDashWrapperBase<T, TWrapper> { }
  320. interface LoDashImplicitWrapper<T> extends LoDashImplicitWrapperBase<T, LoDashImplicitWrapper<T>> { }
  321. interface LoDashExplicitWrapper<T> extends LoDashExplicitWrapperBase<T, LoDashExplicitWrapper<T>> { }
  322. interface LoDashImplicitStringWrapper extends LoDashImplicitWrapper<string> { }
  323. interface LoDashExplicitStringWrapper extends LoDashExplicitWrapper<string> { }
  324. interface LoDashImplicitObjectWrapper<T> extends LoDashImplicitWrapperBase<T, LoDashImplicitObjectWrapper<T>> { }
  325. interface LoDashExplicitObjectWrapper<T> extends LoDashExplicitWrapperBase<T, LoDashExplicitObjectWrapper<T>> { }
  326. interface LoDashImplicitArrayWrapper<T> extends LoDashImplicitWrapperBase<T[], LoDashImplicitArrayWrapper<T>> {
  327. pop(): T;
  328. push(...items: T[]): LoDashImplicitArrayWrapper<T>;
  329. shift(): T;
  330. sort(compareFn?: (a: T, b: T) => number): LoDashImplicitArrayWrapper<T>;
  331. splice(start: number): LoDashImplicitArrayWrapper<T>;
  332. splice(start: number, deleteCount: number, ...items: any[]): LoDashImplicitArrayWrapper<T>;
  333. unshift(...items: T[]): LoDashImplicitArrayWrapper<T>;
  334. }
  335. interface LoDashExplicitArrayWrapper<T> extends LoDashExplicitWrapperBase<T[], LoDashExplicitArrayWrapper<T>> { }
  336. interface LoDashImplicitNumberArrayWrapper extends LoDashImplicitArrayWrapper<number> { }
  337. interface LoDashExplicitNumberArrayWrapper extends LoDashExplicitArrayWrapper<number> { }
  338. /*********
  339. * Array *
  340. ********/
  341. // _.chunk
  342. interface LoDashStatic {
  343. /**
  344. * Creates an array of elements split into groups the length of size. If collection cant be split evenly, the
  345. * final chunk will be the remaining elements.
  346. *
  347. * @param array The array to process.
  348. * @param size The length of each chunk.
  349. * @return Returns the new array containing chunks.
  350. */
  351. chunk<T>(
  352. array: List<T>,
  353. size?: number
  354. ): T[][];
  355. }
  356. interface LoDashImplicitArrayWrapper<T> {
  357. /**
  358. * @see _.chunk
  359. */
  360. chunk(size?: number): LoDashImplicitArrayWrapper<T[]>;
  361. }
  362. interface LoDashImplicitObjectWrapper<T> {
  363. /**
  364. * @see _.chunk
  365. */
  366. chunk<TResult>(size?: number): LoDashImplicitArrayWrapper<TResult[]>;
  367. }
  368. interface LoDashExplicitArrayWrapper<T> {
  369. /**
  370. * @see _.chunk
  371. */
  372. chunk(size?: number): LoDashExplicitArrayWrapper<T[]>;
  373. }
  374. interface LoDashExplicitObjectWrapper<T> {
  375. /**
  376. * @see _.chunk
  377. */
  378. chunk<TResult>(size?: number): LoDashExplicitArrayWrapper<TResult[]>;
  379. }
  380. // _.compact
  381. interface LoDashStatic {
  382. /**
  383. * Creates an array with all falsey values removed. The values false, null, 0, "", undefined, and NaN are
  384. * falsey.
  385. *
  386. * @param array The array to compact.
  387. * @return (Array) Returns the new array of filtered values.
  388. */
  389. compact<T>(array?: List<T>): T[];
  390. }
  391. interface LoDashImplicitArrayWrapper<T> {
  392. /**
  393. * @see _.compact
  394. */
  395. compact(): LoDashImplicitArrayWrapper<T>;
  396. }
  397. interface LoDashImplicitObjectWrapper<T> {
  398. /**
  399. * @see _.compact
  400. */
  401. compact<TResult>(): LoDashImplicitArrayWrapper<TResult>;
  402. }
  403. interface LoDashExplicitArrayWrapper<T> {
  404. /**
  405. * @see _.compact
  406. */
  407. compact(): LoDashExplicitArrayWrapper<T>;
  408. }
  409. interface LoDashExplicitObjectWrapper<T> {
  410. /**
  411. * @see _.compact
  412. */
  413. compact<TResult>(): LoDashExplicitArrayWrapper<TResult>;
  414. }
  415. // _.concat DUMMY
  416. interface LoDashStatic {
  417. /**
  418. * Creates a new array concatenating `array` with any additional arrays
  419. * and/or values.
  420. *
  421. * @static
  422. * @memberOf _
  423. * @category Array
  424. * @param {Array} array The array to concatenate.
  425. * @param {...*} [values] The values to concatenate.
  426. * @returns {Array} Returns the new concatenated array.
  427. * @example
  428. *
  429. * var array = [1];
  430. * var other = _.concat(array, 2, [3], [[4]]);
  431. *
  432. * console.log(other);
  433. * // => [1, 2, 3, [4]]
  434. *
  435. * console.log(array);
  436. * // => [1]
  437. */
  438. concat<T>(...values: (T[] | List<T>)[]): T[];
  439. }
  440. // _.difference
  441. interface LoDashStatic {
  442. /**
  443. * Creates an array of unique array values not included in the other provided arrays using SameValueZero for
  444. * equality comparisons.
  445. *
  446. * @param array The array to inspect.
  447. * @param values The arrays of values to exclude.
  448. * @return Returns the new array of filtered values.
  449. */
  450. difference<T>(
  451. array: T[] | List<T>,
  452. ...values: Array<T[] | List<T>>
  453. ): T[];
  454. }
  455. interface LoDashImplicitArrayWrapper<T> {
  456. /**
  457. * @see _.difference
  458. */
  459. difference(...values: (T[] | List<T>)[]): LoDashImplicitArrayWrapper<T>;
  460. }
  461. interface LoDashImplicitObjectWrapper<T> {
  462. /**
  463. * @see _.difference
  464. */
  465. difference<TValue>(...values: (TValue[] | List<TValue>)[]): LoDashImplicitArrayWrapper<TValue>;
  466. }
  467. interface LoDashExplicitArrayWrapper<T> {
  468. /**
  469. * @see _.difference
  470. */
  471. difference(...values: (T[] | List<T>)[]): LoDashExplicitArrayWrapper<T>;
  472. }
  473. interface LoDashExplicitObjectWrapper<T> {
  474. /**
  475. * @see _.difference
  476. */
  477. difference<TValue>(...values: (TValue[] | List<TValue>)[]): LoDashExplicitArrayWrapper<TValue>;
  478. }
  479. // _.differenceBy
  480. interface LoDashStatic {
  481. /**
  482. * This method is like _.difference except that it accepts iteratee which is invoked for each element of array
  483. * and values to generate the criterion by which uniqueness is computed. The iteratee is invoked with one
  484. * argument: (value).
  485. *
  486. * @param array The array to inspect.
  487. * @param values The values to exclude.
  488. * @param iteratee The iteratee invoked per element.
  489. * @returns Returns the new array of filtered values.
  490. */
  491. differenceBy<T>(
  492. array: T[] | List<T>,
  493. values?: T[] | List<T>,
  494. iteratee?: ((value: T) => any) | string
  495. ): T[];
  496. /**
  497. * @see _.differenceBy
  498. */
  499. differenceBy<T, W extends Object>(
  500. array: T[] | List<T>,
  501. values?: T[] | List<T>,
  502. iteratee?: W
  503. ): T[];
  504. /**
  505. * @see _.differenceBy
  506. */
  507. differenceBy<T>(
  508. array: T[] | List<T>,
  509. values1?: T[] | List<T>,
  510. values2?: T[] | List<T>,
  511. iteratee?: ((value: T) => any) | string
  512. ): T[];
  513. /**
  514. * @see _.differenceBy
  515. */
  516. differenceBy<T, W extends Object>(
  517. array: T[] | List<T>,
  518. values1?: T[] | List<T>,
  519. values2?: T[] | List<T>,
  520. iteratee?: W
  521. ): T[];
  522. /**
  523. * @see _.differenceBy
  524. */
  525. differenceBy<T>(
  526. array: T[] | List<T>,
  527. values1?: T[] | List<T>,
  528. values2?: T[] | List<T>,
  529. values3?: T[] | List<T>,
  530. iteratee?: ((value: T) => any) | string
  531. ): T[];
  532. /**
  533. * @see _.differenceBy
  534. */
  535. differenceBy<T, W extends Object>(
  536. array: T[] | List<T>,
  537. values1?: T[] | List<T>,
  538. values2?: T[] | List<T>,
  539. values3?: T[] | List<T>,
  540. iteratee?: W
  541. ): T[];
  542. /**
  543. * @see _.differenceBy
  544. */
  545. differenceBy<T, W extends Object>(
  546. array: T[] | List<T>,
  547. values1?: T[] | List<T>,
  548. values2?: T[] | List<T>,
  549. values3?: T[] | List<T>,
  550. values4?: T[] | List<T>,
  551. iteratee?: W
  552. ): T[];
  553. /**
  554. * @see _.differenceBy
  555. */
  556. differenceBy<T>(
  557. array: T[] | List<T>,
  558. values1?: T[] | List<T>,
  559. values2?: T[] | List<T>,
  560. values3?: T[] | List<T>,
  561. values4?: T[] | List<T>,
  562. iteratee?: ((value: T) => any) | string
  563. ): T[];
  564. /**
  565. * @see _.differenceBy
  566. */
  567. differenceBy<T>(
  568. array: T[] | List<T>,
  569. values1?: T[] | List<T>,
  570. values2?: T[] | List<T>,
  571. values3?: T[] | List<T>,
  572. values4?: T[] | List<T>,
  573. values5?: T[] | List<T>,
  574. iteratee?: ((value: T) => any) | string
  575. ): T[];
  576. /**
  577. * @see _.differenceBy
  578. */
  579. differenceBy<T, W extends Object>(
  580. array: T[] | List<T>,
  581. values1?: T[] | List<T>,
  582. values2?: T[] | List<T>,
  583. values3?: T[] | List<T>,
  584. values4?: T[] | List<T>,
  585. values5?: T[] | List<T>,
  586. iteratee?: W
  587. ): T[];
  588. /**
  589. * @see _.differenceBy
  590. */
  591. differenceBy<T>(
  592. array: T[] | List<T>,
  593. ...values: any[]
  594. ): T[];
  595. }
  596. interface LoDashImplicitArrayWrapper<T> {
  597. /**
  598. * @see _.differenceBy
  599. */
  600. differenceBy<T>(
  601. values?: T[] | List<T>,
  602. iteratee?: ((value: T) => any) | string
  603. ): LoDashImplicitArrayWrapper<T>;
  604. /**
  605. * @see _.differenceBy
  606. */
  607. differenceBy<T, W extends Object>(
  608. values?: T[] | List<T>,
  609. iteratee?: W
  610. ): LoDashImplicitArrayWrapper<T>;
  611. /**
  612. * @see _.differenceBy
  613. */
  614. differenceBy<T>(
  615. values1?: T[] | List<T>,
  616. values2?: T[] | List<T>,
  617. iteratee?: ((value: T) => any) | string
  618. ): LoDashImplicitArrayWrapper<T>;
  619. /**
  620. * @see _.differenceBy
  621. */
  622. differenceBy<T, W extends Object>(
  623. values1?: T[] | List<T>,
  624. values2?: T[] | List<T>,
  625. iteratee?: W
  626. ): LoDashImplicitArrayWrapper<T>;
  627. /**
  628. * @see _.differenceBy
  629. */
  630. differenceBy<T>(
  631. values1?: T[] | List<T>,
  632. values2?: T[] | List<T>,
  633. values3?: T[] | List<T>,
  634. iteratee?: ((value: T) => any) | string
  635. ): LoDashImplicitArrayWrapper<T>;
  636. /**
  637. * @see _.differenceBy
  638. */
  639. differenceBy<T, W extends Object>(
  640. values1?: T[] | List<T>,
  641. values2?: T[] | List<T>,
  642. values3?: T[] | List<T>,
  643. iteratee?: W
  644. ): LoDashImplicitArrayWrapper<T>;
  645. /**
  646. * @see _.differenceBy
  647. */
  648. differenceBy<T>(
  649. values1?: T[] | List<T>,
  650. values2?: T[] | List<T>,
  651. values3?: T[] | List<T>,
  652. values4?: T[] | List<T>,
  653. iteratee?: ((value: T) => any) | string
  654. ): LoDashImplicitArrayWrapper<T>;
  655. /**
  656. * @see _.differenceBy
  657. */
  658. differenceBy<T, W extends Object>(
  659. values1?: T[] | List<T>,
  660. values2?: T[] | List<T>,
  661. values3?: T[] | List<T>,
  662. values4?: T[] | List<T>,
  663. iteratee?: W
  664. ): LoDashImplicitArrayWrapper<T>;
  665. /**
  666. * @see _.differenceBy
  667. */
  668. differenceBy<T>(
  669. values1?: T[] | List<T>,
  670. values2?: T[] | List<T>,
  671. values3?: T[] | List<T>,
  672. values4?: T[] | List<T>,
  673. values5?: T[] | List<T>,
  674. iteratee?: ((value: T) => any) | string
  675. ): LoDashImplicitArrayWrapper<T>;
  676. /**
  677. * @see _.differenceBy
  678. */
  679. differenceBy<T, W extends Object>(
  680. values1?: T[] | List<T>,
  681. values2?: T[] | List<T>,
  682. values3?: T[] | List<T>,
  683. values4?: T[] | List<T>,
  684. values5?: T[] | List<T>,
  685. iteratee?: W
  686. ): LoDashImplicitArrayWrapper<T>;
  687. /**
  688. * @see _.differenceBy
  689. */
  690. differenceBy<T>(
  691. ...values: any[]
  692. ): LoDashImplicitArrayWrapper<T>;
  693. }
  694. interface LoDashImplicitObjectWrapper<T> {
  695. /**
  696. * @see _.differenceBy
  697. */
  698. differenceBy<T>(
  699. values?: T[] | List<T>,
  700. iteratee?: ((value: T) => any) | string
  701. ): LoDashImplicitArrayWrapper<T>;
  702. /**
  703. * @see _.differenceBy
  704. */
  705. differenceBy<T, W extends Object>(
  706. values?: T[] | List<T>,
  707. iteratee?: W
  708. ): LoDashImplicitArrayWrapper<T>;
  709. /**
  710. * @see _.differenceBy
  711. */
  712. differenceBy<T>(
  713. values1?: T[] | List<T>,
  714. values2?: T[] | List<T>,
  715. iteratee?: ((value: T) => any) | string
  716. ): LoDashImplicitArrayWrapper<T>;
  717. /**
  718. * @see _.differenceBy
  719. */
  720. differenceBy<T, W extends Object>(
  721. values1?: T[] | List<T>,
  722. values2?: T[] | List<T>,
  723. iteratee?: W
  724. ): LoDashImplicitArrayWrapper<T>;
  725. /**
  726. * @see _.differenceBy
  727. */
  728. differenceBy<T>(
  729. values1?: T[] | List<T>,
  730. values2?: T[] | List<T>,
  731. values3?: T[] | List<T>,
  732. iteratee?: ((value: T) => any) | string
  733. ): LoDashImplicitArrayWrapper<T>;
  734. /**
  735. * @see _.differenceBy
  736. */
  737. differenceBy<T, W extends Object>(
  738. values1?: T[] | List<T>,
  739. values2?: T[] | List<T>,
  740. values3?: T[] | List<T>,
  741. iteratee?: W
  742. ): LoDashImplicitArrayWrapper<T>;
  743. /**
  744. * @see _.differenceBy
  745. */
  746. differenceBy<T>(
  747. values1?: T[] | List<T>,
  748. values2?: T[] | List<T>,
  749. values3?: T[] | List<T>,
  750. values4?: T[] | List<T>,
  751. iteratee?: ((value: T) => any) | string
  752. ): LoDashImplicitArrayWrapper<T>;
  753. /**
  754. * @see _.differenceBy
  755. */
  756. differenceBy<T, W extends Object>(
  757. values1?: T[] | List<T>,
  758. values2?: T[] | List<T>,
  759. values3?: T[] | List<T>,
  760. values4?: T[] | List<T>,
  761. iteratee?: W
  762. ): LoDashImplicitArrayWrapper<T>;
  763. /**
  764. * @see _.differenceBy
  765. */
  766. differenceBy<T>(
  767. values1?: T[] | List<T>,
  768. values2?: T[] | List<T>,
  769. values3?: T[] | List<T>,
  770. values4?: T[] | List<T>,
  771. values5?: T[] | List<T>,
  772. iteratee?: ((value: T) => any) | string
  773. ): LoDashImplicitArrayWrapper<T>;
  774. /**
  775. * @see _.differenceBy
  776. */
  777. differenceBy<T, W extends Object>(
  778. values1?: T[] | List<T>,
  779. values2?: T[] | List<T>,
  780. values3?: T[] | List<T>,
  781. values4?: T[] | List<T>,
  782. values5?: T[] | List<T>,
  783. iteratee?: W
  784. ): LoDashImplicitArrayWrapper<T>;
  785. /**
  786. * @see _.differenceBy
  787. */
  788. differenceBy<T>(
  789. ...values: any[]
  790. ): LoDashImplicitArrayWrapper<T>;
  791. }
  792. interface LoDashExplicitArrayWrapper<T> {
  793. /**
  794. * @see _.differenceBy
  795. */
  796. differenceBy<T>(
  797. values?: T[] | List<T>,
  798. iteratee?: ((value: T) => any) | string
  799. ): LoDashExplicitArrayWrapper<T>;
  800. /**
  801. * @see _.differenceBy
  802. */
  803. differenceBy<T, W extends Object>(
  804. values?: T[] | List<T>,
  805. iteratee?: W
  806. ): LoDashExplicitArrayWrapper<T>;
  807. /**
  808. * @see _.differenceBy
  809. */
  810. differenceBy<T>(
  811. values1?: T[] | List<T>,
  812. values2?: T[] | List<T>,
  813. iteratee?: ((value: T) => any) | string
  814. ): LoDashExplicitArrayWrapper<T>;
  815. /**
  816. * @see _.differenceBy
  817. */
  818. differenceBy<T, W extends Object>(
  819. values1?: T[] | List<T>,
  820. values2?: T[] | List<T>,
  821. iteratee?: W
  822. ): LoDashExplicitArrayWrapper<T>;
  823. /**
  824. * @see _.differenceBy
  825. */
  826. differenceBy<T>(
  827. values1?: T[] | List<T>,
  828. values2?: T[] | List<T>,
  829. values3?: T[] | List<T>,
  830. iteratee?: ((value: T) => any) | string
  831. ): LoDashExplicitArrayWrapper<T>;
  832. /**
  833. * @see _.differenceBy
  834. */
  835. differenceBy<T, W extends Object>(
  836. values1?: T[] | List<T>,
  837. values2?: T[] | List<T>,
  838. values3?: T[] | List<T>,
  839. iteratee?: W
  840. ): LoDashExplicitArrayWrapper<T>;
  841. /**
  842. * @see _.differenceBy
  843. */
  844. differenceBy<T>(
  845. values1?: T[] | List<T>,
  846. values2?: T[] | List<T>,
  847. values3?: T[] | List<T>,
  848. values4?: T[] | List<T>,
  849. iteratee?: ((value: T) => any) | string
  850. ): LoDashExplicitArrayWrapper<T>;
  851. /**
  852. * @see _.differenceBy
  853. */
  854. differenceBy<T, W extends Object>(
  855. values1?: T[] | List<T>,
  856. values2?: T[] | List<T>,
  857. values3?: T[] | List<T>,
  858. values4?: T[] | List<T>,
  859. iteratee?: W
  860. ): LoDashExplicitArrayWrapper<T>;
  861. /**
  862. * @see _.differenceBy
  863. */
  864. differenceBy<T>(
  865. values1?: T[] | List<T>,
  866. values2?: T[] | List<T>,
  867. values3?: T[] | List<T>,
  868. values4?: T[] | List<T>,
  869. values5?: T[] | List<T>,
  870. iteratee?: ((value: T) => any) | string
  871. ): LoDashExplicitArrayWrapper<T>;
  872. /**
  873. * @see _.differenceBy
  874. */
  875. differenceBy<T, W extends Object>(
  876. values1?: T[] | List<T>,
  877. values2?: T[] | List<T>,
  878. values3?: T[] | List<T>,
  879. values4?: T[] | List<T>,
  880. values5?: T[] | List<T>,
  881. iteratee?: W
  882. ): LoDashExplicitArrayWrapper<T>;
  883. /**
  884. * @see _.differenceBy
  885. */
  886. differenceBy<T>(
  887. ...values: any[]
  888. ): LoDashExplicitArrayWrapper<T>;
  889. }
  890. interface LoDashExplicitObjectWrapper<T> {
  891. /**
  892. * @see _.differenceBy
  893. */
  894. differenceBy<T>(
  895. values?: T[] | List<T>,
  896. iteratee?: ((value: T) => any) | string
  897. ): LoDashExplicitArrayWrapper<T>;
  898. /**
  899. * @see _.differenceBy
  900. */
  901. differenceBy<T, W extends Object>(
  902. values?: T[] | List<T>,
  903. iteratee?: W
  904. ): LoDashExplicitArrayWrapper<T>;
  905. /**
  906. * @see _.differenceBy
  907. */
  908. differenceBy<T>(
  909. values1?: T[] | List<T>,
  910. values2?: T[] | List<T>,
  911. iteratee?: ((value: T) => any) | string
  912. ): LoDashExplicitArrayWrapper<T>;
  913. /**
  914. * @see _.differenceBy
  915. */
  916. differenceBy<T, W extends Object>(
  917. values1?: T[] | List<T>,
  918. values2?: T[] | List<T>,
  919. iteratee?: W
  920. ): LoDashExplicitArrayWrapper<T>;
  921. /**
  922. * @see _.differenceBy
  923. */
  924. differenceBy<T>(
  925. values1?: T[] | List<T>,
  926. values2?: T[] | List<T>,
  927. values3?: T[] | List<T>,
  928. iteratee?: ((value: T) => any) | string
  929. ): LoDashExplicitArrayWrapper<T>;
  930. /**
  931. * @see _.differenceBy
  932. */
  933. differenceBy<T, W extends Object>(
  934. values1?: T[] | List<T>,
  935. values2?: T[] | List<T>,
  936. values3?: T[] | List<T>,
  937. iteratee?: W
  938. ): LoDashExplicitArrayWrapper<T>;
  939. /**
  940. * @see _.differenceBy
  941. */
  942. differenceBy<T>(
  943. values1?: T[] | List<T>,
  944. values2?: T[] | List<T>,
  945. values3?: T[] | List<T>,
  946. values4?: T[] | List<T>,
  947. iteratee?: ((value: T) => any) | string
  948. ): LoDashExplicitArrayWrapper<T>;
  949. /**
  950. * @see _.differenceBy
  951. */
  952. differenceBy<T, W extends Object>(
  953. values1?: T[] | List<T>,
  954. values2?: T[] | List<T>,
  955. values3?: T[] | List<T>,
  956. values4?: T[] | List<T>,
  957. iteratee?: W
  958. ): LoDashExplicitArrayWrapper<T>;
  959. /**
  960. * @see _.differenceBy
  961. */
  962. differenceBy<T>(
  963. values1?: T[] | List<T>,
  964. values2?: T[] | List<T>,
  965. values3?: T[] | List<T>,
  966. values4?: T[] | List<T>,
  967. values5?: T[] | List<T>,
  968. iteratee?: ((value: T) => any) | string
  969. ): LoDashExplicitArrayWrapper<T>;
  970. /**
  971. * @see _.differenceBy
  972. */
  973. differenceBy<T, W extends Object>(
  974. values1?: T[] | List<T>,
  975. values2?: T[] | List<T>,
  976. values3?: T[] | List<T>,
  977. values4?: T[] | List<T>,
  978. values5?: T[] | List<T>,
  979. iteratee?: W
  980. ): LoDashExplicitArrayWrapper<T>;
  981. /**
  982. * @see _.differenceBy
  983. */
  984. differenceBy<T>(
  985. ...values: any[]
  986. ): LoDashExplicitArrayWrapper<T>;
  987. }
  988. // _.differenceWith DUMMY
  989. interface LoDashStatic {
  990. /**
  991. * Creates an array of unique `array` values not included in the other
  992. * provided arrays using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
  993. * for equality comparisons.
  994. *
  995. * @static
  996. * @memberOf _
  997. * @category Array
  998. * @param {Array} array The array to inspect.
  999. * @param {...Array} [values] The values to exclude.
  1000. * @returns {Array} Returns the new array of filtered values.
  1001. * @example
  1002. *
  1003. * _.difference([3, 2, 1], [4, 2]);
  1004. * // => [3, 1]
  1005. */
  1006. differenceWith(
  1007. array: any[] | List<any>,
  1008. ...values: any[]
  1009. ): any[];
  1010. }
  1011. // _.drop
  1012. interface LoDashStatic {
  1013. /**
  1014. * Creates a slice of array with n elements dropped from the beginning.
  1015. *
  1016. * @param array The array to query.
  1017. * @param n The number of elements to drop.
  1018. * @return Returns the slice of array.
  1019. */
  1020. drop<T>(array: T[] | List<T>, n?: number): T[];
  1021. }
  1022. interface LoDashImplicitArrayWrapper<T> {
  1023. /**
  1024. * @see _.drop
  1025. */
  1026. drop(n?: number): LoDashImplicitArrayWrapper<T>;
  1027. }
  1028. interface LoDashImplicitObjectWrapper<T> {
  1029. /**
  1030. * @see _.drop
  1031. */
  1032. drop<T>(n?: number): LoDashImplicitArrayWrapper<T>;
  1033. }
  1034. interface LoDashExplicitArrayWrapper<T> {
  1035. /**
  1036. * @see _.drop
  1037. */
  1038. drop(n?: number): LoDashExplicitArrayWrapper<T>;
  1039. }
  1040. interface LoDashExplicitObjectWrapper<T> {
  1041. /**
  1042. * @see _.drop
  1043. */
  1044. drop<T>(n?: number): LoDashExplicitArrayWrapper<T>;
  1045. }
  1046. // _.dropRight
  1047. interface LoDashStatic {
  1048. /**
  1049. * Creates a slice of array with n elements dropped from the end.
  1050. *
  1051. * @param array The array to query.
  1052. * @param n The number of elements to drop.
  1053. * @return Returns the slice of array.
  1054. */
  1055. dropRight<T>(
  1056. array: List<T>,
  1057. n?: number
  1058. ): T[];
  1059. }
  1060. interface LoDashImplicitArrayWrapper<T> {
  1061. /**
  1062. * @see _.dropRight
  1063. */
  1064. dropRight(n?: number): LoDashImplicitArrayWrapper<T>;
  1065. }
  1066. interface LoDashImplicitObjectWrapper<T> {
  1067. /**
  1068. * @see _.dropRight
  1069. */
  1070. dropRight<TResult>(n?: number): LoDashImplicitArrayWrapper<TResult>;
  1071. }
  1072. interface LoDashExplicitArrayWrapper<T> {
  1073. /**
  1074. * @see _.dropRight
  1075. */
  1076. dropRight(n?: number): LoDashExplicitArrayWrapper<T>;
  1077. }
  1078. interface LoDashExplicitObjectWrapper<T> {
  1079. /**
  1080. * @see _.dropRight
  1081. */
  1082. dropRight<TResult>(n?: number): LoDashExplicitArrayWrapper<TResult>;
  1083. }
  1084. // _.dropRightWhile
  1085. interface LoDashStatic {
  1086. /**
  1087. * Creates a slice of array excluding elements dropped from the end. Elements are dropped until predicate
  1088. * returns falsey. The predicate is bound to thisArg and invoked with three arguments: (value, index, array).
  1089. *
  1090. * If a property name is provided for predicate the created _.property style callback returns the property
  1091. * value of the given element.
  1092. *
  1093. * If a value is also provided for thisArg the created _.matchesProperty style callback returns true for
  1094. * elements that have a matching property value, else false.
  1095. *
  1096. * If an object is provided for predicate the created _.matches style callback returns true for elements that
  1097. * match the properties of the given object, else false.
  1098. *
  1099. * @param array The array to query.
  1100. * @param predicate The function invoked per iteration.
  1101. * @param thisArg The this binding of predicate.
  1102. * @return Returns the slice of array.
  1103. */
  1104. dropRightWhile<TValue>(
  1105. array: List<TValue>,
  1106. predicate?: ListIterator<TValue, boolean>,
  1107. thisArg?: any
  1108. ): TValue[];
  1109. /**
  1110. * @see _.dropRightWhile
  1111. */
  1112. dropRightWhile<TValue>(
  1113. array: List<TValue>,
  1114. predicate?: string,
  1115. thisArg?: any
  1116. ): TValue[];
  1117. /**
  1118. * @see _.dropRightWhile
  1119. */
  1120. dropRightWhile<TWhere, TValue>(
  1121. array: List<TValue>,
  1122. predicate?: TWhere
  1123. ): TValue[];
  1124. }
  1125. interface LoDashImplicitArrayWrapper<T> {
  1126. /**
  1127. * @see _.dropRightWhile
  1128. */
  1129. dropRightWhile(
  1130. predicate?: ListIterator<T, boolean>,
  1131. thisArg?: any
  1132. ): LoDashImplicitArrayWrapper<T>;
  1133. /**
  1134. * @see _.dropRightWhile
  1135. */
  1136. dropRightWhile(
  1137. predicate?: string,
  1138. thisArg?: any
  1139. ): LoDashImplicitArrayWrapper<T>;
  1140. /**
  1141. * @see _.dropRightWhile
  1142. */
  1143. dropRightWhile<TWhere>(
  1144. predicate?: TWhere
  1145. ): LoDashImplicitArrayWrapper<T>;
  1146. }
  1147. interface LoDashImplicitObjectWrapper<T> {
  1148. /**
  1149. * @see _.dropRightWhile
  1150. */
  1151. dropRightWhile<TValue>(
  1152. predicate?: ListIterator<TValue, boolean>,
  1153. thisArg?: any
  1154. ): LoDashImplicitArrayWrapper<TValue>;
  1155. /**
  1156. * @see _.dropRightWhile
  1157. */
  1158. dropRightWhile<TValue>(
  1159. predicate?: string,
  1160. thisArg?: any
  1161. ): LoDashImplicitArrayWrapper<TValue>;
  1162. /**
  1163. * @see _.dropRightWhile
  1164. */
  1165. dropRightWhile<TWhere, TValue>(
  1166. predicate?: TWhere
  1167. ): LoDashImplicitArrayWrapper<TValue>;
  1168. }
  1169. interface LoDashExplicitArrayWrapper<T> {
  1170. /**
  1171. * @see _.dropRightWhile
  1172. */
  1173. dropRightWhile(
  1174. predicate?: ListIterator<T, boolean>,
  1175. thisArg?: any
  1176. ): LoDashExplicitArrayWrapper<T>;
  1177. /**
  1178. * @see _.dropRightWhile
  1179. */
  1180. dropRightWhile(
  1181. predicate?: string,
  1182. thisArg?: any
  1183. ): LoDashExplicitArrayWrapper<T>;
  1184. /**
  1185. * @see _.dropRightWhile
  1186. */
  1187. dropRightWhile<TWhere>(
  1188. predicate?: TWhere
  1189. ): LoDashExplicitArrayWrapper<T>;
  1190. }
  1191. interface LoDashExplicitObjectWrapper<T> {
  1192. /**
  1193. * @see _.dropRightWhile
  1194. */
  1195. dropRightWhile<TValue>(
  1196. predicate?: ListIterator<TValue, boolean>,
  1197. thisArg?: any
  1198. ): LoDashExplicitArrayWrapper<TValue>;
  1199. /**
  1200. * @see _.dropRightWhile
  1201. */
  1202. dropRightWhile<TValue>(
  1203. predicate?: string,
  1204. thisArg?: any
  1205. ): LoDashExplicitArrayWrapper<TValue>;
  1206. /**
  1207. * @see _.dropRightWhile
  1208. */
  1209. dropRightWhile<TWhere, TValue>(
  1210. predicate?: TWhere
  1211. ): LoDashExplicitArrayWrapper<TValue>;
  1212. }
  1213. // _.dropWhile
  1214. interface LoDashStatic {
  1215. /**
  1216. * Creates a slice of array excluding elements dropped from the beginning. Elements are dropped until predicate
  1217. * returns falsey. The predicate is bound to thisArg and invoked with three arguments: (value, index, array).
  1218. *
  1219. * If a property name is provided for predicate the created _.property style callback returns the property
  1220. * value of the given element.
  1221. *
  1222. * If a value is also provided for thisArg the created _.matchesProperty style callback returns true for
  1223. * elements that have a matching property value, else false.
  1224. *
  1225. * If an object is provided for predicate the created _.matches style callback returns true for elements that
  1226. * have the properties of the given object, else false.
  1227. *
  1228. * @param array The array to query.
  1229. * @param predicate The function invoked per iteration.
  1230. * @param thisArg The this binding of predicate.
  1231. * @return Returns the slice of array.
  1232. */
  1233. dropWhile<TValue>(
  1234. array: List<TValue>,
  1235. predicate?: ListIterator<TValue, boolean>,
  1236. thisArg?: any
  1237. ): TValue[];
  1238. /**
  1239. * @see _.dropWhile
  1240. */
  1241. dropWhile<TValue>(
  1242. array: List<TValue>,
  1243. predicate?: string,
  1244. thisArg?: any
  1245. ): TValue[];
  1246. /**
  1247. * @see _.dropWhile
  1248. */
  1249. dropWhile<TWhere, TValue>(
  1250. array: List<TValue>,
  1251. predicate?: TWhere
  1252. ): TValue[];
  1253. }
  1254. interface LoDashImplicitArrayWrapper<T> {
  1255. /**
  1256. * @see _.dropWhile
  1257. */
  1258. dropWhile(
  1259. predicate?: ListIterator<T, boolean>,
  1260. thisArg?: any
  1261. ): LoDashImplicitArrayWrapper<T>;
  1262. /**
  1263. * @see _.dropWhile
  1264. */
  1265. dropWhile(
  1266. predicate?: string,
  1267. thisArg?: any
  1268. ): LoDashImplicitArrayWrapper<T>;
  1269. /**
  1270. * @see _.dropWhile
  1271. */
  1272. dropWhile<TWhere>(
  1273. predicate?: TWhere
  1274. ): LoDashImplicitArrayWrapper<T>;
  1275. }
  1276. interface LoDashImplicitObjectWrapper<T> {
  1277. /**
  1278. * @see _.dropWhile
  1279. */
  1280. dropWhile<TValue>(
  1281. predicate?: ListIterator<TValue, boolean>,
  1282. thisArg?: any
  1283. ): LoDashImplicitArrayWrapper<TValue>;
  1284. /**
  1285. * @see _.dropWhile
  1286. */
  1287. dropWhile<TValue>(
  1288. predicate?: string,
  1289. thisArg?: any
  1290. ): LoDashImplicitArrayWrapper<TValue>;
  1291. /**
  1292. * @see _.dropWhile
  1293. */
  1294. dropWhile<TWhere, TValue>(
  1295. predicate?: TWhere
  1296. ): LoDashImplicitArrayWrapper<TValue>;
  1297. }
  1298. interface LoDashExplicitArrayWrapper<T> {
  1299. /**
  1300. * @see _.dropWhile
  1301. */
  1302. dropWhile(
  1303. predicate?: ListIterator<T, boolean>,
  1304. thisArg?: any
  1305. ): LoDashExplicitArrayWrapper<T>;
  1306. /**
  1307. * @see _.dropWhile
  1308. */
  1309. dropWhile(
  1310. predicate?: string,
  1311. thisArg?: any
  1312. ): LoDashExplicitArrayWrapper<T>;
  1313. /**
  1314. * @see _.dropWhile
  1315. */
  1316. dropWhile<TWhere>(
  1317. predicate?: TWhere
  1318. ): LoDashExplicitArrayWrapper<T>;
  1319. }
  1320. interface LoDashExplicitObjectWrapper<T> {
  1321. /**
  1322. * @see _.dropWhile
  1323. */
  1324. dropWhile<TValue>(
  1325. predicate?: ListIterator<TValue, boolean>,
  1326. thisArg?: any
  1327. ): LoDashExplicitArrayWrapper<TValue>;
  1328. /**
  1329. * @see _.dropWhile
  1330. */
  1331. dropWhile<TValue>(
  1332. predicate?: string,
  1333. thisArg?: any
  1334. ): LoDashExplicitArrayWrapper<TValue>;
  1335. /**
  1336. * @see _.dropWhile
  1337. */
  1338. dropWhile<TWhere, TValue>(
  1339. predicate?: TWhere
  1340. ): LoDashExplicitArrayWrapper<TValue>;
  1341. }
  1342. // _.fill
  1343. interface LoDashStatic {
  1344. /**
  1345. * Fills elements of array with value from start up to, but not including, end.
  1346. *
  1347. * Note: This method mutates array.
  1348. *
  1349. * @param array The array to fill.
  1350. * @param value The value to fill array with.
  1351. * @param start The start position.
  1352. * @param end The end position.
  1353. * @return Returns array.
  1354. */
  1355. fill<T>(
  1356. array: any[],
  1357. value: T,
  1358. start?: number,
  1359. end?: number
  1360. ): T[];
  1361. /**
  1362. * @see _.fill
  1363. */
  1364. fill<T>(
  1365. array: List<any>,
  1366. value: T,
  1367. start?: number,
  1368. end?: number
  1369. ): List<T>;
  1370. }
  1371. interface LoDashImplicitArrayWrapper<T> {
  1372. /**
  1373. * @see _.fill
  1374. */
  1375. fill<T>(
  1376. value: T,
  1377. start?: number,
  1378. end?: number
  1379. ): LoDashImplicitArrayWrapper<T>;
  1380. }
  1381. interface LoDashImplicitObjectWrapper<T> {
  1382. /**
  1383. * @see _.fill
  1384. */
  1385. fill<T>(
  1386. value: T,
  1387. start?: number,
  1388. end?: number
  1389. ): LoDashImplicitObjectWrapper<List<T>>;
  1390. }
  1391. interface LoDashExplicitArrayWrapper<T> {
  1392. /**
  1393. * @see _.fill
  1394. */
  1395. fill<T>(
  1396. value: T,
  1397. start?: number,
  1398. end?: number
  1399. ): LoDashExplicitArrayWrapper<T>;
  1400. }
  1401. interface LoDashExplicitObjectWrapper<T> {
  1402. /**
  1403. * @see _.fill
  1404. */
  1405. fill<T>(
  1406. value: T,
  1407. start?: number,
  1408. end?: number
  1409. ): LoDashExplicitObjectWrapper<List<T>>;
  1410. }
  1411. // _.findIndex
  1412. interface LoDashStatic {
  1413. /**
  1414. * This method is like _.find except that it returns the index of the first element predicate returns truthy
  1415. * for instead of the element itself.
  1416. *
  1417. * If a property name is provided for predicate the created _.property style callback returns the property
  1418. * value of the given element.
  1419. *
  1420. * If a value is also provided for thisArg the created _.matchesProperty style callback returns true for
  1421. * elements that have a matching property value, else false.
  1422. *
  1423. * If an object is provided for predicate the created _.matches style callback returns true for elements that
  1424. * have the properties of the given object, else false.
  1425. *
  1426. * @param array The array to search.
  1427. * @param predicate The function invoked per iteration.
  1428. * @param thisArg The this binding of predicate.
  1429. * @return Returns the index of the found element, else -1.
  1430. */
  1431. findIndex<T>(
  1432. array: List<T>,
  1433. predicate?: ListIterator<T, boolean>,
  1434. thisArg?: any
  1435. ): number;
  1436. /**
  1437. * @see _.findIndex
  1438. */
  1439. findIndex<T>(
  1440. array: List<T>,
  1441. predicate?: string,
  1442. thisArg?: any
  1443. ): number;
  1444. /**
  1445. * @see _.findIndex
  1446. */
  1447. findIndex<W, T>(
  1448. array: List<T>,
  1449. predicate?: W
  1450. ): number;
  1451. }
  1452. interface LoDashImplicitArrayWrapper<T> {
  1453. /**
  1454. * @see _.findIndex
  1455. */
  1456. findIndex(
  1457. predicate?: ListIterator<T, boolean>,
  1458. thisArg?: any
  1459. ): number;
  1460. /**
  1461. * @see _.findIndex
  1462. */
  1463. findIndex(
  1464. predicate?: string,
  1465. thisArg?: any
  1466. ): number;
  1467. /**
  1468. * @see _.findIndex
  1469. */
  1470. findIndex<W>(
  1471. predicate?: W
  1472. ): number;
  1473. }
  1474. interface LoDashImplicitObjectWrapper<T> {
  1475. /**
  1476. * @see _.findIndex
  1477. */
  1478. findIndex<TResult>(
  1479. predicate?: ListIterator<TResult, boolean>,
  1480. thisArg?: any
  1481. ): number;
  1482. /**
  1483. * @see _.findIndex
  1484. */
  1485. findIndex(
  1486. predicate?: string,
  1487. thisArg?: any
  1488. ): number;
  1489. /**
  1490. * @see _.findIndex
  1491. */
  1492. findIndex<W>(
  1493. predicate?: W
  1494. ): number;
  1495. }
  1496. interface LoDashExplicitArrayWrapper<T> {
  1497. /**
  1498. * @see _.findIndex
  1499. */
  1500. findIndex(
  1501. predicate?: ListIterator<T, boolean>,
  1502. thisArg?: any
  1503. ): LoDashExplicitWrapper<number>;
  1504. /**
  1505. * @see _.findIndex
  1506. */
  1507. findIndex(
  1508. predicate?: string,
  1509. thisArg?: any
  1510. ): LoDashExplicitWrapper<number>;
  1511. /**
  1512. * @see _.findIndex
  1513. */
  1514. findIndex<W>(
  1515. predicate?: W
  1516. ): LoDashExplicitWrapper<number>;
  1517. }
  1518. interface LoDashExplicitObjectWrapper<T> {
  1519. /**
  1520. * @see _.findIndex
  1521. */
  1522. findIndex<TResult>(
  1523. predicate?: ListIterator<TResult, boolean>,
  1524. thisArg?: any
  1525. ): LoDashExplicitWrapper<number>;
  1526. /**
  1527. * @see _.findIndex
  1528. */
  1529. findIndex(
  1530. predicate?: string,
  1531. thisArg?: any
  1532. ): LoDashExplicitWrapper<number>;
  1533. /**
  1534. * @see _.findIndex
  1535. */
  1536. findIndex<W>(
  1537. predicate?: W
  1538. ): LoDashExplicitWrapper<number>;
  1539. }
  1540. // _.findLastIndex
  1541. interface LoDashStatic {
  1542. /**
  1543. * This method is like _.findIndex except that it iterates over elements of collection from right to left.
  1544. *
  1545. * If a property name is provided for predicate the created _.property style callback returns the property
  1546. * value of the given element.
  1547. *
  1548. * If a value is also provided for thisArg the created _.matchesProperty style callback returns true for
  1549. * elements that have a matching property value, else false.
  1550. *
  1551. * If an object is provided for predicate the created _.matches style callback returns true for elements that
  1552. * have the properties of the given object, else false.
  1553. *
  1554. * @param array The array to search.
  1555. * @param predicate The function invoked per iteration.
  1556. * @param thisArg The function invoked per iteration.
  1557. * @return Returns the index of the found element, else -1.
  1558. */
  1559. findLastIndex<T>(
  1560. array: List<T>,
  1561. predicate?: ListIterator<T, boolean>,
  1562. thisArg?: any
  1563. ): number;
  1564. /**
  1565. * @see _.findLastIndex
  1566. */
  1567. findLastIndex<T>(
  1568. array: List<T>,
  1569. predicate?: string,
  1570. thisArg?: any
  1571. ): number;
  1572. /**
  1573. * @see _.findLastIndex
  1574. */
  1575. findLastIndex<W, T>(
  1576. array: List<T>,
  1577. predicate?: W
  1578. ): number;
  1579. }
  1580. interface LoDashImplicitArrayWrapper<T> {
  1581. /**
  1582. * @see _.findLastIndex
  1583. */
  1584. findLastIndex(
  1585. predicate?: ListIterator<T, boolean>,
  1586. thisArg?: any
  1587. ): number;
  1588. /**
  1589. * @see _.findLastIndex
  1590. */
  1591. findLastIndex(
  1592. predicate?: string,
  1593. thisArg?: any
  1594. ): number;
  1595. /**
  1596. * @see _.findLastIndex
  1597. */
  1598. findLastIndex<W>(
  1599. predicate?: W
  1600. ): number;
  1601. }
  1602. interface LoDashImplicitObjectWrapper<T> {
  1603. /**
  1604. * @see _.findLastIndex
  1605. */
  1606. findLastIndex<TResult>(
  1607. predicate?: ListIterator<TResult, boolean>,
  1608. thisArg?: any
  1609. ): number;
  1610. /**
  1611. * @see _.findLastIndex
  1612. */
  1613. findLastIndex(
  1614. predicate?: string,
  1615. thisArg?: any
  1616. ): number;
  1617. /**
  1618. * @see _.findLastIndex
  1619. */
  1620. findLastIndex<W>(
  1621. predicate?: W
  1622. ): number;
  1623. }
  1624. interface LoDashExplicitArrayWrapper<T> {
  1625. /**
  1626. * @see _.findLastIndex
  1627. */
  1628. findLastIndex(
  1629. predicate?: ListIterator<T, boolean>,
  1630. thisArg?: any
  1631. ): LoDashExplicitWrapper<number>;
  1632. /**
  1633. * @see _.findLastIndex
  1634. */
  1635. findLastIndex(
  1636. predicate?: string,
  1637. thisArg?: any
  1638. ): LoDashExplicitWrapper<number>;
  1639. /**
  1640. * @see _.findLastIndex
  1641. */
  1642. findLastIndex<W>(
  1643. predicate?: W
  1644. ): LoDashExplicitWrapper<number>;
  1645. }
  1646. interface LoDashExplicitObjectWrapper<T> {
  1647. /**
  1648. * @see _.findLastIndex
  1649. */
  1650. findLastIndex<TResult>(
  1651. predicate?: ListIterator<TResult, boolean>,
  1652. thisArg?: any
  1653. ): LoDashExplicitWrapper<number>;
  1654. /**
  1655. * @see _.findLastIndex
  1656. */
  1657. findLastIndex(
  1658. predicate?: string,
  1659. thisArg?: any
  1660. ): LoDashExplicitWrapper<number>;
  1661. /**
  1662. * @see _.findLastIndex
  1663. */
  1664. findLastIndex<W>(
  1665. predicate?: W
  1666. ): LoDashExplicitWrapper<number>;
  1667. }
  1668. // _.first
  1669. interface LoDashStatic {
  1670. /**
  1671. * @see _.head
  1672. */
  1673. first<T>(array: List<T>): T;
  1674. }
  1675. interface LoDashImplicitArrayWrapper<T> {
  1676. /**
  1677. * @see _.head
  1678. */
  1679. first(): T;
  1680. }
  1681. interface LoDashImplicitObjectWrapper<T> {
  1682. /**
  1683. * @see _.head
  1684. */
  1685. first<TResult>(): TResult;
  1686. }
  1687. interface RecursiveArray<T> extends Array<T | RecursiveArray<T>> { }
  1688. interface ListOfRecursiveArraysOrValues<T> extends List<T | RecursiveArray<T>> { }
  1689. // _.flatMap
  1690. interface LoDashStatic {
  1691. /**
  1692. * Creates an array of flattened values by running each element in collection through iteratee
  1693. * and concating its result to the other mapped values. The iteratee is invoked with three arguments:
  1694. * (value, index|key, collection).
  1695. *
  1696. * @param collection The collection to iterate over.
  1697. * @param iteratee The function invoked per iteration.
  1698. * @return Returns the new flattened array.
  1699. */
  1700. flatMap<T, TResult>(
  1701. collection: List<T>,
  1702. iteratee?: ListIterator<T, TResult|TResult[]>
  1703. ): TResult[];
  1704. /**
  1705. * @see _.flatMap
  1706. */
  1707. flatMap<TResult>(
  1708. collection: List<any>,
  1709. iteratee?: ListIterator<any, TResult|TResult[]>
  1710. ): TResult[];
  1711. /**
  1712. * @see _.flatMap
  1713. */
  1714. flatMap<T, TResult>(
  1715. collection: Dictionary<T>,
  1716. iteratee?: DictionaryIterator<T, TResult|TResult[]>
  1717. ): TResult[];
  1718. /**
  1719. * @see _.flatMap
  1720. */
  1721. flatMap<TResult>(
  1722. collection: Dictionary<any>,
  1723. iteratee?: DictionaryIterator<any, TResult|TResult[]>
  1724. ): TResult[];
  1725. /**
  1726. * @see _.flatMap
  1727. */
  1728. flatMap<T, TResult>(
  1729. collection: NumericDictionary<T>,
  1730. iteratee?: NumericDictionaryIterator<T, TResult|TResult[]>
  1731. ): TResult[];
  1732. /**
  1733. * @see _.flatMap
  1734. */
  1735. flatMap<TResult>(
  1736. collection: NumericDictionary<any>,
  1737. iteratee?: NumericDictionaryIterator<any, TResult|TResult[]>
  1738. ): TResult[];
  1739. /**
  1740. * @see _.flatMap
  1741. */
  1742. flatMap<TObject extends Object, TResult>(
  1743. collection: TObject,
  1744. iteratee?: ObjectIterator<any, TResult|TResult[]>
  1745. ): TResult[];
  1746. /**
  1747. * @see _.flatMap
  1748. */
  1749. flatMap<TResult>(
  1750. collection: Object,
  1751. iteratee?: ObjectIterator<any, TResult|TResult[]>
  1752. ): TResult[];
  1753. /**
  1754. * @see _.flatMap
  1755. */
  1756. flatMap<TWhere extends Object, TObject extends Object>(
  1757. collection: TObject,
  1758. iteratee: TWhere
  1759. ): boolean[];
  1760. /**
  1761. * @see _.flatMap
  1762. */
  1763. flatMap<TObject extends Object, TResult>(
  1764. collection: TObject,
  1765. iteratee: Object|string
  1766. ): TResult[];
  1767. /**
  1768. * @see _.flatMap
  1769. */
  1770. flatMap<TObject extends Object>(
  1771. collection: TObject,
  1772. iteratee: [string, any]
  1773. ): boolean[];
  1774. /**
  1775. * @see _.flatMap
  1776. */
  1777. flatMap<TResult>(
  1778. collection: string
  1779. ): string[];
  1780. /**
  1781. * @see _.flatMap
  1782. */
  1783. flatMap<TResult>(
  1784. collection: Object,
  1785. iteratee?: Object|string
  1786. ): TResult[];
  1787. }
  1788. interface LoDashImplicitWrapper<T> {
  1789. /**
  1790. * @see _.flatMap
  1791. */
  1792. flatMap<TResult>(
  1793. iteratee: ListIterator<string, TResult|TResult[]>
  1794. ): LoDashImplicitArrayWrapper<TResult>;
  1795. /**
  1796. * @see _.flatMap
  1797. */
  1798. flatMap(): LoDashImplicitArrayWrapper<string>;
  1799. }
  1800. interface LoDashImplicitArrayWrapper<T> {
  1801. /**
  1802. * @see _.flatMap
  1803. */
  1804. flatMap<TResult>(
  1805. iteratee: ListIterator<T, TResult|TResult[]>|string
  1806. ): LoDashImplicitArrayWrapper<TResult>;
  1807. /**
  1808. * @see _.flatMap
  1809. */
  1810. flatMap<TWhere extends Object>(
  1811. iteratee: TWhere
  1812. ): LoDashImplicitArrayWrapper<boolean>;
  1813. /**
  1814. * @see _.flatMap
  1815. */
  1816. flatMap(
  1817. iteratee: [string, any]
  1818. ): LoDashImplicitArrayWrapper<boolean>;
  1819. /**
  1820. * @see _.flatMap
  1821. */
  1822. flatMap<TResult>(): LoDashImplicitArrayWrapper<TResult>;
  1823. }
  1824. interface LoDashImplicitObjectWrapper<T> {
  1825. /**
  1826. * @see _.flatMap
  1827. */
  1828. flatMap<T, TResult>(
  1829. iteratee: ListIterator<T, TResult|TResult[]>|DictionaryIterator<T, TResult|TResult[]>|NumericDictionaryIterator<T, TResult|TResult[]>
  1830. ): LoDashImplicitArrayWrapper<TResult>;
  1831. /**
  1832. * @see _.flatMap
  1833. */
  1834. flatMap<TResult>(
  1835. iteratee: ObjectIterator<any, TResult|TResult[]>|string
  1836. ): LoDashImplicitArrayWrapper<TResult>;
  1837. /**
  1838. * @see _.flatMap
  1839. */
  1840. flatMap<TWhere extends Object>(
  1841. iteratee: TWhere
  1842. ): LoDashImplicitArrayWrapper<boolean>;
  1843. /**
  1844. * @see _.flatMap
  1845. */
  1846. flatMap(
  1847. iteratee: [string, any]
  1848. ): LoDashImplicitArrayWrapper<boolean>;
  1849. /**
  1850. * @see _.flatMap
  1851. */
  1852. flatMap<TResult>(): LoDashImplicitArrayWrapper<TResult>;
  1853. }
  1854. interface LoDashExplicitWrapper<T> {
  1855. /**
  1856. * @see _.flatMap
  1857. */
  1858. flatMap<TResult>(
  1859. iteratee: ListIterator<string, TResult|TResult[]>
  1860. ): LoDashExplicitArrayWrapper<TResult>;
  1861. /**
  1862. * @see _.flatMap
  1863. */
  1864. flatMap(): LoDashExplicitArrayWrapper<string>;
  1865. }
  1866. interface LoDashExplicitArrayWrapper<T> {
  1867. /**
  1868. * @see _.flatMap
  1869. */
  1870. flatMap<TResult>(
  1871. iteratee: ListIterator<T, TResult|TResult[]>|string
  1872. ): LoDashExplicitArrayWrapper<TResult>;
  1873. /**
  1874. * @see _.flatMap
  1875. */
  1876. flatMap<TWhere extends Object>(
  1877. iteratee: TWhere
  1878. ): LoDashExplicitArrayWrapper<boolean>;
  1879. /**
  1880. * @see _.flatMap
  1881. */
  1882. flatMap(
  1883. iteratee: [string, any]
  1884. ): LoDashExplicitArrayWrapper<boolean>;
  1885. /**
  1886. * @see _.flatMap
  1887. */
  1888. flatMap<TResult>(): LoDashExplicitArrayWrapper<TResult>;
  1889. }
  1890. interface LoDashExplicitObjectWrapper<T> {
  1891. /**
  1892. * @see _.flatMap
  1893. */
  1894. flatMap<T, TResult>(
  1895. iteratee: ListIterator<T, TResult|TResult[]>|DictionaryIterator<T, TResult|TResult[]>|NumericDictionaryIterator<T, TResult|TResult[]>
  1896. ): LoDashExplicitArrayWrapper<TResult>;
  1897. /**
  1898. * @see _.flatMap
  1899. */
  1900. flatMap<TResult>(
  1901. iteratee: ObjectIterator<any, TResult|TResult[]>|string
  1902. ): LoDashExplicitArrayWrapper<TResult>;
  1903. /**
  1904. * @see _.flatMap
  1905. */
  1906. flatMap<TWhere extends Object>(
  1907. iteratee: TWhere
  1908. ): LoDashExplicitArrayWrapper<boolean>;
  1909. /**
  1910. * @see _.flatMap
  1911. */
  1912. flatMap(
  1913. iteratee: [string, any]
  1914. ): LoDashExplicitArrayWrapper<boolean>;
  1915. /**
  1916. * @see _.flatMap
  1917. */
  1918. flatMap<TResult>(): LoDashExplicitArrayWrapper<TResult>;
  1919. }
  1920. // _.flatten
  1921. interface LoDashStatic {
  1922. /**
  1923. * Flattens a nested array. If isDeep is true the array is recursively flattened, otherwise its only
  1924. * flattened a single level.
  1925. *
  1926. * @param array The array to flatten.
  1927. * @param isDeep Specify a deep flatten.
  1928. * @return Returns the new flattened array.
  1929. */
  1930. flatten<T>(array: ListOfRecursiveArraysOrValues<T>, isDeep: boolean): T[];
  1931. /**
  1932. * @see _.flatten
  1933. */
  1934. flatten<T>(array: List<T | T[]>): T[];
  1935. /**
  1936. * @see _.flatten
  1937. */
  1938. flatten<T>(array: ListOfRecursiveArraysOrValues<T>): RecursiveArray<T>;
  1939. }
  1940. interface LoDashImplicitWrapper<T> {
  1941. /**
  1942. * @see _.flatten
  1943. */
  1944. flatten(): LoDashImplicitArrayWrapper<string>;
  1945. }
  1946. interface LoDashImplicitArrayWrapper<T> {
  1947. /**
  1948. * @see _.flatten
  1949. */
  1950. flatten<TResult>(isDeep?: boolean): LoDashImplicitArrayWrapper<TResult>;
  1951. }
  1952. interface LoDashImplicitObjectWrapper<T> {
  1953. /**
  1954. * @see _.flatten
  1955. */
  1956. flatten<TResult>(isDeep?: boolean): LoDashImplicitArrayWrapper<TResult>;
  1957. }
  1958. interface LoDashExplicitWrapper<T> {
  1959. /**
  1960. * @see _.flatten
  1961. */
  1962. flatten(): LoDashExplicitArrayWrapper<string>;
  1963. }
  1964. interface LoDashExplicitArrayWrapper<T> {
  1965. /**
  1966. * @see _.flatten
  1967. */
  1968. flatten<TResult>(isDeep?: boolean): LoDashExplicitArrayWrapper<TResult>;
  1969. }
  1970. interface LoDashExplicitObjectWrapper<T> {
  1971. /**
  1972. * @see _.flatten
  1973. */
  1974. flatten<TResult>(isDeep?: boolean): LoDashExplicitArrayWrapper<TResult>;
  1975. }
  1976. // _.flattenDeep
  1977. interface LoDashStatic {
  1978. /**
  1979. * Recursively flattens a nested array.
  1980. *
  1981. * @param array The array to recursively flatten.
  1982. * @return Returns the new flattened array.
  1983. */
  1984. flattenDeep<T>(array: ListOfRecursiveArraysOrValues<T>): T[];
  1985. }
  1986. interface LoDashImplicitWrapper<T> {
  1987. /**
  1988. * @see _.flattenDeep
  1989. */
  1990. flattenDeep(): LoDashImplicitArrayWrapper<string>;
  1991. }
  1992. interface LoDashImplicitArrayWrapper<T> {
  1993. /**
  1994. * @see _.flattenDeep
  1995. */
  1996. flattenDeep<T>(): LoDashImplicitArrayWrapper<T>;
  1997. }
  1998. interface LoDashImplicitObjectWrapper<T> {
  1999. /**
  2000. * @see _.flattenDeep
  2001. */
  2002. flattenDeep<T>(): LoDashImplicitArrayWrapper<T>;
  2003. }
  2004. interface LoDashExplicitWrapper<T> {
  2005. /**
  2006. * @see _.flattenDeep
  2007. */
  2008. flattenDeep(): LoDashExplicitArrayWrapper<string>;
  2009. }
  2010. interface LoDashExplicitArrayWrapper<T> {
  2011. /**
  2012. * @see _.flattenDeep
  2013. */
  2014. flattenDeep<T>(): LoDashExplicitArrayWrapper<T>;
  2015. }
  2016. interface LoDashExplicitObjectWrapper<T> {
  2017. /**
  2018. * @see _.flattenDeep
  2019. */
  2020. flattenDeep<T>(): LoDashExplicitArrayWrapper<T>;
  2021. }
  2022. // _.fromPairs
  2023. interface LoDashStatic {
  2024. /**
  2025. * The inverse of `_.toPairs`; this method returns an object composed
  2026. * from key-value `pairs`.
  2027. *
  2028. * @static
  2029. * @memberOf _
  2030. * @category Array
  2031. * @param {Array} pairs The key-value pairs.
  2032. * @returns {Object} Returns the new object.
  2033. * @example
  2034. *
  2035. * _.fromPairs([['fred', 30], ['barney', 40]]);
  2036. * // => { 'fred': 30, 'barney': 40 }
  2037. */
  2038. fromPairs<T>(
  2039. pairs: Array<[string, T]> | List<[string, T]>
  2040. ): Dictionary<T>;
  2041. }
  2042. interface LoDashImplicitArrayWrapper<T> {
  2043. /**
  2044. * @see _.fromPairs
  2045. */
  2046. fromPairs<TResult>(): LoDashImplicitObjectWrapper<Dictionary<TResult>>;
  2047. }
  2048. interface LoDashExplicitArrayWrapper<T> {
  2049. /**
  2050. * @see _.fromPairs
  2051. */
  2052. fromPairs<TResult>(): LoDashExplicitObjectWrapper<Dictionary<TResult>>;
  2053. }
  2054. // _.head
  2055. interface LoDashStatic {
  2056. /**
  2057. * Gets the first element of array.
  2058. *
  2059. * @alias _.first
  2060. *
  2061. * @param array The array to query.
  2062. * @return Returns the first element of array.
  2063. */
  2064. head<T>(array: List<T>): T;
  2065. }
  2066. interface LoDashImplicitArrayWrapper<T> {
  2067. /**
  2068. * @see _.first
  2069. */
  2070. head(): T;
  2071. }
  2072. interface LoDashImplicitObjectWrapper<T> {
  2073. /**
  2074. * @see _.first
  2075. */
  2076. head<TResult>(): TResult;
  2077. }
  2078. // _.indexOf
  2079. interface LoDashStatic {
  2080. /**
  2081. * Gets the index at which the first occurrence of `value` is found in `array`
  2082. * using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
  2083. * for equality comparisons. If `fromIndex` is negative, it's used as the offset
  2084. * from the end of `array`. If `array` is sorted providing `true` for `fromIndex`
  2085. * performs a faster binary search.
  2086. *
  2087. * @static
  2088. * @memberOf _
  2089. * @category Array
  2090. * @param {Array} array The array to search.
  2091. * @param {*} value The value to search for.
  2092. * @param {number} [fromIndex=0] The index to search from.
  2093. * @returns {number} Returns the index of the matched value, else `-1`.
  2094. * @example
  2095. *
  2096. * _.indexOf([1, 2, 1, 2], 2);
  2097. * // => 1
  2098. *
  2099. * // using `fromIndex`
  2100. * _.indexOf([1, 2, 1, 2], 2, 2);
  2101. * // => 3
  2102. */
  2103. indexOf<T>(
  2104. array: List<T>,
  2105. value: T,
  2106. fromIndex?: boolean | number
  2107. ): number;
  2108. }
  2109. interface LoDashImplicitArrayWrapper<T> {
  2110. /**
  2111. * @see _.indexOf
  2112. */
  2113. indexOf(
  2114. value: T,
  2115. fromIndex?: boolean | number
  2116. ): number;
  2117. }
  2118. interface LoDashImplicitObjectWrapper<T> {
  2119. /**
  2120. * @see _.indexOf
  2121. */
  2122. indexOf<TValue>(
  2123. value: TValue,
  2124. fromIndex?: boolean | number
  2125. ): number;
  2126. }
  2127. interface LoDashExplicitArrayWrapper<T> {
  2128. /**
  2129. * @see _.indexOf
  2130. */
  2131. indexOf(
  2132. value: T,
  2133. fromIndex?: boolean | number
  2134. ): LoDashExplicitWrapper<number>;
  2135. }
  2136. interface LoDashExplicitObjectWrapper<T> {
  2137. /**
  2138. * @see _.indexOf
  2139. */
  2140. indexOf<TValue>(
  2141. value: TValue,
  2142. fromIndex?: boolean | number
  2143. ): LoDashExplicitWrapper<number>;
  2144. }
  2145. // _.intersectionBy DUMMY
  2146. interface LoDashStatic {
  2147. /**
  2148. * This method is like `_.intersection` except that it accepts `iteratee`
  2149. * which is invoked for each element of each `arrays` to generate the criterion
  2150. * by which uniqueness is computed. The iteratee is invoked with one argument: (value).
  2151. *
  2152. * @static
  2153. * @memberOf _
  2154. * @category Array
  2155. * @param {...Array} [arrays] The arrays to inspect.
  2156. * @param {Function|Object|string} [iteratee=_.identity] The iteratee invoked per element.
  2157. * @returns {Array} Returns the new array of shared values.
  2158. * @example
  2159. *
  2160. * _.intersectionBy([2.1, 1.2], [4.3, 2.4], Math.floor);
  2161. * // => [2.1]
  2162. *
  2163. * // using the `_.property` iteratee shorthand
  2164. * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
  2165. * // => [{ 'x': 1 }]
  2166. */
  2167. intersectionBy(
  2168. array: any[] | List<any>,
  2169. ...values: any[]
  2170. ): any[];
  2171. }
  2172. // _.intersectionWith DUMMY
  2173. interface LoDashStatic {
  2174. /**
  2175. * This method is like `_.intersection` except that it accepts `comparator`
  2176. * which is invoked to compare elements of `arrays`. The comparator is invoked
  2177. * with two arguments: (arrVal, othVal).
  2178. *
  2179. * @static
  2180. * @memberOf _
  2181. * @category Array
  2182. * @param {...Array} [arrays] The arrays to inspect.
  2183. * @param {Function} [comparator] The comparator invoked per element.
  2184. * @returns {Array} Returns the new array of shared values.
  2185. * @example
  2186. *
  2187. * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
  2188. * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
  2189. *
  2190. * _.intersectionWith(objects, others, _.isEqual);
  2191. * // => [{ 'x': 1, 'y': 2 }]
  2192. */
  2193. intersectionWith(
  2194. array: any[] | List<any>,
  2195. ...values: any[]
  2196. ): any[];
  2197. }
  2198. // _.join
  2199. interface LoDashStatic {
  2200. /**
  2201. * Converts all elements in `array` into a string separated by `separator`.
  2202. *
  2203. * @param array The array to convert.
  2204. * @param separator The element separator.
  2205. * @returns Returns the joined string.
  2206. */
  2207. join(
  2208. array: List<any>,
  2209. separator?: string
  2210. ): string;
  2211. }
  2212. interface LoDashImplicitWrapper<T> {
  2213. /**
  2214. * @see _.join
  2215. */
  2216. join(separator?: string): string;
  2217. }
  2218. interface LoDashImplicitArrayWrapper<T> {
  2219. /**
  2220. * @see _.join
  2221. */
  2222. join(separator?: string): string;
  2223. }
  2224. interface LoDashImplicitObjectWrapper<T> {
  2225. /**
  2226. * @see _.join
  2227. */
  2228. join(separator?: string): string;
  2229. }
  2230. interface LoDashExplicitWrapper<T> {
  2231. /**
  2232. * @see _.join
  2233. */
  2234. join(separator?: string): LoDashExplicitWrapper<string>;
  2235. }
  2236. interface LoDashExplicitArrayWrapper<T> {
  2237. /**
  2238. * @see _.join
  2239. */
  2240. join(separator?: string): LoDashExplicitWrapper<string>;
  2241. }
  2242. interface LoDashExplicitObjectWrapper<T> {
  2243. /**
  2244. * @see _.join
  2245. */
  2246. join(separator?: string): LoDashExplicitWrapper<string>;
  2247. }
  2248. // _.pullAll DUMMY
  2249. interface LoDashStatic {
  2250. /**
  2251. * This method is like `_.pull` except that it accepts an array of values to remove.
  2252. *
  2253. * **Note:** Unlike `_.difference`, this method mutates `array`.
  2254. *
  2255. * @static
  2256. * @memberOf _
  2257. * @category Array
  2258. * @param {Array} array The array to modify.
  2259. * @param {Array} values The values to remove.
  2260. * @returns {Array} Returns `array`.
  2261. * @example
  2262. *
  2263. * var array = [1, 2, 3, 1, 2, 3];
  2264. *
  2265. * _.pull(array, [2, 3]);
  2266. * console.log(array);
  2267. * // => [1, 1]
  2268. */
  2269. pullAll(
  2270. array: any[] | List<any>,
  2271. ...values: any[]
  2272. ): any[];
  2273. }
  2274. // _.pullAllBy DUMMY
  2275. interface LoDashStatic {
  2276. /**
  2277. * This method is like `_.pullAll` except that it accepts `iteratee` which is
  2278. * invoked for each element of `array` and `values` to to generate the criterion
  2279. * by which uniqueness is computed. The iteratee is invoked with one argument: (value).
  2280. *
  2281. * **Note:** Unlike `_.differenceBy`, this method mutates `array`.
  2282. *
  2283. * @static
  2284. * @memberOf _
  2285. * @category Array
  2286. * @param {Array} array The array to modify.
  2287. * @param {Array} values The values to remove.
  2288. * @param {Function|Object|string} [iteratee=_.identity] The iteratee invoked per element.
  2289. * @returns {Array} Returns `array`.
  2290. * @example
  2291. *
  2292. * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }];
  2293. *
  2294. * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x');
  2295. * console.log(array);
  2296. * // => [{ 'x': 2 }]
  2297. */
  2298. pullAllBy(
  2299. array: any[] | List<any>,
  2300. ...values: any[]
  2301. ): any[];
  2302. }
  2303. // _.reverse DUMMY
  2304. interface LoDashStatic {
  2305. /**
  2306. * Reverses `array` so that the first element becomes the last, the second
  2307. * element becomes the second to last, and so on.
  2308. *
  2309. * **Note:** This method mutates `array` and is based on
  2310. * [`Array#reverse`](https://mdn.io/Array/reverse).
  2311. *
  2312. * @memberOf _
  2313. * @category Array
  2314. * @returns {Array} Returns `array`.
  2315. * @example
  2316. *
  2317. * var array = [1, 2, 3];
  2318. *
  2319. * _.reverse(array);
  2320. * // => [3, 2, 1]
  2321. *
  2322. * console.log(array);
  2323. * // => [3, 2, 1]
  2324. */
  2325. reverse(
  2326. array: any[] | List<any>,
  2327. ...values: any[]
  2328. ): any[];
  2329. }
  2330. // _.sortedIndexOf
  2331. interface LoDashStatic {
  2332. /**
  2333. * This method is like `_.indexOf` except that it performs a binary
  2334. * search on a sorted `array`.
  2335. *
  2336. * @static
  2337. * @memberOf _
  2338. * @category Array
  2339. * @param {Array} array The array to search.
  2340. * @param {*} value The value to search for.
  2341. * @returns {number} Returns the index of the matched value, else `-1`.
  2342. * @example
  2343. *
  2344. * _.sortedIndexOf([1, 1, 2, 2], 2);
  2345. * // => 2
  2346. */
  2347. sortedIndexOf<T>(
  2348. array: List<T>,
  2349. value: T
  2350. ): number;
  2351. }
  2352. interface LoDashImplicitArrayWrapper<T> {
  2353. /**
  2354. * @see _.sortedIndexOf
  2355. */
  2356. sortedIndexOf(
  2357. value: T
  2358. ): number;
  2359. }
  2360. interface LoDashImplicitObjectWrapper<T> {
  2361. /**
  2362. * @see _.sortedIndexOf
  2363. */
  2364. sortedIndexOf<TValue>(
  2365. value: TValue
  2366. ): number;
  2367. }
  2368. interface LoDashExplicitArrayWrapper<T> {
  2369. /**
  2370. * @see _.sortedIndexOf
  2371. */
  2372. sortedIndexOf(
  2373. value: T
  2374. ): LoDashExplicitWrapper<number>;
  2375. }
  2376. interface LoDashExplicitObjectWrapper<T> {
  2377. /**
  2378. * @see _.sortedIndexOf
  2379. */
  2380. sortedIndexOf<TValue>(
  2381. value: TValue
  2382. ): LoDashExplicitWrapper<number>;
  2383. }
  2384. // _.initial
  2385. interface LoDashStatic {
  2386. /**
  2387. * Gets all but the last element of array.
  2388. *
  2389. * @param array The array to query.
  2390. * @return Returns the slice of array.
  2391. */
  2392. initial<T>(array: List<T>): T[];
  2393. }
  2394. interface LoDashImplicitArrayWrapper<T> {
  2395. /**
  2396. * @see _.initial
  2397. */
  2398. initial(): LoDashImplicitArrayWrapper<T>;
  2399. }
  2400. interface LoDashImplicitObjectWrapper<T> {
  2401. /**
  2402. * @see _.initial
  2403. */
  2404. initial<T>(): LoDashImplicitArrayWrapper<T>;
  2405. }
  2406. interface LoDashExplicitArrayWrapper<T> {
  2407. /**
  2408. * @see _.initial
  2409. */
  2410. initial(): LoDashExplicitArrayWrapper<T>;
  2411. }
  2412. interface LoDashExplicitObjectWrapper<T> {
  2413. /**
  2414. * @see _.initial
  2415. */
  2416. initial<T>(): LoDashExplicitArrayWrapper<T>;
  2417. }
  2418. // _.intersection
  2419. interface LoDashStatic {
  2420. /**
  2421. * Creates an array of unique values that are included in all of the provided arrays using SameValueZero for
  2422. * equality comparisons.
  2423. *
  2424. * @param arrays The arrays to inspect.
  2425. * @return Returns the new array of shared values.
  2426. */
  2427. intersection<T>(...arrays: (T[] | List<T>)[]): T[];
  2428. }
  2429. interface LoDashImplicitArrayWrapper<T> {
  2430. /**
  2431. * @see _.intersection
  2432. */
  2433. intersection<TResult>(...arrays: (TResult[] | List<TResult>)[]): LoDashImplicitArrayWrapper<TResult>;
  2434. }
  2435. interface LoDashImplicitObjectWrapper<T> {
  2436. /**
  2437. * @see _.intersection
  2438. */
  2439. intersection<TResult>(...arrays: (TResult[] | List<TResult>)[]): LoDashImplicitArrayWrapper<TResult>;
  2440. }
  2441. interface LoDashExplicitArrayWrapper<T> {
  2442. /**
  2443. * @see _.intersection
  2444. */
  2445. intersection<TResult>(...arrays: (TResult[] | List<TResult>)[]): LoDashExplicitArrayWrapper<TResult>;
  2446. }
  2447. interface LoDashExplicitObjectWrapper<T> {
  2448. /**
  2449. * @see _.intersection
  2450. */
  2451. intersection<TResult>(...arrays: (TResult[] | List<TResult>)[]): LoDashExplicitArrayWrapper<TResult>;
  2452. }
  2453. // _.last
  2454. interface LoDashStatic {
  2455. /**
  2456. * Gets the last element of array.
  2457. *
  2458. * @param array The array to query.
  2459. * @return Returns the last element of array.
  2460. */
  2461. last<T>(array: List<T>): T;
  2462. }
  2463. interface LoDashImplicitArrayWrapper<T> {
  2464. /**
  2465. * @see _.last
  2466. */
  2467. last(): T;
  2468. }
  2469. interface LoDashImplicitObjectWrapper<T> {
  2470. /**
  2471. * @see _.last
  2472. */
  2473. last<T>(): T;
  2474. }
  2475. interface LoDashExplicitArrayWrapper<T> {
  2476. /**
  2477. * @see _.last
  2478. */
  2479. last(): LoDashExplicitArrayWrapper<T>;
  2480. }
  2481. interface LoDashExplicitObjectWrapper<T> {
  2482. /**
  2483. * @see _.last
  2484. */
  2485. last<T>(): LoDashExplicitObjectWrapper<T>;
  2486. }
  2487. // _.lastIndexOf
  2488. interface LoDashStatic {
  2489. /**
  2490. * This method is like _.indexOf except that it iterates over elements of array from right to left.
  2491. *
  2492. * @param array The array to search.
  2493. * @param value The value to search for.
  2494. * @param fromIndex The index to search from or true to perform a binary search on a sorted array.
  2495. * @return Returns the index of the matched value, else -1.
  2496. */
  2497. lastIndexOf<T>(
  2498. array: List<T>,
  2499. value: T,
  2500. fromIndex?: boolean | number
  2501. ): number;
  2502. }
  2503. interface LoDashImplicitArrayWrapper<T> {
  2504. /**
  2505. * @see _.lastIndexOf
  2506. */
  2507. lastIndexOf(
  2508. value: T,
  2509. fromIndex?: boolean | number
  2510. ): number;
  2511. }
  2512. interface LoDashImplicitObjectWrapper<T> {
  2513. /**
  2514. * @see _.lastIndexOf
  2515. */
  2516. lastIndexOf<TResult>(
  2517. value: TResult,
  2518. fromIndex?: boolean | number
  2519. ): number;
  2520. }
  2521. interface LoDashExplicitArrayWrapper<T> {
  2522. /**
  2523. * @see _.lastIndexOf
  2524. */
  2525. lastIndexOf(
  2526. value: T,
  2527. fromIndex?: boolean | number
  2528. ): LoDashExplicitWrapper<number>;
  2529. }
  2530. interface LoDashExplicitObjectWrapper<T> {
  2531. /**
  2532. * @see _.lastIndexOf
  2533. */
  2534. lastIndexOf<TResult>(
  2535. value: TResult,
  2536. fromIndex?: boolean | number
  2537. ): LoDashExplicitWrapper<number>;
  2538. }
  2539. // _.pull
  2540. interface LoDashStatic {
  2541. /**
  2542. * Removes all provided values from array using SameValueZero for equality comparisons.
  2543. *
  2544. * Note: Unlike _.without, this method mutates array.
  2545. *
  2546. * @param array The array to modify.
  2547. * @param values The values to remove.
  2548. * @return Returns array.
  2549. */
  2550. pull<T>(
  2551. array: T[],
  2552. ...values: T[]
  2553. ): T[];
  2554. /**
  2555. * @see _.pull
  2556. */
  2557. pull<T>(
  2558. array: List<T>,
  2559. ...values: T[]
  2560. ): List<T>;
  2561. }
  2562. interface LoDashImplicitArrayWrapper<T> {
  2563. /**
  2564. * @see _.pull
  2565. */
  2566. pull(...values: T[]): LoDashImplicitArrayWrapper<T>;
  2567. }
  2568. interface LoDashImplicitObjectWrapper<T> {
  2569. /**
  2570. * @see _.pull
  2571. */
  2572. pull<TValue>(...values: TValue[]): LoDashImplicitObjectWrapper<List<TValue>>;
  2573. }
  2574. interface LoDashExplicitArrayWrapper<T> {
  2575. /**
  2576. * @see _.pull
  2577. */
  2578. pull(...values: T[]): LoDashExplicitArrayWrapper<T>;
  2579. }
  2580. interface LoDashExplicitObjectWrapper<T> {
  2581. /**
  2582. * @see _.pull
  2583. */
  2584. pull<TValue>(...values: TValue[]): LoDashExplicitObjectWrapper<List<TValue>>;
  2585. }
  2586. // _.pullAt
  2587. interface LoDashStatic {
  2588. /**
  2589. * Removes elements from array corresponding to the given indexes and returns an array of the removed elements.
  2590. * Indexes may be specified as an array of indexes or as individual arguments.
  2591. *
  2592. * Note: Unlike _.at, this method mutates array.
  2593. *
  2594. * @param array The array to modify.
  2595. * @param indexes The indexes of elements to remove, specified as individual indexes or arrays of indexes.
  2596. * @return Returns the new array of removed elements.
  2597. */
  2598. pullAt<T>(
  2599. array: List<T>,
  2600. ...indexes: (number | number[])[]
  2601. ): T[];
  2602. }
  2603. interface LoDashImplicitArrayWrapper<T> {
  2604. /**
  2605. * @see _.pullAt
  2606. */
  2607. pullAt(...indexes: (number | number[])[]): LoDashImplicitArrayWrapper<T>;
  2608. }
  2609. interface LoDashImplicitObjectWrapper<T> {
  2610. /**
  2611. * @see _.pullAt
  2612. */
  2613. pullAt<T>(...indexes: (number | number[])[]): LoDashImplicitArrayWrapper<T>;
  2614. }
  2615. interface LoDashExplicitArrayWrapper<T> {
  2616. /**
  2617. * @see _.pullAt
  2618. */
  2619. pullAt(...indexes: (number | number[])[]): LoDashExplicitArrayWrapper<T>;
  2620. }
  2621. interface LoDashExplicitObjectWrapper<T> {
  2622. /**
  2623. * @see _.pullAt
  2624. */
  2625. pullAt<T>(...indexes: (number | number[])[]): LoDashExplicitArrayWrapper<T>;
  2626. }
  2627. // _.remove
  2628. interface LoDashStatic {
  2629. /**
  2630. * Removes all elements from array that predicate returns truthy for and returns an array of the removed
  2631. * elements. The predicate is bound to thisArg and invoked with three arguments: (value, index, array).
  2632. *
  2633. * If a property name is provided for predicate the created _.property style callback returns the property
  2634. * value of the given element.
  2635. *
  2636. * If a value is also provided for thisArg the created _.matchesProperty style callback returns true for
  2637. * elements that have a matching property value, else false.
  2638. *
  2639. * If an object is provided for predicate the created _.matches style callback returns true for elements that
  2640. * have the properties of the given object, else false.
  2641. *
  2642. * Note: Unlike _.filter, this method mutates array.
  2643. *
  2644. * @param array The array to modify.
  2645. * @param predicate The function invoked per iteration.
  2646. * @param thisArg The this binding of predicate.
  2647. * @return Returns the new array of removed elements.
  2648. */
  2649. remove<T>(
  2650. array: List<T>,
  2651. predicate?: ListIterator<T, boolean>,
  2652. thisArg?: any
  2653. ): T[];
  2654. /**
  2655. * @see _.remove
  2656. */
  2657. remove<T>(
  2658. array: List<T>,
  2659. predicate?: string,
  2660. thisArg?: any
  2661. ): T[];
  2662. /**
  2663. * @see _.remove
  2664. */
  2665. remove<W, T>(
  2666. array: List<T>,
  2667. predicate?: W
  2668. ): T[];
  2669. }
  2670. interface LoDashImplicitArrayWrapper<T> {
  2671. /**
  2672. * @see _.remove
  2673. */
  2674. remove(
  2675. predicate?: ListIterator<T, boolean>,
  2676. thisArg?: any
  2677. ): LoDashImplicitArrayWrapper<T>;
  2678. /**
  2679. * @see _.remove
  2680. */
  2681. remove(
  2682. predicate?: string,
  2683. thisArg?: any
  2684. ): LoDashImplicitArrayWrapper<T>;
  2685. /**
  2686. * @see _.remove
  2687. */
  2688. remove<W>(
  2689. predicate?: W
  2690. ): LoDashImplicitArrayWrapper<T>;
  2691. }
  2692. interface LoDashImplicitObjectWrapper<T> {
  2693. /**
  2694. * @see _.remove
  2695. */
  2696. remove<TResult>(
  2697. predicate?: ListIterator<TResult, boolean>,
  2698. thisArg?: any
  2699. ): LoDashImplicitArrayWrapper<TResult>;
  2700. /**
  2701. * @see _.remove
  2702. */
  2703. remove<TResult>(
  2704. predicate?: string,
  2705. thisArg?: any
  2706. ): LoDashImplicitArrayWrapper<TResult>;
  2707. /**
  2708. * @see _.remove
  2709. */
  2710. remove<W, TResult>(
  2711. predicate?: W
  2712. ): LoDashImplicitArrayWrapper<TResult>;
  2713. }
  2714. interface LoDashExplicitArrayWrapper<T> {
  2715. /**
  2716. * @see _.remove
  2717. */
  2718. remove(
  2719. predicate?: ListIterator<T, boolean>,
  2720. thisArg?: any
  2721. ): LoDashExplicitArrayWrapper<T>;
  2722. /**
  2723. * @see _.remove
  2724. */
  2725. remove(
  2726. predicate?: string,
  2727. thisArg?: any
  2728. ): LoDashExplicitArrayWrapper<T>;
  2729. /**
  2730. * @see _.remove
  2731. */
  2732. remove<W>(
  2733. predicate?: W
  2734. ): LoDashExplicitArrayWrapper<T>;
  2735. }
  2736. interface LoDashExplicitObjectWrapper<T> {
  2737. /**
  2738. * @see _.remove
  2739. */
  2740. remove<TResult>(
  2741. predicate?: ListIterator<TResult, boolean>,
  2742. thisArg?: any
  2743. ): LoDashExplicitArrayWrapper<TResult>;
  2744. /**
  2745. * @see _.remove
  2746. */
  2747. remove<TResult>(
  2748. predicate?: string,
  2749. thisArg?: any
  2750. ): LoDashExplicitArrayWrapper<TResult>;
  2751. /**
  2752. * @see _.remove
  2753. */
  2754. remove<W, TResult>(
  2755. predicate?: W
  2756. ): LoDashExplicitArrayWrapper<TResult>;
  2757. }
  2758. // _.tail
  2759. interface LoDashStatic {
  2760. /**
  2761. * Gets all but the first element of array.
  2762. *
  2763. * @alias _.tail
  2764. *
  2765. * @param array The array to query.
  2766. * @return Returns the slice of array.
  2767. */
  2768. tail<T>(array: List<T>): T[];
  2769. }
  2770. interface LoDashImplicitArrayWrapper<T> {
  2771. /**
  2772. * @see _.tail
  2773. */
  2774. tail(): LoDashImplicitArrayWrapper<T>;
  2775. }
  2776. interface LoDashImplicitObjectWrapper<T> {
  2777. /**
  2778. * @see _.tail
  2779. */
  2780. tail<T>(): LoDashImplicitArrayWrapper<T>;
  2781. }
  2782. interface LoDashExplicitArrayWrapper<T> {
  2783. /**
  2784. * @see _.tail
  2785. */
  2786. tail(): LoDashExplicitArrayWrapper<T>;
  2787. }
  2788. interface LoDashExplicitObjectWrapper<T> {
  2789. /**
  2790. * @see _.tail
  2791. */
  2792. tail<T>(): LoDashExplicitArrayWrapper<T>;
  2793. }
  2794. // _.slice
  2795. interface LoDashStatic {
  2796. /**
  2797. * Creates a slice of array from start up to, but not including, end.
  2798. *
  2799. * @param array The array to slice.
  2800. * @param start The start position.
  2801. * @param end The end position.
  2802. * @return Returns the slice of array.
  2803. */
  2804. slice<T>(
  2805. array: T[],
  2806. start?: number,
  2807. end?: number
  2808. ): T[];
  2809. }
  2810. interface LoDashImplicitArrayWrapper<T> {
  2811. /**
  2812. * @see _.slice
  2813. */
  2814. slice(
  2815. start?: number,
  2816. end?: number
  2817. ): LoDashImplicitArrayWrapper<T>;
  2818. }
  2819. interface LoDashExplicitArrayWrapper<T> {
  2820. /**
  2821. * @see _.slice
  2822. */
  2823. slice(
  2824. start?: number,
  2825. end?: number
  2826. ): LoDashExplicitArrayWrapper<T>;
  2827. }
  2828. // _.sortedIndex
  2829. interface LoDashStatic {
  2830. /**
  2831. * Uses a binary search to determine the lowest index at which `value` should
  2832. * be inserted into `array` in order to maintain its sort order.
  2833. *
  2834. * @static
  2835. * @memberOf _
  2836. * @category Array
  2837. * @param {Array} array The sorted array to inspect.
  2838. * @param {*} value The value to evaluate.
  2839. * @returns {number} Returns the index at which `value` should be inserted into `array`.
  2840. * @example
  2841. *
  2842. * _.sortedIndex([30, 50], 40);
  2843. * // => 1
  2844. *
  2845. * _.sortedIndex([4, 5], 4);
  2846. * // => 0
  2847. */
  2848. sortedIndex<T, TSort>(
  2849. array: List<T>,
  2850. value: T
  2851. ): number;
  2852. /**
  2853. * @see _.sortedIndex
  2854. */
  2855. sortedIndex<T>(
  2856. array: List<T>,
  2857. value: T
  2858. ): number;
  2859. /**
  2860. * @see _.sortedIndex
  2861. */
  2862. sortedIndex<T>(
  2863. array: List<T>,
  2864. value: T
  2865. ): number;
  2866. /**
  2867. * @see _.sortedIndex
  2868. */
  2869. sortedIndex<W, T>(
  2870. array: List<T>,
  2871. value: T
  2872. ): number;
  2873. /**
  2874. * @see _.sortedIndex
  2875. */
  2876. sortedIndex<T>(
  2877. array: List<T>,
  2878. value: T
  2879. ): number;
  2880. }
  2881. interface LoDashImplicitWrapper<T> {
  2882. /**
  2883. * @see _.sortedIndex
  2884. */
  2885. sortedIndex<TSort>(
  2886. value: string
  2887. ): number;
  2888. }
  2889. interface LoDashImplicitArrayWrapper<T> {
  2890. /**
  2891. * @see _.sortedIndex
  2892. */
  2893. sortedIndex<TSort>(
  2894. value: T
  2895. ): number;
  2896. /**
  2897. * @see _.sortedIndex
  2898. */
  2899. sortedIndex(
  2900. value: T
  2901. ): number;
  2902. }
  2903. interface LoDashImplicitObjectWrapper<T> {
  2904. /**
  2905. * @see _.sortedIndex
  2906. */
  2907. sortedIndex<T, TSort>(
  2908. value: T
  2909. ): number;
  2910. /**
  2911. * @see _.sortedIndex
  2912. */
  2913. sortedIndex<T>(
  2914. value: T
  2915. ): number;
  2916. /**
  2917. * @see _.sortedIndex
  2918. */
  2919. sortedIndex<W, T>(
  2920. value: T
  2921. ): number;
  2922. }
  2923. interface LoDashExplicitWrapper<T> {
  2924. /**
  2925. * @see _.sortedIndex
  2926. */
  2927. sortedIndex<TSort>(
  2928. value: string
  2929. ): LoDashExplicitWrapper<number>;
  2930. }
  2931. interface LoDashExplicitArrayWrapper<T> {
  2932. /**
  2933. * @see _.sortedIndex
  2934. */
  2935. sortedIndex<TSort>(
  2936. value: T
  2937. ): LoDashExplicitWrapper<number>;
  2938. /**
  2939. * @see _.sortedIndex
  2940. */
  2941. sortedIndex(
  2942. value: T
  2943. ): LoDashExplicitWrapper<number>;
  2944. /**
  2945. * @see _.sortedIndex
  2946. */
  2947. sortedIndex<W>(
  2948. value: T
  2949. ): LoDashExplicitWrapper<number>;
  2950. }
  2951. interface LoDashExplicitObjectWrapper<T> {
  2952. /**
  2953. * @see _.sortedIndex
  2954. */
  2955. sortedIndex<T, TSort>(
  2956. value: T
  2957. ): LoDashExplicitWrapper<number>;
  2958. /**
  2959. * @see _.sortedIndex
  2960. */
  2961. sortedIndex<T>(
  2962. value: T
  2963. ): LoDashExplicitWrapper<number>;
  2964. /**
  2965. * @see _.sortedIndex
  2966. */
  2967. sortedIndex<W, T>(
  2968. value: T
  2969. ): LoDashExplicitWrapper<number>;
  2970. }
  2971. // _.sortedIndexBy
  2972. interface LoDashStatic {
  2973. /**
  2974. * This method is like `_.sortedIndex` except that it accepts `iteratee`
  2975. * which is invoked for `value` and each element of `array` to compute their
  2976. * sort ranking. The iteratee is invoked with one argument: (value).
  2977. *
  2978. * @static
  2979. * @memberOf _
  2980. * @category Array
  2981. * @param {Array} array The sorted array to inspect.
  2982. * @param {*} value The value to evaluate.
  2983. * @param {Function|Object|string} [iteratee=_.identity] The iteratee invoked per element.
  2984. * @returns {number} Returns the index at which `value` should be inserted into `array`.
  2985. * @example
  2986. *
  2987. * var dict = { 'thirty': 30, 'forty': 40, 'fifty': 50 };
  2988. *
  2989. * _.sortedIndexBy(['thirty', 'fifty'], 'forty', _.propertyOf(dict));
  2990. * // => 1
  2991. *
  2992. * // using the `_.property` iteratee shorthand
  2993. * _.sortedIndexBy([{ 'x': 4 }, { 'x': 5 }], { 'x': 4 }, 'x');
  2994. * // => 0
  2995. */
  2996. sortedIndexBy<T, TSort>(
  2997. array: List<T>,
  2998. value: T,
  2999. iteratee: (x: T) => TSort
  3000. ): number;
  3001. /**
  3002. * @see _.sortedIndexBy
  3003. */
  3004. sortedIndexBy<T>(
  3005. array: List<T>,
  3006. value: T,
  3007. iteratee: (x: T) => any
  3008. ): number;
  3009. /**
  3010. * @see _.sortedIndexBy
  3011. */
  3012. sortedIndexBy<T>(
  3013. array: List<T>,
  3014. value: T,
  3015. iteratee: string
  3016. ): number;
  3017. /**
  3018. * @see _.sortedIndexBy
  3019. */
  3020. sortedIndexBy<W, T>(
  3021. array: List<T>,
  3022. value: T,
  3023. iteratee: W
  3024. ): number;
  3025. /**
  3026. * @see _.sortedIndexBy
  3027. */
  3028. sortedIndexBy<T>(
  3029. array: List<T>,
  3030. value: T,
  3031. iteratee: Object
  3032. ): number;
  3033. }
  3034. interface LoDashImplicitWrapper<T> {
  3035. /**
  3036. * @see _.sortedIndexBy
  3037. */
  3038. sortedIndexBy<TSort>(
  3039. value: string,
  3040. iteratee: (x: string) => TSort
  3041. ): number;
  3042. }
  3043. interface LoDashImplicitArrayWrapper<T> {
  3044. /**
  3045. * @see _.sortedIndexBy
  3046. */
  3047. sortedIndexBy<TSort>(
  3048. value: T,
  3049. iteratee: (x: T) => TSort
  3050. ): number;
  3051. /**
  3052. * @see _.sortedIndexBy
  3053. */
  3054. sortedIndexBy(
  3055. value: T,
  3056. iteratee: string
  3057. ): number;
  3058. /**
  3059. * @see _.sortedIndexBy
  3060. */
  3061. sortedIndexBy<W>(
  3062. value: T,
  3063. iteratee: W
  3064. ): number;
  3065. }
  3066. interface LoDashImplicitObjectWrapper<T> {
  3067. /**
  3068. * @see _.sortedIndexBy
  3069. */
  3070. sortedIndexBy<T, TSort>(
  3071. value: T,
  3072. iteratee: (x: T) => TSort
  3073. ): number;
  3074. /**
  3075. * @see _.sortedIndexBy
  3076. */
  3077. sortedIndexBy<T>(
  3078. value: T,
  3079. iteratee: (x: T) => any
  3080. ): number;
  3081. /**
  3082. * @see _.sortedIndexBy
  3083. */
  3084. sortedIndexBy<T>(
  3085. value: T,
  3086. iteratee: string
  3087. ): number;
  3088. /**
  3089. * @see _.sortedIndexBy
  3090. */
  3091. sortedIndexBy<W, T>(
  3092. value: T,
  3093. iteratee: W
  3094. ): number;
  3095. /**
  3096. * @see _.sortedIndexBy
  3097. */
  3098. sortedIndexBy<T>(
  3099. value: T,
  3100. iteratee: Object
  3101. ): number;
  3102. }
  3103. interface LoDashExplicitWrapper<T> {
  3104. /**
  3105. * @see _.sortedIndexBy
  3106. */
  3107. sortedIndexBy<TSort>(
  3108. value: string,
  3109. iteratee: (x: string) => TSort
  3110. ): LoDashExplicitWrapper<number>;
  3111. }
  3112. interface LoDashExplicitArrayWrapper<T> {
  3113. /**
  3114. * @see _.sortedIndexBy
  3115. */
  3116. sortedIndexBy<TSort>(
  3117. value: T,
  3118. iteratee: (x: T) => TSort
  3119. ): LoDashExplicitWrapper<number>;
  3120. /**
  3121. * @see _.sortedIndexBy
  3122. */
  3123. sortedIndexBy(
  3124. value: T,
  3125. iteratee: string
  3126. ): LoDashExplicitWrapper<number>;
  3127. /**
  3128. * @see _.sortedIndexBy
  3129. */
  3130. sortedIndexBy<W>(
  3131. value: T,
  3132. iteratee: W
  3133. ): LoDashExplicitWrapper<number>;
  3134. }
  3135. interface LoDashExplicitObjectWrapper<T> {
  3136. /**
  3137. * @see _.sortedIndexBy
  3138. */
  3139. sortedIndexBy<T, TSort>(
  3140. value: T,
  3141. iteratee: (x: T) => TSort
  3142. ): LoDashExplicitWrapper<number>;
  3143. /**
  3144. * @see _.sortedIndexBy
  3145. */
  3146. sortedIndexBy<T>(
  3147. value: T,
  3148. iteratee: (x: T) => any
  3149. ): LoDashExplicitWrapper<number>;
  3150. /**
  3151. * @see _.sortedIndexBy
  3152. */
  3153. sortedIndexBy<T>(
  3154. value: T,
  3155. iteratee: string
  3156. ): LoDashExplicitWrapper<number>;
  3157. /**
  3158. * @see _.sortedIndexBy
  3159. */
  3160. sortedIndexBy<W, T>(
  3161. value: T,
  3162. iteratee: W
  3163. ): LoDashExplicitWrapper<number>;
  3164. /**
  3165. * @see _.sortedIndexBy
  3166. */
  3167. sortedIndexBy<T>(
  3168. value: T,
  3169. iteratee: Object
  3170. ): LoDashExplicitWrapper<number>;
  3171. }
  3172. // _.sortedLastIndex
  3173. interface LoDashStatic {
  3174. /**
  3175. * This method is like `_.sortedIndex` except that it returns the highest
  3176. * index at which `value` should be inserted into `array` in order to
  3177. * maintain its sort order.
  3178. *
  3179. * @static
  3180. * @memberOf _
  3181. * @category Array
  3182. * @param {Array} array The sorted array to inspect.
  3183. * @param {*} value The value to evaluate.
  3184. * @returns {number} Returns the index at which `value` should be inserted into `array`.
  3185. * @example
  3186. *
  3187. * _.sortedLastIndex([4, 5], 4);
  3188. * // => 1
  3189. */
  3190. sortedLastIndex<T, TSort>(
  3191. array: List<T>,
  3192. value: T
  3193. ): number;
  3194. /**
  3195. * @see _.sortedLastIndex
  3196. */
  3197. sortedLastIndex<T>(
  3198. array: List<T>,
  3199. value: T
  3200. ): number;
  3201. /**
  3202. * @see _.sortedLastIndex
  3203. */
  3204. sortedLastIndex<T>(
  3205. array: List<T>,
  3206. value: T
  3207. ): number;
  3208. /**
  3209. * @see _.sortedLastIndex
  3210. */
  3211. sortedLastIndex<W, T>(
  3212. array: List<T>,
  3213. value: T
  3214. ): number;
  3215. /**
  3216. * @see _.sortedLastIndex
  3217. */
  3218. sortedLastIndex<T>(
  3219. array: List<T>,
  3220. value: T
  3221. ): number;
  3222. }
  3223. interface LoDashImplicitWrapper<T> {
  3224. /**
  3225. * @see _.sortedLastIndex
  3226. */
  3227. sortedLastIndex<TSort>(
  3228. value: string
  3229. ): number;
  3230. }
  3231. interface LoDashImplicitArrayWrapper<T> {
  3232. /**
  3233. * @see _.sortedLastIndex
  3234. */
  3235. sortedLastIndex<TSort>(
  3236. value: T
  3237. ): number;
  3238. /**
  3239. * @see _.sortedLastIndex
  3240. */
  3241. sortedLastIndex(
  3242. value: T
  3243. ): number;
  3244. /**
  3245. * @see _.sortedLastIndex
  3246. */
  3247. sortedLastIndex<W>(
  3248. value: T
  3249. ): number;
  3250. }
  3251. interface LoDashImplicitObjectWrapper<T> {
  3252. /**
  3253. * @see _.sortedLastIndex
  3254. */
  3255. sortedLastIndex<T, TSort>(
  3256. value: T
  3257. ): number;
  3258. /**
  3259. * @see _.sortedLastIndex
  3260. */
  3261. sortedLastIndex<T>(
  3262. value: T
  3263. ): number;
  3264. /**
  3265. * @see _.sortedLastIndex
  3266. */
  3267. sortedLastIndex<W, T>(
  3268. value: T
  3269. ): number;
  3270. }
  3271. interface LoDashExplicitWrapper<T> {
  3272. /**
  3273. * @see _.sortedLastIndex
  3274. */
  3275. sortedLastIndex<TSort>(
  3276. value: string
  3277. ): LoDashExplicitWrapper<number>;
  3278. }
  3279. interface LoDashExplicitArrayWrapper<T> {
  3280. /**
  3281. * @see _.sortedLastIndex
  3282. */
  3283. sortedLastIndex<TSort>(
  3284. value: T
  3285. ): LoDashExplicitWrapper<number>;
  3286. /**
  3287. * @see _.sortedLastIndex
  3288. */
  3289. sortedLastIndex(
  3290. value: T
  3291. ): LoDashExplicitWrapper<number>;
  3292. }
  3293. interface LoDashExplicitObjectWrapper<T> {
  3294. /**
  3295. * @see _.sortedLastIndex
  3296. */
  3297. sortedLastIndex<T, TSort>(
  3298. value: T
  3299. ): LoDashExplicitWrapper<number>;
  3300. /**
  3301. * @see _.sortedLastIndex
  3302. */
  3303. sortedLastIndex<T>(
  3304. value: T
  3305. ): LoDashExplicitWrapper<number>;
  3306. /**
  3307. * @see _.sortedLastIndex
  3308. */
  3309. sortedLastIndex<W, T>(
  3310. value: T
  3311. ): LoDashExplicitWrapper<number>;
  3312. }
  3313. // _.sortedLastIndexBy
  3314. interface LoDashStatic {
  3315. /**
  3316. * This method is like `_.sortedLastIndex` except that it accepts `iteratee`
  3317. * which is invoked for `value` and each element of `array` to compute their
  3318. * sort ranking. The iteratee is invoked with one argument: (value).
  3319. *
  3320. * @static
  3321. * @memberOf _
  3322. * @category Array
  3323. * @param {Array} array The sorted array to inspect.
  3324. * @param {*} value The value to evaluate.
  3325. * @param {Function|Object|string} [iteratee=_.identity] The iteratee invoked per element.
  3326. * @returns {number} Returns the index at which `value` should be inserted into `array`.
  3327. * @example
  3328. *
  3329. * // using the `_.property` iteratee shorthand
  3330. * _.sortedLastIndexBy([{ 'x': 4 }, { 'x': 5 }], { 'x': 4 }, 'x');
  3331. * // => 1
  3332. */
  3333. sortedLastIndexBy<T, TSort>(
  3334. array: List<T>,
  3335. value: T,
  3336. iteratee: (x: T) => TSort
  3337. ): number;
  3338. /**
  3339. * @see _.sortedLastIndexBy
  3340. */
  3341. sortedLastIndexBy<T>(
  3342. array: List<T>,
  3343. value: T,
  3344. iteratee: (x: T) => any
  3345. ): number;
  3346. /**
  3347. * @see _.sortedLastIndexBy
  3348. */
  3349. sortedLastIndexBy<T>(
  3350. array: List<T>,
  3351. value: T,
  3352. iteratee: string
  3353. ): number;
  3354. /**
  3355. * @see _.sortedLastIndexBy
  3356. */
  3357. sortedLastIndexBy<W, T>(
  3358. array: List<T>,
  3359. value: T,
  3360. iteratee: W
  3361. ): number;
  3362. /**
  3363. * @see _.sortedLastIndexBy
  3364. */
  3365. sortedLastIndexBy<T>(
  3366. array: List<T>,
  3367. value: T,
  3368. iteratee: Object
  3369. ): number;
  3370. }
  3371. interface LoDashImplicitWrapper<T> {
  3372. /**
  3373. * @see _.sortedLastIndexBy
  3374. */
  3375. sortedLastIndexBy<TSort>(
  3376. value: string,
  3377. iteratee: (x: string) => TSort
  3378. ): number;
  3379. }
  3380. interface LoDashImplicitArrayWrapper<T> {
  3381. /**
  3382. * @see _.sortedLastIndexBy
  3383. */
  3384. sortedLastIndexBy<TSort>(
  3385. value: T,
  3386. iteratee: (x: T) => TSort
  3387. ): number;
  3388. /**
  3389. * @see _.sortedLastIndexBy
  3390. */
  3391. sortedLastIndexBy(
  3392. value: T,
  3393. iteratee: string
  3394. ): number;
  3395. /**
  3396. * @see _.sortedLastIndexBy
  3397. */
  3398. sortedLastIndexBy<W>(
  3399. value: T,
  3400. iteratee: W
  3401. ): number;
  3402. }
  3403. interface LoDashImplicitObjectWrapper<T> {
  3404. /**
  3405. * @see _.sortedLastIndexBy
  3406. */
  3407. sortedLastIndexBy<T, TSort>(
  3408. value: T,
  3409. iteratee: (x: T) => TSort
  3410. ): number;
  3411. /**
  3412. * @see _.sortedLastIndexBy
  3413. */
  3414. sortedLastIndexBy<T>(
  3415. value: T,
  3416. iteratee: (x: T) => any
  3417. ): number;
  3418. /**
  3419. * @see _.sortedLastIndexBy
  3420. */
  3421. sortedLastIndexBy<T>(
  3422. value: T,
  3423. iteratee: string
  3424. ): number;
  3425. /**
  3426. * @see _.sortedLastIndexBy
  3427. */
  3428. sortedLastIndexBy<W, T>(
  3429. value: T,
  3430. iteratee: W
  3431. ): number;
  3432. /**
  3433. * @see _.sortedLastIndexBy
  3434. */
  3435. sortedLastIndexBy<T>(
  3436. value: T,
  3437. iteratee: Object
  3438. ): number;
  3439. }
  3440. interface LoDashExplicitWrapper<T> {
  3441. /**
  3442. * @see _.sortedLastIndexBy
  3443. */
  3444. sortedLastIndexBy<TSort>(
  3445. value: string,
  3446. iteratee: (x: string) => TSort
  3447. ): LoDashExplicitWrapper<number>;
  3448. }
  3449. interface LoDashExplicitArrayWrapper<T> {
  3450. /**
  3451. * @see _.sortedLastIndexBy
  3452. */
  3453. sortedLastIndexBy<TSort>(
  3454. value: T,
  3455. iteratee: (x: T) => TSort
  3456. ): LoDashExplicitWrapper<number>;
  3457. /**
  3458. * @see _.sortedLastIndexBy
  3459. */
  3460. sortedLastIndexBy(
  3461. value: T,
  3462. iteratee: string
  3463. ): LoDashExplicitWrapper<number>;
  3464. /**
  3465. * @see _.sortedLastIndexBy
  3466. */
  3467. sortedLastIndexBy<W>(
  3468. value: T,
  3469. iteratee: W
  3470. ): LoDashExplicitWrapper<number>;
  3471. }
  3472. interface LoDashExplicitObjectWrapper<T> {
  3473. /**
  3474. * @see _.sortedLastIndexBy
  3475. */
  3476. sortedLastIndexBy<T, TSort>(
  3477. value: T,
  3478. iteratee: (x: T) => TSort
  3479. ): LoDashExplicitWrapper<number>;
  3480. /**
  3481. * @see _.sortedLastIndexBy
  3482. */
  3483. sortedLastIndexBy<T>(
  3484. value: T,
  3485. iteratee: (x: T) => any
  3486. ): LoDashExplicitWrapper<number>;
  3487. /**
  3488. * @see _.sortedLastIndexBy
  3489. */
  3490. sortedLastIndexBy<T>(
  3491. value: T,
  3492. iteratee: string
  3493. ): LoDashExplicitWrapper<number>;
  3494. /**
  3495. * @see _.sortedLastIndexBy
  3496. */
  3497. sortedLastIndexBy<W, T>(
  3498. value: T,
  3499. iteratee: W
  3500. ): LoDashExplicitWrapper<number>;
  3501. /**
  3502. * @see _.sortedLastIndexBy
  3503. */
  3504. sortedLastIndexBy<T>(
  3505. value: T,
  3506. iteratee: Object
  3507. ): LoDashExplicitWrapper<number>;
  3508. }
  3509. // _.sortedLastIndexOf DUMMY
  3510. interface LoDashStatic {
  3511. /**
  3512. * This method is like `_.lastIndexOf` except that it performs a binary
  3513. * search on a sorted `array`.
  3514. *
  3515. * @static
  3516. * @memberOf _
  3517. * @category Array
  3518. * @param {Array} array The array to search.
  3519. * @param {*} value The value to search for.
  3520. * @returns {number} Returns the index of the matched value, else `-1`.
  3521. * @example
  3522. *
  3523. * _.sortedLastIndexOf([1, 1, 2, 2], 2);
  3524. * // => 3
  3525. */
  3526. sortedLastIndexOf(
  3527. array: any[] | List<any>,
  3528. ...values: any[]
  3529. ): any[];
  3530. }
  3531. // _.tail
  3532. interface LoDashStatic {
  3533. /**
  3534. * @see _.rest
  3535. */
  3536. tail<T>(array: List<T>): T[];
  3537. }
  3538. interface LoDashImplicitArrayWrapper<T> {
  3539. /**
  3540. * @see _.rest
  3541. */
  3542. tail(): LoDashImplicitArrayWrapper<T>;
  3543. }
  3544. interface LoDashImplicitObjectWrapper<T> {
  3545. /**
  3546. * @see _.rest
  3547. */
  3548. tail<T>(): LoDashImplicitArrayWrapper<T>;
  3549. }
  3550. interface LoDashExplicitArrayWrapper<T> {
  3551. /**
  3552. * @see _.rest
  3553. */
  3554. tail(): LoDashExplicitArrayWrapper<T>;
  3555. }
  3556. interface LoDashExplicitObjectWrapper<T> {
  3557. /**
  3558. * @see _.rest
  3559. */
  3560. tail<T>(): LoDashExplicitArrayWrapper<T>;
  3561. }
  3562. // _.take
  3563. interface LoDashStatic {
  3564. /**
  3565. * Creates a slice of array with n elements taken from the beginning.
  3566. *
  3567. * @param array The array to query.
  3568. * @param n The number of elements to take.
  3569. * @return Returns the slice of array.
  3570. */
  3571. take<T>(
  3572. array: List<T>,
  3573. n?: number
  3574. ): T[];
  3575. }
  3576. interface LoDashImplicitArrayWrapper<T> {
  3577. /**
  3578. * @see _.take
  3579. */
  3580. take(n?: number): LoDashImplicitArrayWrapper<T>;
  3581. }
  3582. interface LoDashImplicitObjectWrapper<T> {
  3583. /**
  3584. * @see _.take
  3585. */
  3586. take<TResult>(n?: number): LoDashImplicitArrayWrapper<TResult>;
  3587. }
  3588. interface LoDashExplicitArrayWrapper<T> {
  3589. /**
  3590. * @see _.take
  3591. */
  3592. take(n?: number): LoDashExplicitArrayWrapper<T>;
  3593. }
  3594. interface LoDashExplicitObjectWrapper<T> {
  3595. /**
  3596. * @see _.take
  3597. */
  3598. take<TResult>(n?: number): LoDashExplicitArrayWrapper<TResult>;
  3599. }
  3600. // _.takeRight
  3601. interface LoDashStatic {
  3602. /**
  3603. * Creates a slice of array with n elements taken from the end.
  3604. *
  3605. * @param array The array to query.
  3606. * @param n The number of elements to take.
  3607. * @return Returns the slice of array.
  3608. */
  3609. takeRight<T>(
  3610. array: List<T>,
  3611. n?: number
  3612. ): T[];
  3613. }
  3614. interface LoDashImplicitArrayWrapper<T> {
  3615. /**
  3616. * @see _.takeRight
  3617. */
  3618. takeRight(n?: number): LoDashImplicitArrayWrapper<T>;
  3619. }
  3620. interface LoDashImplicitObjectWrapper<T> {
  3621. /**
  3622. * @see _.takeRight
  3623. */
  3624. takeRight<TResult>(n?: number): LoDashImplicitArrayWrapper<TResult>;
  3625. }
  3626. interface LoDashExplicitArrayWrapper<T> {
  3627. /**
  3628. * @see _.takeRight
  3629. */
  3630. takeRight(n?: number): LoDashExplicitArrayWrapper<T>;
  3631. }
  3632. interface LoDashExplicitObjectWrapper<T> {
  3633. /**
  3634. * @see _.takeRight
  3635. */
  3636. takeRight<TResult>(n?: number): LoDashExplicitArrayWrapper<TResult>;
  3637. }
  3638. // _.takeRightWhile
  3639. interface LoDashStatic {
  3640. /**
  3641. * Creates a slice of array with elements taken from the end. Elements are taken until predicate returns
  3642. * falsey. The predicate is bound to thisArg and invoked with three arguments: (value, index, array).
  3643. *
  3644. * If a property name is provided for predicate the created _.property style callback returns the property
  3645. * value of the given element.
  3646. *
  3647. * If a value is also provided for thisArg the created _.matchesProperty style callback returns true for
  3648. * elements that have a matching property value, else false.
  3649. *
  3650. * If an object is provided for predicate the created _.matches style callback returns true for elements that
  3651. * have the properties of the given object, else false.
  3652. *
  3653. * @param array The array to query.
  3654. * @param predicate The function invoked per iteration.
  3655. * @param thisArg The this binding of predicate.
  3656. * @return Returns the slice of array.
  3657. */
  3658. takeRightWhile<TValue>(
  3659. array: List<TValue>,
  3660. predicate?: ListIterator<TValue, boolean>,
  3661. thisArg?: any
  3662. ): TValue[];
  3663. /**
  3664. * @see _.takeRightWhile
  3665. */
  3666. takeRightWhile<TValue>(
  3667. array: List<TValue>,
  3668. predicate?: string,
  3669. thisArg?: any
  3670. ): TValue[];
  3671. /**
  3672. * @see _.takeRightWhile
  3673. */
  3674. takeRightWhile<TWhere, TValue>(
  3675. array: List<TValue>,
  3676. predicate?: TWhere
  3677. ): TValue[];
  3678. }
  3679. interface LoDashImplicitArrayWrapper<T> {
  3680. /**
  3681. * @see _.takeRightWhile
  3682. */
  3683. takeRightWhile(
  3684. predicate?: ListIterator<T, boolean>,
  3685. thisArg?: any
  3686. ): LoDashImplicitArrayWrapper<T>;
  3687. /**
  3688. * @see _.takeRightWhile
  3689. */
  3690. takeRightWhile(
  3691. predicate?: string,
  3692. thisArg?: any
  3693. ): LoDashImplicitArrayWrapper<T>;
  3694. /**
  3695. * @see _.takeRightWhile
  3696. */
  3697. takeRightWhile<TWhere>(
  3698. predicate?: TWhere
  3699. ): LoDashImplicitArrayWrapper<T>;
  3700. }
  3701. interface LoDashImplicitObjectWrapper<T> {
  3702. /**
  3703. * @see _.takeRightWhile
  3704. */
  3705. takeRightWhile<TValue>(
  3706. predicate?: ListIterator<TValue, boolean>,
  3707. thisArg?: any
  3708. ): LoDashImplicitArrayWrapper<TValue>;
  3709. /**
  3710. * @see _.takeRightWhile
  3711. */
  3712. takeRightWhile<TValue>(
  3713. predicate?: string,
  3714. thisArg?: any
  3715. ): LoDashImplicitArrayWrapper<TValue>;
  3716. /**
  3717. * @see _.takeRightWhile
  3718. */
  3719. takeRightWhile<TWhere, TValue>(
  3720. predicate?: TWhere
  3721. ): LoDashImplicitArrayWrapper<TValue>;
  3722. }
  3723. interface LoDashExplicitArrayWrapper<T> {
  3724. /**
  3725. * @see _.takeRightWhile
  3726. */
  3727. takeRightWhile(
  3728. predicate?: ListIterator<T, boolean>,
  3729. thisArg?: any
  3730. ): LoDashExplicitArrayWrapper<T>;
  3731. /**
  3732. * @see _.takeRightWhile
  3733. */
  3734. takeRightWhile(
  3735. predicate?: string,
  3736. thisArg?: any
  3737. ): LoDashExplicitArrayWrapper<T>;
  3738. /**
  3739. * @see _.takeRightWhile
  3740. */
  3741. takeRightWhile<TWhere>(
  3742. predicate?: TWhere
  3743. ): LoDashExplicitArrayWrapper<T>;
  3744. }
  3745. interface LoDashExplicitObjectWrapper<T> {
  3746. /**
  3747. * @see _.takeRightWhile
  3748. */
  3749. takeRightWhile<TValue>(
  3750. predicate?: ListIterator<TValue, boolean>,
  3751. thisArg?: any
  3752. ): LoDashExplicitArrayWrapper<TValue>;
  3753. /**
  3754. * @see _.takeRightWhile
  3755. */
  3756. takeRightWhile<TValue>(
  3757. predicate?: string,
  3758. thisArg?: any
  3759. ): LoDashExplicitArrayWrapper<TValue>;
  3760. /**
  3761. * @see _.takeRightWhile
  3762. */
  3763. takeRightWhile<TWhere, TValue>(
  3764. predicate?: TWhere
  3765. ): LoDashExplicitArrayWrapper<TValue>;
  3766. }
  3767. // _.takeWhile
  3768. interface LoDashStatic {
  3769. /**
  3770. * Creates a slice of array with elements taken from the beginning. Elements are taken until predicate returns
  3771. * falsey. The predicate is bound to thisArg and invoked with three arguments: (value, index, array).
  3772. *
  3773. * If a property name is provided for predicate the created _.property style callback returns the property
  3774. * value of the given element.
  3775. *
  3776. * If a value is also provided for thisArg the created _.matchesProperty style callback returns true for
  3777. * elements that have a matching property value, else false.
  3778. *
  3779. * If an object is provided for predicate the created _.matches style callback returns true for elements that
  3780. * have the properties of the given object, else false.
  3781. *
  3782. * @param array The array to query.
  3783. * @param predicate The function invoked per iteration.
  3784. * @param thisArg The this binding of predicate.
  3785. * @return Returns the slice of array.
  3786. */
  3787. takeWhile<TValue>(
  3788. array: List<TValue>,
  3789. predicate?: ListIterator<TValue, boolean>,
  3790. thisArg?: any
  3791. ): TValue[];
  3792. /**
  3793. * @see _.takeWhile
  3794. */
  3795. takeWhile<TValue>(
  3796. array: List<TValue>,
  3797. predicate?: string,
  3798. thisArg?: any
  3799. ): TValue[];
  3800. /**
  3801. * @see _.takeWhile
  3802. */
  3803. takeWhile<TWhere, TValue>(
  3804. array: List<TValue>,
  3805. predicate?: TWhere
  3806. ): TValue[];
  3807. }
  3808. interface LoDashImplicitArrayWrapper<T> {
  3809. /**
  3810. * @see _.takeWhile
  3811. */
  3812. takeWhile(
  3813. predicate?: ListIterator<T, boolean>,
  3814. thisArg?: any
  3815. ): LoDashImplicitArrayWrapper<T>;
  3816. /**
  3817. * @see _.takeWhile
  3818. */
  3819. takeWhile(
  3820. predicate?: string,
  3821. thisArg?: any
  3822. ): LoDashImplicitArrayWrapper<T>;
  3823. /**
  3824. * @see _.takeWhile
  3825. */
  3826. takeWhile<TWhere>(
  3827. predicate?: TWhere
  3828. ): LoDashImplicitArrayWrapper<T>;
  3829. }
  3830. interface LoDashImplicitObjectWrapper<T> {
  3831. /**
  3832. * @see _.takeWhile
  3833. */
  3834. takeWhile<TValue>(
  3835. predicate?: ListIterator<TValue, boolean>,
  3836. thisArg?: any
  3837. ): LoDashImplicitArrayWrapper<TValue>;
  3838. /**
  3839. * @see _.takeWhile
  3840. */
  3841. takeWhile<TValue>(
  3842. predicate?: string,
  3843. thisArg?: any
  3844. ): LoDashImplicitArrayWrapper<TValue>;
  3845. /**
  3846. * @see _.takeWhile
  3847. */
  3848. takeWhile<TWhere, TValue>(
  3849. predicate?: TWhere
  3850. ): LoDashImplicitArrayWrapper<TValue>;
  3851. }
  3852. interface LoDashExplicitArrayWrapper<T> {
  3853. /**
  3854. * @see _.takeWhile
  3855. */
  3856. takeWhile(
  3857. predicate?: ListIterator<T, boolean>,
  3858. thisArg?: any
  3859. ): LoDashExplicitArrayWrapper<T>;
  3860. /**
  3861. * @see _.takeWhile
  3862. */
  3863. takeWhile(
  3864. predicate?: string,
  3865. thisArg?: any
  3866. ): LoDashExplicitArrayWrapper<T>;
  3867. /**
  3868. * @see _.takeWhile
  3869. */
  3870. takeWhile<TWhere>(
  3871. predicate?: TWhere
  3872. ): LoDashExplicitArrayWrapper<T>;
  3873. }
  3874. interface LoDashExplicitObjectWrapper<T> {
  3875. /**
  3876. * @see _.takeWhile
  3877. */
  3878. takeWhile<TValue>(
  3879. predicate?: ListIterator<TValue, boolean>,
  3880. thisArg?: any
  3881. ): LoDashExplicitArrayWrapper<TValue>;
  3882. /**
  3883. * @see _.takeWhile
  3884. */
  3885. takeWhile<TValue>(
  3886. predicate?: string,
  3887. thisArg?: any
  3888. ): LoDashExplicitArrayWrapper<TValue>;
  3889. /**
  3890. * @see _.takeWhile
  3891. */
  3892. takeWhile<TWhere, TValue>(
  3893. predicate?: TWhere
  3894. ): LoDashExplicitArrayWrapper<TValue>;
  3895. }
  3896. // _.union
  3897. interface LoDashStatic {
  3898. /**
  3899. * Creates an array of unique values, in order, from all of the provided arrays using SameValueZero for
  3900. * equality comparisons.
  3901. *
  3902. * @param arrays The arrays to inspect.
  3903. * @return Returns the new array of combined values.
  3904. */
  3905. union<T>(...arrays: List<T>[]): T[];
  3906. }
  3907. interface LoDashImplicitArrayWrapper<T> {
  3908. /**
  3909. * @see _.union
  3910. */
  3911. union(...arrays: List<T>[]): LoDashImplicitArrayWrapper<T>;
  3912. /**
  3913. * @see _.union
  3914. */
  3915. union<T>(...arrays: List<T>[]): LoDashImplicitArrayWrapper<T>;
  3916. }
  3917. interface LoDashImplicitObjectWrapper<T> {
  3918. /**
  3919. * @see _.union
  3920. */
  3921. union<T>(...arrays: List<T>[]): LoDashImplicitArrayWrapper<T>;
  3922. }
  3923. interface LoDashExplicitArrayWrapper<T> {
  3924. /**
  3925. * @see _.union
  3926. */
  3927. union(...arrays: List<T>[]): LoDashExplicitArrayWrapper<T>;
  3928. /**
  3929. * @see _.union
  3930. */
  3931. union<T>(...arrays: List<T>[]): LoDashExplicitArrayWrapper<T>;
  3932. }
  3933. interface LoDashExplicitObjectWrapper<T> {
  3934. /**
  3935. * @see _.union
  3936. */
  3937. union<T>(...arrays: List<T>[]): LoDashExplicitArrayWrapper<T>;
  3938. }
  3939. // _.unionBy
  3940. interface LoDashStatic {
  3941. /**
  3942. * This method is like `_.union` except that it accepts `iteratee` which is
  3943. * invoked for each element of each `arrays` to generate the criterion by which
  3944. * uniqueness is computed. The iteratee is invoked with one argument: (value).
  3945. *
  3946. * @param arrays The arrays to inspect.
  3947. * @param iteratee The iteratee invoked per element.
  3948. * @return Returns the new array of combined values.
  3949. */
  3950. unionBy<T>(
  3951. arrays: T[] | List<T>,
  3952. iteratee?: (value: T) => any
  3953. ): T[];
  3954. /**
  3955. * @see _.unionBy
  3956. */
  3957. unionBy<T, W extends Object>(
  3958. arrays: T[] | List<T>,
  3959. iteratee?: W
  3960. ): T[];
  3961. /**
  3962. * @see _.unionBy
  3963. */
  3964. unionBy<T>(
  3965. arrays1: T[] | List<T>,
  3966. arrays2: T[] | List<T>,
  3967. iteratee?: (value: T) => any
  3968. ): T[];
  3969. /**
  3970. * @see _.unionBy
  3971. */
  3972. unionBy<T, W extends Object>(
  3973. arrays1: T[] | List<T>,
  3974. arrays2: T[] | List<T>,
  3975. iteratee?: W
  3976. ): T[];
  3977. /**
  3978. * @see _.unionBy
  3979. */
  3980. unionBy<T>(
  3981. arrays1: T[] | List<T>,
  3982. arrays2: T[] | List<T>,
  3983. arrays3: T[] | List<T>,
  3984. iteratee?: (value: T) => any
  3985. ): T[];
  3986. /**
  3987. * @see _.unionBy
  3988. */
  3989. unionBy<T, W extends Object>(
  3990. arrays1: T[] | List<T>,
  3991. arrays2: T[] | List<T>,
  3992. arrays3: T[] | List<T>,
  3993. iteratee?: W
  3994. ): T[];
  3995. /**
  3996. * @see _.unionBy
  3997. */
  3998. unionBy<T>(
  3999. arrays1: T[] | List<T>,
  4000. arrays2: T[] | List<T>,
  4001. arrays3: T[] | List<T>,
  4002. arrays4: T[] | List<T>,
  4003. iteratee?: (value: T) => any
  4004. ): T[];
  4005. /**
  4006. * @see _.unionBy
  4007. */
  4008. unionBy<T, W extends Object>(
  4009. arrays1: T[] | List<T>,
  4010. arrays2: T[] | List<T>,
  4011. arrays3: T[] | List<T>,
  4012. arrays4: T[] | List<T>,
  4013. iteratee?: W
  4014. ): T[];
  4015. /**
  4016. * @see _.unionBy
  4017. */
  4018. unionBy<T>(
  4019. arrays1: T[] | List<T>,
  4020. arrays2: T[] | List<T>,
  4021. arrays3: T[] | List<T>,
  4022. arrays4: T[] | List<T>,
  4023. arrays5: T[] | List<T>,
  4024. iteratee?: (value: T) => any
  4025. ): T[];
  4026. /**
  4027. * @see _.unionBy
  4028. */
  4029. unionBy<T, W extends Object>(
  4030. arrays1: T[] | List<T>,
  4031. arrays2: T[] | List<T>,
  4032. arrays3: T[] | List<T>,
  4033. arrays4: T[] | List<T>,
  4034. arrays5: T[] | List<T>,
  4035. iteratee?: W
  4036. ): T[];
  4037. /**
  4038. * @see _.unionBy
  4039. */
  4040. unionBy<T>(
  4041. arrays: T[] | List<T>,
  4042. ...iteratee: any[]
  4043. ): T[];
  4044. }
  4045. interface LoDashImplicitArrayWrapper<T> {
  4046. /**
  4047. * @see _.unionBy
  4048. */
  4049. unionBy<T>(
  4050. iteratee?: (value: T) => any
  4051. ): LoDashImplicitArrayWrapper<T>;
  4052. /**
  4053. * @see _.unionBy
  4054. */
  4055. unionBy<T, W extends Object>(
  4056. iteratee?: W
  4057. ): LoDashImplicitArrayWrapper<T>;
  4058. /**
  4059. * @see _.unionBy
  4060. */
  4061. unionBy<T>(
  4062. arrays2: T[] | List<T>,
  4063. iteratee?: (value: T) => any
  4064. ): LoDashImplicitArrayWrapper<T>;
  4065. /**
  4066. * @see _.unionBy
  4067. */
  4068. unionBy<T, W extends Object>(
  4069. arrays2: T[] | List<T>,
  4070. iteratee?: W
  4071. ): LoDashImplicitArrayWrapper<T>;
  4072. /**
  4073. * @see _.unionBy
  4074. */
  4075. unionBy<T>(
  4076. arrays2: T[] | List<T>,
  4077. arrays3: T[] | List<T>,
  4078. iteratee?: (value: T) => any
  4079. ): LoDashImplicitArrayWrapper<T>;
  4080. /**
  4081. * @see _.unionBy
  4082. */
  4083. unionBy<T, W extends Object>(
  4084. arrays2: T[] | List<T>,
  4085. arrays3: T[] | List<T>,
  4086. iteratee?: W
  4087. ): LoDashImplicitArrayWrapper<T>;
  4088. /**
  4089. * @see _.unionBy
  4090. */
  4091. unionBy<T>(
  4092. arrays2: T[] | List<T>,
  4093. arrays3: T[] | List<T>,
  4094. arrays4: T[] | List<T>,
  4095. iteratee?: (value: T) => any
  4096. ): LoDashImplicitArrayWrapper<T>;
  4097. /**
  4098. * @see _.unionBy
  4099. */
  4100. unionBy<T, W extends Object>(
  4101. arrays2: T[] | List<T>,
  4102. arrays3: T[] | List<T>,
  4103. arrays4: T[] | List<T>,
  4104. iteratee?: W
  4105. ): LoDashImplicitArrayWrapper<T>;
  4106. /**
  4107. * @see _.unionBy
  4108. */
  4109. unionBy<T>(
  4110. arrays2: T[] | List<T>,
  4111. arrays3: T[] | List<T>,
  4112. arrays4: T[] | List<T>,
  4113. arrays5: T[] | List<T>,
  4114. iteratee?: (value: T) => any
  4115. ): LoDashImplicitArrayWrapper<T>;
  4116. /**
  4117. * @see _.unionBy
  4118. */
  4119. unionBy<T, W extends Object>(
  4120. arrays2: T[] | List<T>,
  4121. arrays3: T[] | List<T>,
  4122. arrays4: T[] | List<T>,
  4123. arrays5: T[] | List<T>,
  4124. iteratee?: W
  4125. ): LoDashImplicitArrayWrapper<T>;
  4126. /**
  4127. * @see _.unionBy
  4128. */
  4129. unionBy<T>(
  4130. ...iteratee: any[]
  4131. ): LoDashImplicitArrayWrapper<T>;
  4132. }
  4133. interface LoDashImplicitObjectWrapper<T> {
  4134. /**
  4135. * @see _.unionBy
  4136. */
  4137. unionBy<T>(
  4138. iteratee?: (value: T) => any
  4139. ): LoDashImplicitArrayWrapper<T>;
  4140. /**
  4141. * @see _.unionBy
  4142. */
  4143. unionBy<T, W extends Object>(
  4144. iteratee?: W
  4145. ): LoDashImplicitArrayWrapper<T>;
  4146. /**
  4147. * @see _.unionBy
  4148. */
  4149. unionBy<T>(
  4150. arrays2: T[] | List<T>,
  4151. iteratee?: (value: T) => any
  4152. ): LoDashImplicitArrayWrapper<T>;
  4153. /**
  4154. * @see _.unionBy
  4155. */
  4156. unionBy<T, W extends Object>(
  4157. arrays2: T[] | List<T>,
  4158. iteratee?: W
  4159. ): LoDashImplicitArrayWrapper<T>;
  4160. /**
  4161. * @see _.unionBy
  4162. */
  4163. unionBy<T>(
  4164. arrays2: T[] | List<T>,
  4165. arrays3: T[] | List<T>,
  4166. iteratee?: (value: T) => any
  4167. ): LoDashImplicitArrayWrapper<T>;
  4168. /**
  4169. * @see _.unionBy
  4170. */
  4171. unionBy<T, W extends Object>(
  4172. arrays2: T[] | List<T>,
  4173. arrays3: T[] | List<T>,
  4174. iteratee?: W
  4175. ): LoDashImplicitArrayWrapper<T>;
  4176. /**
  4177. * @see _.unionBy
  4178. */
  4179. unionBy<T>(
  4180. arrays2: T[] | List<T>,
  4181. arrays3: T[] | List<T>,
  4182. arrays4: T[] | List<T>,
  4183. iteratee?: (value: T) => any
  4184. ): LoDashImplicitArrayWrapper<T>;
  4185. /**
  4186. * @see _.unionBy
  4187. */
  4188. unionBy<T, W extends Object>(
  4189. arrays2: T[] | List<T>,
  4190. arrays3: T[] | List<T>,
  4191. arrays4: T[] | List<T>,
  4192. iteratee?: W
  4193. ): LoDashImplicitArrayWrapper<T>;
  4194. /**
  4195. * @see _.unionBy
  4196. */
  4197. unionBy<T>(
  4198. arrays2: T[] | List<T>,
  4199. arrays3: T[] | List<T>,
  4200. arrays4: T[] | List<T>,
  4201. arrays5: T[] | List<T>,
  4202. iteratee?: (value: T) => any
  4203. ): LoDashImplicitArrayWrapper<T>;
  4204. /**
  4205. * @see _.unionBy
  4206. */
  4207. unionBy<T, W extends Object>(
  4208. arrays2: T[] | List<T>,
  4209. arrays3: T[] | List<T>,
  4210. arrays4: T[] | List<T>,
  4211. arrays5: T[] | List<T>,
  4212. iteratee?: W
  4213. ): LoDashImplicitArrayWrapper<T>;
  4214. /**
  4215. * @see _.unionBy
  4216. */
  4217. unionBy<T>(
  4218. ...iteratee: any[]
  4219. ): LoDashImplicitArrayWrapper<T>;
  4220. }
  4221. interface LoDashExplicitArrayWrapper<T> {
  4222. /**
  4223. * @see _.unionBy
  4224. */
  4225. unionBy<T>(
  4226. iteratee?: (value: T) => any
  4227. ): LoDashExplicitArrayWrapper<T>;
  4228. /**
  4229. * @see _.unionBy
  4230. */
  4231. unionBy<T, W extends Object>(
  4232. iteratee?: W
  4233. ): LoDashExplicitArrayWrapper<T>;
  4234. /**
  4235. * @see _.unionBy
  4236. */
  4237. unionBy<T>(
  4238. arrays2: T[] | List<T>,
  4239. iteratee?: (value: T) => any
  4240. ): LoDashExplicitArrayWrapper<T>;
  4241. /**
  4242. * @see _.unionBy
  4243. */
  4244. unionBy<T, W extends Object>(
  4245. arrays2: T[] | List<T>,
  4246. iteratee?: W
  4247. ): LoDashExplicitArrayWrapper<T>;
  4248. /**
  4249. * @see _.unionBy
  4250. */
  4251. unionBy<T>(
  4252. arrays2: T[] | List<T>,
  4253. arrays3: T[] | List<T>,
  4254. iteratee?: (value: T) => any
  4255. ): LoDashExplicitArrayWrapper<T>;
  4256. /**
  4257. * @see _.unionBy
  4258. */
  4259. unionBy<T, W extends Object>(
  4260. arrays2: T[] | List<T>,
  4261. arrays3: T[] | List<T>,
  4262. iteratee?: W
  4263. ): LoDashExplicitArrayWrapper<T>;
  4264. /**
  4265. * @see _.unionBy
  4266. */
  4267. unionBy<T>(
  4268. arrays2: T[] | List<T>,
  4269. arrays3: T[] | List<T>,
  4270. arrays4: T[] | List<T>,
  4271. iteratee?: (value: T) => any
  4272. ): LoDashExplicitArrayWrapper<T>;
  4273. /**
  4274. * @see _.unionBy
  4275. */
  4276. unionBy<T, W extends Object>(
  4277. arrays2: T[] | List<T>,
  4278. arrays3: T[] | List<T>,
  4279. arrays4: T[] | List<T>,
  4280. iteratee?: W
  4281. ): LoDashExplicitArrayWrapper<T>;
  4282. /**
  4283. * @see _.unionBy
  4284. */
  4285. unionBy<T>(
  4286. arrays2: T[] | List<T>,
  4287. arrays3: T[] | List<T>,
  4288. arrays4: T[] | List<T>,
  4289. arrays5: T[] | List<T>,
  4290. iteratee?: (value: T) => any
  4291. ): LoDashExplicitArrayWrapper<T>;
  4292. /**
  4293. * @see _.unionBy
  4294. */
  4295. unionBy<T, W extends Object>(
  4296. arrays2: T[] | List<T>,
  4297. arrays3: T[] | List<T>,
  4298. arrays4: T[] | List<T>,
  4299. arrays5: T[] | List<T>,
  4300. iteratee?: W
  4301. ): LoDashExplicitArrayWrapper<T>;
  4302. /**
  4303. * @see _.unionBy
  4304. */
  4305. unionBy<T>(
  4306. ...iteratee: any[]
  4307. ): LoDashExplicitArrayWrapper<T>;
  4308. }
  4309. interface LoDashExplicitObjectWrapper<T> {
  4310. /**
  4311. * @see _.unionBy
  4312. */
  4313. unionBy<T>(
  4314. iteratee?: (value: T) => any
  4315. ): LoDashExplicitArrayWrapper<T>;
  4316. /**
  4317. * @see _.unionBy
  4318. */
  4319. unionBy<T, W extends Object>(
  4320. iteratee?: W
  4321. ): LoDashExplicitArrayWrapper<T>;
  4322. /**
  4323. * @see _.unionBy
  4324. */
  4325. unionBy<T>(
  4326. arrays2: T[] | List<T>,
  4327. iteratee?: (value: T) => any
  4328. ): LoDashExplicitArrayWrapper<T>;
  4329. /**
  4330. * @see _.unionBy
  4331. */
  4332. unionBy<T, W extends Object>(
  4333. arrays2: T[] | List<T>,
  4334. iteratee?: W
  4335. ): LoDashExplicitArrayWrapper<T>;
  4336. /**
  4337. * @see _.unionBy
  4338. */
  4339. unionBy<T>(
  4340. arrays2: T[] | List<T>,
  4341. arrays3: T[] | List<T>,
  4342. iteratee?: (value: T) => any
  4343. ): LoDashExplicitArrayWrapper<T>;
  4344. /**
  4345. * @see _.unionBy
  4346. */
  4347. unionBy<T, W extends Object>(
  4348. arrays2: T[] | List<T>,
  4349. arrays3: T[] | List<T>,
  4350. iteratee?: W
  4351. ): LoDashExplicitArrayWrapper<T>;
  4352. /**
  4353. * @see _.unionBy
  4354. */
  4355. unionBy<T>(
  4356. arrays2: T[] | List<T>,
  4357. arrays3: T[] | List<T>,
  4358. arrays4: T[] | List<T>,
  4359. iteratee?: (value: T) => any
  4360. ): LoDashExplicitArrayWrapper<T>;
  4361. /**
  4362. * @see _.unionBy
  4363. */
  4364. unionBy<T, W extends Object>(
  4365. arrays2: T[] | List<T>,
  4366. arrays3: T[] | List<T>,
  4367. arrays4: T[] | List<T>,
  4368. iteratee?: W
  4369. ): LoDashExplicitArrayWrapper<T>;
  4370. /**
  4371. * @see _.unionBy
  4372. */
  4373. unionBy<T>(
  4374. arrays2: T[] | List<T>,
  4375. arrays3: T[] | List<T>,
  4376. arrays4: T[] | List<T>,
  4377. arrays5: T[] | List<T>,
  4378. iteratee?: (value: T) => any
  4379. ): LoDashExplicitArrayWrapper<T>;
  4380. /**
  4381. * @see _.unionBy
  4382. */
  4383. unionBy<T, W extends Object>(
  4384. arrays2: T[] | List<T>,
  4385. arrays3: T[] | List<T>,
  4386. arrays4: T[] | List<T>,
  4387. arrays5: T[] | List<T>,
  4388. iteratee?: W
  4389. ): LoDashExplicitArrayWrapper<T>;
  4390. /**
  4391. * @see _.unionBy
  4392. */
  4393. unionBy<T>(
  4394. ...iteratee: any[]
  4395. ): LoDashExplicitArrayWrapper<T>;
  4396. }
  4397. // _.uniq
  4398. interface LoDashStatic {
  4399. /**
  4400. * Creates a duplicate-free version of an array, using
  4401. * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
  4402. * for equality comparisons, in which only the first occurrence of each element
  4403. * is kept.
  4404. *
  4405. * @static
  4406. * @memberOf _
  4407. * @category Array
  4408. * @param {Array} array The array to inspect.
  4409. * @returns {Array} Returns the new duplicate free array.
  4410. * @example
  4411. *
  4412. * _.uniq([2, 1, 2]);
  4413. * // => [2, 1]
  4414. */
  4415. uniq<T>(
  4416. array: List<T>
  4417. ): T[];
  4418. /**
  4419. * @see _.uniq
  4420. */
  4421. uniq<T, TSort>(
  4422. array: List<T>
  4423. ): T[];
  4424. }
  4425. interface LoDashImplicitWrapper<T> {
  4426. /**
  4427. * @see _.uniq
  4428. */
  4429. uniq<TSort>(): LoDashImplicitArrayWrapper<T>;
  4430. }
  4431. interface LoDashImplicitArrayWrapper<T> {
  4432. /**
  4433. * @see _.uniq
  4434. */
  4435. uniq<TSort>(): LoDashImplicitArrayWrapper<T>;
  4436. /**
  4437. * @see _.uniq
  4438. */
  4439. uniq(): LoDashImplicitArrayWrapper<T>;
  4440. }
  4441. interface LoDashImplicitObjectWrapper<T> {
  4442. uniq<T>(): LoDashImplicitArrayWrapper<T>;
  4443. /**
  4444. * @see _.uniq
  4445. */
  4446. uniq<T, TSort>(): LoDashImplicitArrayWrapper<T>;
  4447. }
  4448. interface LoDashExplicitWrapper<T> {
  4449. /**
  4450. * @see _.uniq
  4451. */
  4452. uniq<TSort>(): LoDashExplicitArrayWrapper<T>;
  4453. }
  4454. interface LoDashExplicitArrayWrapper<T> {
  4455. /**
  4456. * @see _.uniq
  4457. */
  4458. uniq<TSort>(): LoDashExplicitArrayWrapper<T>;
  4459. /**
  4460. * @see _.uniq
  4461. */
  4462. uniq(): LoDashExplicitArrayWrapper<T>;
  4463. }
  4464. interface LoDashExplicitObjectWrapper<T> {
  4465. /**
  4466. * @see _.uniq
  4467. */
  4468. uniq<T>(): LoDashExplicitArrayWrapper<T>;
  4469. /**
  4470. * @see _.uniq
  4471. */
  4472. uniq<T, TSort>(): LoDashExplicitArrayWrapper<T>;
  4473. }
  4474. // _.uniqBy
  4475. interface LoDashStatic {
  4476. /**
  4477. * This method is like `_.uniq` except that it accepts `iteratee` which is
  4478. * invoked for each element in `array` to generate the criterion by which
  4479. * uniqueness is computed. The iteratee is invoked with one argument: (value).
  4480. *
  4481. * @static
  4482. * @memberOf _
  4483. * @category Array
  4484. * @param {Array} array The array to inspect.
  4485. * @param {Function|Object|string} [iteratee=_.identity] The iteratee invoked per element.
  4486. * @returns {Array} Returns the new duplicate free array.
  4487. * @example
  4488. *
  4489. * _.uniqBy([2.1, 1.2, 2.3], Math.floor);
  4490. * // => [2.1, 1.2]
  4491. *
  4492. * // using the `_.property` iteratee shorthand
  4493. * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');
  4494. * // => [{ 'x': 1 }, { 'x': 2 }]
  4495. */
  4496. uniqBy<T>(
  4497. array: List<T>,
  4498. iteratee: ListIterator<T, any>
  4499. ): T[];
  4500. /**
  4501. * @see _.uniqBy
  4502. */
  4503. uniqBy<T, TSort>(
  4504. array: List<T>,
  4505. iteratee: ListIterator<T, TSort>
  4506. ): T[];
  4507. /**
  4508. * @see _.uniqBy
  4509. */
  4510. uniqBy<T>(
  4511. array: List<T>,
  4512. iteratee: string
  4513. ): T[];
  4514. /**
  4515. * @see _.uniqBy
  4516. */
  4517. uniqBy<T>(
  4518. array: List<T>,
  4519. iteratee: Object
  4520. ): T[];
  4521. /**
  4522. * @see _.uniqBy
  4523. */
  4524. uniqBy<TWhere extends {}, T>(
  4525. array: List<T>,
  4526. iteratee: TWhere
  4527. ): T[];
  4528. }
  4529. interface LoDashImplicitWrapper<T> {
  4530. /**
  4531. * @see _.uniqBy
  4532. */
  4533. uniqBy<TSort>(
  4534. iteratee: ListIterator<T, TSort>
  4535. ): LoDashImplicitArrayWrapper<T>;
  4536. }
  4537. interface LoDashImplicitArrayWrapper<T> {
  4538. /**
  4539. * @see _.uniqBy
  4540. */
  4541. uniqBy<TSort>(
  4542. iteratee: ListIterator<T, TSort>
  4543. ): LoDashImplicitArrayWrapper<T>;
  4544. /**
  4545. * @see _.uniqBy
  4546. */
  4547. uniqBy(
  4548. iteratee: string
  4549. ): LoDashImplicitArrayWrapper<T>;
  4550. /**
  4551. * @see _.uniqBy
  4552. */
  4553. uniqBy<TWhere extends {}>(
  4554. iteratee: TWhere
  4555. ): LoDashImplicitArrayWrapper<T>;
  4556. }
  4557. interface LoDashImplicitObjectWrapper<T> {
  4558. /**
  4559. * @see _.uniqBy
  4560. */
  4561. uniqBy<T>(
  4562. iteratee: ListIterator<T, any>
  4563. ): LoDashImplicitArrayWrapper<T>;
  4564. /**
  4565. * @see _.uniqBy
  4566. */
  4567. uniqBy<T, TSort>(
  4568. iteratee: ListIterator<T, TSort>
  4569. ): LoDashImplicitArrayWrapper<T>;
  4570. /**
  4571. * @see _.uniqBy
  4572. */
  4573. uniqBy<T>(
  4574. iteratee: string
  4575. ): LoDashImplicitArrayWrapper<T>;
  4576. /**
  4577. * @see _.uniqBy
  4578. */
  4579. uniqBy<T>(
  4580. iteratee: Object
  4581. ): LoDashImplicitArrayWrapper<T>;
  4582. /**
  4583. * @see _.uniqBy
  4584. */
  4585. uniqBy<TWhere extends {}, T>(
  4586. iteratee: TWhere
  4587. ): LoDashImplicitArrayWrapper<T>;
  4588. }
  4589. interface LoDashExplicitWrapper<T> {
  4590. /**
  4591. * @see _.uniqBy
  4592. */
  4593. uniqBy<TSort>(
  4594. iteratee: ListIterator<T, TSort>
  4595. ): LoDashExplicitArrayWrapper<T>;
  4596. }
  4597. interface LoDashExplicitArrayWrapper<T> {
  4598. /**
  4599. * @see _.uniqBy
  4600. */
  4601. uniqBy<TSort>(
  4602. iteratee: ListIterator<T, TSort>
  4603. ): LoDashExplicitArrayWrapper<T>;
  4604. /**
  4605. * @see _.uniqBy
  4606. */
  4607. uniqBy(
  4608. iteratee: string
  4609. ): LoDashExplicitArrayWrapper<T>;
  4610. /**
  4611. * @see _.uniqBy
  4612. */
  4613. uniqBy<TWhere extends {}>(
  4614. iteratee: TWhere
  4615. ): LoDashExplicitArrayWrapper<T>;
  4616. }
  4617. interface LoDashExplicitObjectWrapper<T> {
  4618. /**
  4619. * @see _.uniqBy
  4620. */
  4621. uniqBy<T>(
  4622. iteratee: ListIterator<T, any>
  4623. ): LoDashExplicitArrayWrapper<T>;
  4624. /**
  4625. * @see _.uniqBy
  4626. */
  4627. uniqBy<T, TSort>(
  4628. iteratee: ListIterator<T, TSort>
  4629. ): LoDashExplicitArrayWrapper<T>;
  4630. /**
  4631. * @see _.uniqBy
  4632. */
  4633. uniqBy<T>(
  4634. iteratee: string
  4635. ): LoDashExplicitArrayWrapper<T>;
  4636. /**
  4637. * @see _.uniqBy
  4638. */
  4639. uniqBy<T>(
  4640. iteratee: Object
  4641. ): LoDashExplicitArrayWrapper<T>;
  4642. /**
  4643. * @see _.uniqBy
  4644. */
  4645. uniqBy<TWhere extends {}, T>(
  4646. iteratee: TWhere
  4647. ): LoDashExplicitArrayWrapper<T>;
  4648. }
  4649. // _.sortedUniq
  4650. interface LoDashStatic {
  4651. /**
  4652. * This method is like `_.uniq` except that it's designed and optimized
  4653. * for sorted arrays.
  4654. *
  4655. * @static
  4656. * @memberOf _
  4657. * @category Array
  4658. * @param {Array} array The array to inspect.
  4659. * @returns {Array} Returns the new duplicate free array.
  4660. * @example
  4661. *
  4662. * _.sortedUniq([1, 1, 2]);
  4663. * // => [1, 2]
  4664. */
  4665. sortedUniq<T>(
  4666. array: List<T>
  4667. ): T[];
  4668. /**
  4669. * @see _.sortedUniq
  4670. */
  4671. sortedUniq<T, TSort>(
  4672. array: List<T>
  4673. ): T[];
  4674. }
  4675. interface LoDashImplicitWrapper<T> {
  4676. /**
  4677. * @see _.sortedUniq
  4678. */
  4679. sortedUniq<TSort>(): LoDashImplicitArrayWrapper<T>;
  4680. }
  4681. interface LoDashImplicitArrayWrapper<T> {
  4682. /**
  4683. * @see _.sortedUniq
  4684. */
  4685. sortedUniq<TSort>(): LoDashImplicitArrayWrapper<T>;
  4686. /**
  4687. * @see _.sortedUniq
  4688. */
  4689. sortedUniq(): LoDashImplicitArrayWrapper<T>;
  4690. }
  4691. interface LoDashImplicitObjectWrapper<T> {
  4692. sortedUniq<T>(): LoDashImplicitArrayWrapper<T>;
  4693. /**
  4694. * @see _.sortedUniq
  4695. */
  4696. sortedUniq<T, TSort>(): LoDashImplicitArrayWrapper<T>;
  4697. }
  4698. interface LoDashExplicitWrapper<T> {
  4699. /**
  4700. * @see _.sortedUniq
  4701. */
  4702. sortedUniq<TSort>(): LoDashExplicitArrayWrapper<T>;
  4703. }
  4704. interface LoDashExplicitArrayWrapper<T> {
  4705. /**
  4706. * @see _.sortedUniq
  4707. */
  4708. sortedUniq<TSort>(): LoDashExplicitArrayWrapper<T>;
  4709. /**
  4710. * @see _.sortedUniq
  4711. */
  4712. sortedUniq(): LoDashExplicitArrayWrapper<T>;
  4713. }
  4714. interface LoDashExplicitObjectWrapper<T> {
  4715. /**
  4716. * @see _.sortedUniq
  4717. */
  4718. sortedUniq<T>(): LoDashExplicitArrayWrapper<T>;
  4719. /**
  4720. * @see _.sortedUniq
  4721. */
  4722. sortedUniq<T, TSort>(): LoDashExplicitArrayWrapper<T>;
  4723. }
  4724. // _.sortedUniqBy
  4725. interface LoDashStatic {
  4726. /**
  4727. * This method is like `_.uniqBy` except that it's designed and optimized
  4728. * for sorted arrays.
  4729. *
  4730. * @static
  4731. * @memberOf _
  4732. * @category Array
  4733. * @param {Array} array The array to inspect.
  4734. * @param {Function} [iteratee] The iteratee invoked per element.
  4735. * @returns {Array} Returns the new duplicate free array.
  4736. * @example
  4737. *
  4738. * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor);
  4739. * // => [1.1, 2.2]
  4740. */
  4741. sortedUniqBy<T>(
  4742. array: List<T>,
  4743. iteratee: ListIterator<T, any>
  4744. ): T[];
  4745. /**
  4746. * @see _.sortedUniqBy
  4747. */
  4748. sortedUniqBy<T, TSort>(
  4749. array: List<T>,
  4750. iteratee: ListIterator<T, TSort>
  4751. ): T[];
  4752. /**
  4753. * @see _.sortedUniqBy
  4754. */
  4755. sortedUniqBy<T>(
  4756. array: List<T>,
  4757. iteratee: string
  4758. ): T[];
  4759. /**
  4760. * @see _.sortedUniqBy
  4761. */
  4762. sortedUniqBy<T>(
  4763. array: List<T>,
  4764. iteratee: Object
  4765. ): T[];
  4766. /**
  4767. * @see _.sortedUniqBy
  4768. */
  4769. sortedUniqBy<TWhere extends {}, T>(
  4770. array: List<T>,
  4771. iteratee: TWhere
  4772. ): T[];
  4773. }
  4774. interface LoDashImplicitWrapper<T> {
  4775. /**
  4776. * @see _.sortedUniqBy
  4777. */
  4778. sortedUniqBy<TSort>(
  4779. iteratee: ListIterator<T, TSort>
  4780. ): LoDashImplicitArrayWrapper<T>;
  4781. }
  4782. interface LoDashImplicitArrayWrapper<T> {
  4783. /**
  4784. * @see _.sortedUniqBy
  4785. */
  4786. sortedUniqBy<TSort>(
  4787. iteratee: ListIterator<T, TSort>
  4788. ): LoDashImplicitArrayWrapper<T>;
  4789. /**
  4790. * @see _.sortedUniqBy
  4791. */
  4792. sortedUniqBy(
  4793. iteratee: string
  4794. ): LoDashImplicitArrayWrapper<T>;
  4795. /**
  4796. * @see _.sortedUniqBy
  4797. */
  4798. sortedUniqBy<TWhere extends {}>(
  4799. iteratee: TWhere
  4800. ): LoDashImplicitArrayWrapper<T>;
  4801. }
  4802. interface LoDashImplicitObjectWrapper<T> {
  4803. /**
  4804. * @see _.sortedUniqBy
  4805. */
  4806. sortedUniqBy<T>(
  4807. iteratee: ListIterator<T, any>
  4808. ): LoDashImplicitArrayWrapper<T>;
  4809. /**
  4810. * @see _.sortedUniqBy
  4811. */
  4812. sortedUniqBy<T, TSort>(
  4813. iteratee: ListIterator<T, TSort>
  4814. ): LoDashImplicitArrayWrapper<T>;
  4815. /**
  4816. * @see _.sortedUniqBy
  4817. */
  4818. sortedUniqBy<T>(
  4819. iteratee: string
  4820. ): LoDashImplicitArrayWrapper<T>;
  4821. /**
  4822. * @see _.sortedUniqBy
  4823. */
  4824. sortedUniqBy<T>(
  4825. iteratee: Object
  4826. ): LoDashImplicitArrayWrapper<T>;
  4827. /**
  4828. * @see _.sortedUniqBy
  4829. */
  4830. sortedUniqBy<TWhere extends {}, T>(
  4831. iteratee: TWhere
  4832. ): LoDashImplicitArrayWrapper<T>;
  4833. }
  4834. interface LoDashExplicitWrapper<T> {
  4835. /**
  4836. * @see _.sortedUniqBy
  4837. */
  4838. sortedUniqBy<TSort>(
  4839. iteratee: ListIterator<T, TSort>
  4840. ): LoDashExplicitArrayWrapper<T>;
  4841. }
  4842. interface LoDashExplicitArrayWrapper<T> {
  4843. /**
  4844. * @see _.sortedUniqBy
  4845. */
  4846. sortedUniqBy<TSort>(
  4847. iteratee: ListIterator<T, TSort>
  4848. ): LoDashExplicitArrayWrapper<T>;
  4849. /**
  4850. * @see _.sortedUniqBy
  4851. */
  4852. sortedUniqBy(
  4853. iteratee: string
  4854. ): LoDashExplicitArrayWrapper<T>;
  4855. /**
  4856. * @see _.sortedUniqBy
  4857. */
  4858. sortedUniqBy<TWhere extends {}>(
  4859. iteratee: TWhere
  4860. ): LoDashExplicitArrayWrapper<T>;
  4861. }
  4862. interface LoDashExplicitObjectWrapper<T> {
  4863. /**
  4864. * @see _.sortedUniqBy
  4865. */
  4866. sortedUniqBy<T>(
  4867. iteratee: ListIterator<T, any>
  4868. ): LoDashExplicitArrayWrapper<T>;
  4869. /**
  4870. * @see _.sortedUniqBy
  4871. */
  4872. sortedUniqBy<T, TSort>(
  4873. iteratee: ListIterator<T, TSort>
  4874. ): LoDashExplicitArrayWrapper<T>;
  4875. /**
  4876. * @see _.sortedUniqBy
  4877. */
  4878. sortedUniqBy<T>(
  4879. iteratee: string
  4880. ): LoDashExplicitArrayWrapper<T>;
  4881. /**
  4882. * @see _.sortedUniqBy
  4883. */
  4884. sortedUniqBy<T>(
  4885. iteratee: Object
  4886. ): LoDashExplicitArrayWrapper<T>;
  4887. /**
  4888. * @see _.sortedUniqBy
  4889. */
  4890. sortedUniqBy<TWhere extends {}, T>(
  4891. iteratee: TWhere
  4892. ): LoDashExplicitArrayWrapper<T>;
  4893. }
  4894. // _.unionWith DUMMY
  4895. interface LoDashStatic {
  4896. /**
  4897. * This method is like `_.union` except that it accepts `comparator` which
  4898. * is invoked to compare elements of `arrays`. The comparator is invoked
  4899. * with two arguments: (arrVal, othVal).
  4900. *
  4901. * @static
  4902. * @memberOf _
  4903. * @category Array
  4904. * @param {...Array} [arrays] The arrays to inspect.
  4905. * @param {Function} [comparator] The comparator invoked per element.
  4906. * @returns {Array} Returns the new array of combined values.
  4907. * @example
  4908. *
  4909. * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
  4910. * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
  4911. *
  4912. * _.unionWith(objects, others, _.isEqual);
  4913. * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]
  4914. */
  4915. unionWith(
  4916. array: any[] | List<any>,
  4917. ...values: any[]
  4918. ): any[];
  4919. }
  4920. // _.uniqWith DUMMY
  4921. interface LoDashStatic {
  4922. /**
  4923. * This method is like `_.uniq` except that it accepts `comparator` which
  4924. * is invoked to compare elements of `array`. The comparator is invoked with
  4925. * two arguments: (arrVal, othVal).
  4926. *
  4927. * @static
  4928. * @memberOf _
  4929. * @category Array
  4930. * @param {Array} array The array to inspect.
  4931. * @param {Function} [comparator] The comparator invoked per element.
  4932. * @returns {Array} Returns the new duplicate free array.
  4933. * @example
  4934. *
  4935. * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }];
  4936. *
  4937. * _.uniqWith(objects, _.isEqual);
  4938. * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]
  4939. */
  4940. uniqWith(
  4941. array: any[] | List<any>,
  4942. ...values: any[]
  4943. ): any[];
  4944. }
  4945. // _.unzip
  4946. interface LoDashStatic {
  4947. /**
  4948. * This method is like _.zip except that it accepts an array of grouped elements and creates an array
  4949. * regrouping the elements to their pre-zip configuration.
  4950. *
  4951. * @param array The array of grouped elements to process.
  4952. * @return Returns the new array of regrouped elements.
  4953. */
  4954. unzip<T>(array: List<List<T>>): T[][];
  4955. }
  4956. interface LoDashImplicitArrayWrapper<T> {
  4957. /**
  4958. * @see _.unzip
  4959. */
  4960. unzip<T>(): LoDashImplicitArrayWrapper<T[]>;
  4961. }
  4962. interface LoDashImplicitObjectWrapper<T> {
  4963. /**
  4964. * @see _.unzip
  4965. */
  4966. unzip<T>(): LoDashImplicitArrayWrapper<T[]>;
  4967. }
  4968. interface LoDashExplicitArrayWrapper<T> {
  4969. /**
  4970. * @see _.unzip
  4971. */
  4972. unzip<T>(): LoDashExplicitArrayWrapper<T[]>;
  4973. }
  4974. interface LoDashExplicitObjectWrapper<T> {
  4975. /**
  4976. * @see _.unzip
  4977. */
  4978. unzip<T>(): LoDashExplicitArrayWrapper<T[]>;
  4979. }
  4980. // _.unzipWith
  4981. interface LoDashStatic {
  4982. /**
  4983. * This method is like _.unzip except that it accepts an iteratee to specify how regrouped values should be
  4984. * combined. The iteratee is bound to thisArg and invoked with four arguments: (accumulator, value, index,
  4985. * group).
  4986. *
  4987. * @param array The array of grouped elements to process.
  4988. * @param iteratee The function to combine regrouped values.
  4989. * @param thisArg The this binding of iteratee.
  4990. * @return Returns the new array of regrouped elements.
  4991. */
  4992. unzipWith<TArray, TResult>(
  4993. array: List<List<TArray>>,
  4994. iteratee?: MemoIterator<TArray, TResult>,
  4995. thisArg?: any
  4996. ): TResult[];
  4997. }
  4998. interface LoDashImplicitArrayWrapper<T> {
  4999. /**
  5000. * @see _.unzipWith
  5001. */
  5002. unzipWith<TArr, TResult>(
  5003. iteratee?: MemoIterator<TArr, TResult>,
  5004. thisArg?: any
  5005. ): LoDashImplicitArrayWrapper<TResult>;
  5006. }
  5007. interface LoDashImplicitObjectWrapper<T> {
  5008. /**
  5009. * @see _.unzipWith
  5010. */
  5011. unzipWith<TArr, TResult>(
  5012. iteratee?: MemoIterator<TArr, TResult>,
  5013. thisArg?: any
  5014. ): LoDashImplicitArrayWrapper<TResult>;
  5015. }
  5016. // _.without
  5017. interface LoDashStatic {
  5018. /**
  5019. * Creates an array excluding all provided values using SameValueZero for equality comparisons.
  5020. *
  5021. * @param array The array to filter.
  5022. * @param values The values to exclude.
  5023. * @return Returns the new array of filtered values.
  5024. */
  5025. without<T>(
  5026. array: List<T>,
  5027. ...values: T[]
  5028. ): T[];
  5029. }
  5030. interface LoDashImplicitArrayWrapper<T> {
  5031. /**
  5032. * @see _.without
  5033. */
  5034. without(...values: T[]): LoDashImplicitArrayWrapper<T>;
  5035. }
  5036. interface LoDashImplicitObjectWrapper<T> {
  5037. /**
  5038. * @see _.without
  5039. */
  5040. without<T>(...values: T[]): LoDashImplicitArrayWrapper<T>;
  5041. }
  5042. interface LoDashExplicitArrayWrapper<T> {
  5043. /**
  5044. * @see _.without
  5045. */
  5046. without(...values: T[]): LoDashExplicitArrayWrapper<T>;
  5047. }
  5048. interface LoDashExplicitObjectWrapper<T> {
  5049. /**
  5050. * @see _.without
  5051. */
  5052. without<T>(...values: T[]): LoDashExplicitArrayWrapper<T>;
  5053. }
  5054. // _.xor
  5055. interface LoDashStatic {
  5056. /**
  5057. * Creates an array of unique values that is the symmetric difference of the provided arrays.
  5058. *
  5059. * @param arrays The arrays to inspect.
  5060. * @return Returns the new array of values.
  5061. */
  5062. xor<T>(...arrays: List<T>[]): T[];
  5063. }
  5064. interface LoDashImplicitArrayWrapper<T> {
  5065. /**
  5066. * @see _.xor
  5067. */
  5068. xor(...arrays: List<T>[]): LoDashImplicitArrayWrapper<T>;
  5069. }
  5070. interface LoDashImplicitObjectWrapper<T> {
  5071. /**
  5072. * @see _.xor
  5073. */
  5074. xor<T>(...arrays: List<T>[]): LoDashImplicitArrayWrapper<T>;
  5075. }
  5076. interface LoDashExplicitArrayWrapper<T> {
  5077. /**
  5078. * @see _.xor
  5079. */
  5080. xor(...arrays: List<T>[]): LoDashExplicitArrayWrapper<T>;
  5081. }
  5082. interface LoDashExplicitObjectWrapper<T> {
  5083. /**
  5084. * @see _.xor
  5085. */
  5086. xor<T>(...arrays: List<T>[]): LoDashExplicitArrayWrapper<T>;
  5087. }
  5088. // _.xorBy DUMMY
  5089. interface LoDashStatic {
  5090. /**
  5091. * This method is like `_.xor` except that it accepts `iteratee` which is
  5092. * invoked for each element of each `arrays` to generate the criterion by which
  5093. * uniqueness is computed. The iteratee is invoked with one argument: (value).
  5094. *
  5095. * @static
  5096. * @memberOf _
  5097. * @category Array
  5098. * @param {...Array} [arrays] The arrays to inspect.
  5099. * @param {Function|Object|string} [iteratee=_.identity] The iteratee invoked per element.
  5100. * @returns {Array} Returns the new array of values.
  5101. * @example
  5102. *
  5103. * _.xorBy([2.1, 1.2], [4.3, 2.4], Math.floor);
  5104. * // => [1.2, 4.3]
  5105. *
  5106. * // using the `_.property` iteratee shorthand
  5107. * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
  5108. * // => [{ 'x': 2 }]
  5109. */
  5110. xorBy(
  5111. array: any[] | List<any>,
  5112. ...values: any[]
  5113. ): any[];
  5114. }
  5115. // _.xorWith DUMMY
  5116. interface LoDashStatic {
  5117. /**
  5118. * This method is like `_.xor` except that it accepts `comparator` which is
  5119. * invoked to compare elements of `arrays`. The comparator is invoked with
  5120. * two arguments: (arrVal, othVal).
  5121. *
  5122. * @static
  5123. * @memberOf _
  5124. * @category Array
  5125. * @param {...Array} [arrays] The arrays to inspect.
  5126. * @param {Function} [comparator] The comparator invoked per element.
  5127. * @returns {Array} Returns the new array of values.
  5128. * @example
  5129. *
  5130. * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
  5131. * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
  5132. *
  5133. * _.xorWith(objects, others, _.isEqual);
  5134. * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]
  5135. */
  5136. xorWith(
  5137. array: any[] | List<any>,
  5138. ...values: any[]
  5139. ): any[];
  5140. }
  5141. // _.zip
  5142. interface LoDashStatic {
  5143. /**
  5144. * Creates an array of grouped elements, the first of which contains the first elements of the given arrays,
  5145. * the second of which contains the second elements of the given arrays, and so on.
  5146. *
  5147. * @param arrays The arrays to process.
  5148. * @return Returns the new array of grouped elements.
  5149. */
  5150. zip<T>(...arrays: List<T>[]): T[][];
  5151. }
  5152. interface LoDashImplicitArrayWrapper<T> {
  5153. /**
  5154. * @see _.zip
  5155. */
  5156. zip<T>(...arrays: List<T>[]): _.LoDashImplicitArrayWrapper<T[]>;
  5157. }
  5158. interface LoDashImplicitObjectWrapper<T> {
  5159. /**
  5160. * @see _.zip
  5161. */
  5162. zip<T>(...arrays: List<T>[]): _.LoDashImplicitArrayWrapper<T[]>;
  5163. }
  5164. interface LoDashExplicitArrayWrapper<T> {
  5165. /**
  5166. * @see _.zip
  5167. */
  5168. zip<T>(...arrays: List<T>[]): _.LoDashExplicitArrayWrapper<T[]>;
  5169. }
  5170. interface LoDashExplicitObjectWrapper<T> {
  5171. /**
  5172. * @see _.zip
  5173. */
  5174. zip<T>(...arrays: List<T>[]): _.LoDashExplicitArrayWrapper<T[]>;
  5175. }
  5176. // _.zipObject
  5177. interface LoDashStatic {
  5178. /**
  5179. * The inverse of _.pairs; this method returns an object composed from arrays of property names and values.
  5180. * Provide either a single two dimensional array, e.g. [[key1, value1], [key2, value2]] or two arrays, one of
  5181. * property names and one of corresponding values.
  5182. *
  5183. * @param props The property names.
  5184. * @param values The property values.
  5185. * @return Returns the new object.
  5186. */
  5187. zipObject<TValues, TResult extends {}>(
  5188. props: List<StringRepresentable> | List<List<any>>,
  5189. values?: List<TValues>
  5190. ): TResult;
  5191. /**
  5192. * @see _.zipObject
  5193. */
  5194. zipObject<TResult extends {}>(
  5195. props: List<StringRepresentable> | List<List<any>>,
  5196. values?: List<any>
  5197. ): TResult;
  5198. /**
  5199. * @see _.zipObject
  5200. */
  5201. zipObject(
  5202. props: List<StringRepresentable> | List<List<any>>,
  5203. values?: List<any>
  5204. ): _.Dictionary<any>;
  5205. }
  5206. interface LoDashImplicitArrayWrapper<T> {
  5207. /**
  5208. * @see _.zipObject
  5209. */
  5210. zipObject<TValues, TResult extends {}>(
  5211. values?: List<TValues>
  5212. ): _.LoDashImplicitObjectWrapper<TResult>;
  5213. /**
  5214. * @see _.zipObject
  5215. */
  5216. zipObject<TResult extends {}>(
  5217. values?: List<any>
  5218. ): _.LoDashImplicitObjectWrapper<TResult>;
  5219. /**
  5220. * @see _.zipObject
  5221. */
  5222. zipObject(
  5223. values?: List<any>
  5224. ): _.LoDashImplicitObjectWrapper<_.Dictionary<any>>;
  5225. }
  5226. interface LoDashImplicitObjectWrapper<T> {
  5227. /**
  5228. * @see _.zipObject
  5229. */
  5230. zipObject<TValues, TResult extends {}>(
  5231. values?: List<TValues>
  5232. ): _.LoDashImplicitObjectWrapper<TResult>;
  5233. /**
  5234. * @see _.zipObject
  5235. */
  5236. zipObject<TResult extends {}>(
  5237. values?: List<any>
  5238. ): _.LoDashImplicitObjectWrapper<TResult>;
  5239. /**
  5240. * @see _.zipObject
  5241. */
  5242. zipObject(
  5243. values?: List<any>
  5244. ): _.LoDashImplicitObjectWrapper<_.Dictionary<any>>;
  5245. }
  5246. interface LoDashExplicitArrayWrapper<T> {
  5247. /**
  5248. * @see _.zipObject
  5249. */
  5250. zipObject<TValues, TResult extends {}>(
  5251. values?: List<TValues>
  5252. ): _.LoDashExplicitObjectWrapper<TResult>;
  5253. /**
  5254. * @see _.zipObject
  5255. */
  5256. zipObject<TResult extends {}>(
  5257. values?: List<any>
  5258. ): _.LoDashExplicitObjectWrapper<TResult>;
  5259. /**
  5260. * @see _.zipObject
  5261. */
  5262. zipObject(
  5263. values?: List<any>
  5264. ): _.LoDashExplicitObjectWrapper<_.Dictionary<any>>;
  5265. }
  5266. interface LoDashExplicitObjectWrapper<T> {
  5267. /**
  5268. * @see _.zipObject
  5269. */
  5270. zipObject<TValues, TResult extends {}>(
  5271. values?: List<TValues>
  5272. ): _.LoDashExplicitObjectWrapper<TResult>;
  5273. /**
  5274. * @see _.zipObject
  5275. */
  5276. zipObject<TResult extends {}>(
  5277. values?: List<any>
  5278. ): _.LoDashExplicitObjectWrapper<TResult>;
  5279. /**
  5280. * @see _.zipObject
  5281. */
  5282. zipObject(
  5283. values?: List<any>
  5284. ): _.LoDashExplicitObjectWrapper<_.Dictionary<any>>;
  5285. }
  5286. // _.zipWith
  5287. interface LoDashStatic {
  5288. /**
  5289. * This method is like _.zip except that it accepts an iteratee to specify how grouped values should be
  5290. * combined. The iteratee is bound to thisArg and invoked with four arguments: (accumulator, value, index,
  5291. * group).
  5292. * @param {...Array} [arrays] The arrays to process.
  5293. * @param {Function} [iteratee] The function to combine grouped values.
  5294. * @param {*} [thisArg] The `this` binding of `iteratee`.
  5295. * @return Returns the new array of grouped elements.
  5296. */
  5297. zipWith<TResult>(...args: any[]): TResult[];
  5298. }
  5299. interface LoDashImplicitArrayWrapper<T> {
  5300. /**
  5301. * @see _.zipWith
  5302. */
  5303. zipWith<TResult>(...args: any[]): LoDashImplicitArrayWrapper<TResult>;
  5304. }
  5305. /*********
  5306. * Chain *
  5307. ********/
  5308. // _.chain
  5309. interface LoDashStatic {
  5310. /**
  5311. * Creates a lodash object that wraps value with explicit method chaining enabled.
  5312. *
  5313. * @param value The value to wrap.
  5314. * @return Returns the new lodash wrapper instance.
  5315. */
  5316. chain(value: number): LoDashExplicitWrapper<number>;
  5317. chain(value: string): LoDashExplicitWrapper<string>;
  5318. chain(value: boolean): LoDashExplicitWrapper<boolean>;
  5319. chain<T>(value: T[]): LoDashExplicitArrayWrapper<T>;
  5320. chain<T extends {}>(value: T): LoDashExplicitObjectWrapper<T>;
  5321. chain(value: any): LoDashExplicitWrapper<any>;
  5322. }
  5323. interface LoDashImplicitWrapper<T> {
  5324. /**
  5325. * @see _.chain
  5326. */
  5327. chain(): LoDashExplicitWrapper<T>;
  5328. }
  5329. interface LoDashImplicitArrayWrapper<T> {
  5330. /**
  5331. * @see _.chain
  5332. */
  5333. chain(): LoDashExplicitArrayWrapper<T>;
  5334. }
  5335. interface LoDashImplicitObjectWrapper<T> {
  5336. /**
  5337. * @see _.chain
  5338. */
  5339. chain(): LoDashExplicitObjectWrapper<T>;
  5340. }
  5341. interface LoDashExplicitWrapperBase<T, TWrapper> {
  5342. /**
  5343. * @see _.chain
  5344. */
  5345. chain(): TWrapper;
  5346. }
  5347. // _.tap
  5348. interface LoDashStatic {
  5349. /**
  5350. * This method invokes interceptor and returns value. The interceptor is bound to thisArg and invoked with one
  5351. * argument; (value). The purpose of this method is to "tap into" a method chain in order to perform operations
  5352. * on intermediate results within the chain.
  5353. *
  5354. * @param value The value to provide to interceptor.
  5355. * @param interceptor The function to invoke.
  5356. * @parem thisArg The this binding of interceptor.
  5357. * @return Returns value.
  5358. */
  5359. tap<T>(
  5360. value: T,
  5361. interceptor: (value: T) => void,
  5362. thisArg?: any
  5363. ): T;
  5364. }
  5365. interface LoDashImplicitWrapperBase<T, TWrapper> {
  5366. /**
  5367. * @see _.tap
  5368. */
  5369. tap(
  5370. interceptor: (value: T) => void,
  5371. thisArg?: any
  5372. ): TWrapper;
  5373. }
  5374. interface LoDashExplicitWrapperBase<T, TWrapper> {
  5375. /**
  5376. * @see _.tap
  5377. */
  5378. tap(
  5379. interceptor: (value: T) => void,
  5380. thisArg?: any
  5381. ): TWrapper;
  5382. }
  5383. // _.thru
  5384. interface LoDashStatic {
  5385. /**
  5386. * This method is like _.tap except that it returns the result of interceptor.
  5387. *
  5388. * @param value The value to provide to interceptor.
  5389. * @param interceptor The function to invoke.
  5390. * @param thisArg The this binding of interceptor.
  5391. * @return Returns the result of interceptor.
  5392. */
  5393. thru<T, TResult>(
  5394. value: T,
  5395. interceptor: (value: T) => TResult,
  5396. thisArg?: any
  5397. ): TResult;
  5398. }
  5399. interface LoDashImplicitWrapperBase<T, TWrapper> {
  5400. /**
  5401. * @see _.thru
  5402. */
  5403. thru<TResult extends number>(
  5404. interceptor: (value: T) => TResult,
  5405. thisArg?: any): LoDashImplicitWrapper<TResult>;
  5406. /**
  5407. * @see _.thru
  5408. */
  5409. thru<TResult extends string>(
  5410. interceptor: (value: T) => TResult,
  5411. thisArg?: any): LoDashImplicitWrapper<TResult>;
  5412. /**
  5413. * @see _.thru
  5414. */
  5415. thru<TResult extends boolean>(
  5416. interceptor: (value: T) => TResult,
  5417. thisArg?: any): LoDashImplicitWrapper<TResult>;
  5418. /**
  5419. * @see _.thru
  5420. */
  5421. thru<TResult extends {}>(
  5422. interceptor: (value: T) => TResult,
  5423. thisArg?: any): LoDashImplicitObjectWrapper<TResult>;
  5424. /**
  5425. * @see _.thru
  5426. */
  5427. thru<TResult>(
  5428. interceptor: (value: T) => TResult[],
  5429. thisArg?: any): LoDashImplicitArrayWrapper<TResult>;
  5430. }
  5431. interface LoDashExplicitWrapperBase<T, TWrapper> {
  5432. /**
  5433. * @see _.thru
  5434. */
  5435. thru<TResult extends number>(
  5436. interceptor: (value: T) => TResult,
  5437. thisArg?: any
  5438. ): LoDashExplicitWrapper<TResult>;
  5439. /**
  5440. * @see _.thru
  5441. */
  5442. thru<TResult extends string>(
  5443. interceptor: (value: T) => TResult,
  5444. thisArg?: any
  5445. ): LoDashExplicitWrapper<TResult>;
  5446. /**
  5447. * @see _.thru
  5448. */
  5449. thru<TResult extends boolean>(
  5450. interceptor: (value: T) => TResult,
  5451. thisArg?: any
  5452. ): LoDashExplicitWrapper<TResult>;
  5453. /**
  5454. * @see _.thru
  5455. */
  5456. thru<TResult extends {}>(
  5457. interceptor: (value: T) => TResult,
  5458. thisArg?: any
  5459. ): LoDashExplicitObjectWrapper<TResult>;
  5460. /**
  5461. * @see _.thru
  5462. */
  5463. thru<TResult>(
  5464. interceptor: (value: T) => TResult[],
  5465. thisArg?: any
  5466. ): LoDashExplicitArrayWrapper<TResult>;
  5467. }
  5468. // _.prototype.commit
  5469. interface LoDashImplicitWrapperBase<T, TWrapper> {
  5470. /**
  5471. * Executes the chained sequence and returns the wrapped result.
  5472. *
  5473. * @return Returns the new lodash wrapper instance.
  5474. */
  5475. commit(): TWrapper;
  5476. }
  5477. interface LoDashExplicitWrapperBase<T, TWrapper> {
  5478. /**
  5479. * @see _.commit
  5480. */
  5481. commit(): TWrapper;
  5482. }
  5483. // _.prototype.concat
  5484. interface LoDashImplicitWrapperBase<T, TWrapper> {
  5485. /**
  5486. * Creates a new array joining a wrapped array with any additional arrays and/or values.
  5487. *
  5488. * @param items
  5489. * @return Returns the new concatenated array.
  5490. */
  5491. concat<TItem>(...items: Array<TItem | Array<TItem>>): LoDashImplicitArrayWrapper<TItem>;
  5492. /**
  5493. * @see _.concat
  5494. */
  5495. concat(...items: Array<T | Array<T>>): LoDashImplicitArrayWrapper<T>;
  5496. }
  5497. interface LoDashExplicitWrapperBase<T, TWrapper> {
  5498. /**
  5499. * @see _.concat
  5500. */
  5501. concat<TItem>(...items: Array<TItem | Array<TItem>>): LoDashExplicitArrayWrapper<TItem>;
  5502. /**
  5503. * @see _.concat
  5504. */
  5505. concat(...items: Array<T | Array<T>>): LoDashExplicitArrayWrapper<T>;
  5506. }
  5507. // _.prototype.plant
  5508. interface LoDashImplicitWrapperBase<T, TWrapper> {
  5509. /**
  5510. * Creates a clone of the chained sequence planting value as the wrapped value.
  5511. * @param value The value to plant as the wrapped value.
  5512. * @return Returns the new lodash wrapper instance.
  5513. */
  5514. plant(value: number): LoDashImplicitWrapper<number>;
  5515. /**
  5516. * @see _.plant
  5517. */
  5518. plant(value: string): LoDashImplicitStringWrapper;
  5519. /**
  5520. * @see _.plant
  5521. */
  5522. plant(value: boolean): LoDashImplicitWrapper<boolean>;
  5523. /**
  5524. * @see _.plant
  5525. */
  5526. plant(value: number[]): LoDashImplicitNumberArrayWrapper;
  5527. /**
  5528. * @see _.plant
  5529. */
  5530. plant<T>(value: T[]): LoDashImplicitArrayWrapper<T>;
  5531. /**
  5532. * @see _.plant
  5533. */
  5534. plant<T extends {}>(value: T): LoDashImplicitObjectWrapper<T>;
  5535. /**
  5536. * @see _.plant
  5537. */
  5538. plant(value: any): LoDashImplicitWrapper<any>;
  5539. }
  5540. interface LoDashExplicitWrapperBase<T, TWrapper> {
  5541. /**
  5542. * @see _.plant
  5543. */
  5544. plant(value: number): LoDashExplicitWrapper<number>;
  5545. /**
  5546. * @see _.plant
  5547. */
  5548. plant(value: string): LoDashExplicitStringWrapper;
  5549. /**
  5550. * @see _.plant
  5551. */
  5552. plant(value: boolean): LoDashExplicitWrapper<boolean>;
  5553. /**
  5554. * @see _.plant
  5555. */
  5556. plant(value: number[]): LoDashExplicitNumberArrayWrapper;
  5557. /**
  5558. * @see _.plant
  5559. */
  5560. plant<T>(value: T[]): LoDashExplicitArrayWrapper<T>;
  5561. /**
  5562. * @see _.plant
  5563. */
  5564. plant<T extends {}>(value: T): LoDashExplicitObjectWrapper<T>;
  5565. /**
  5566. * @see _.plant
  5567. */
  5568. plant(value: any): LoDashExplicitWrapper<any>;
  5569. }
  5570. // _.prototype.reverse
  5571. interface LoDashImplicitArrayWrapper<T> {
  5572. /**
  5573. * Reverses the wrapped array so the first element becomes the last, the second element becomes the second to
  5574. * last, and so on.
  5575. *
  5576. * Note: This method mutates the wrapped array.
  5577. *
  5578. * @return Returns the new reversed lodash wrapper instance.
  5579. */
  5580. reverse(): LoDashImplicitArrayWrapper<T>;
  5581. }
  5582. interface LoDashExplicitArrayWrapper<T> {
  5583. /**
  5584. * @see _.reverse
  5585. */
  5586. reverse(): LoDashExplicitArrayWrapper<T>;
  5587. }
  5588. // _.prototype.toJSON
  5589. interface LoDashWrapperBase<T, TWrapper> {
  5590. /**
  5591. * @see _.value
  5592. */
  5593. toJSON(): T;
  5594. }
  5595. // _.prototype.toString
  5596. interface LoDashWrapperBase<T, TWrapper> {
  5597. /**
  5598. * Produces the result of coercing the unwrapped value to a string.
  5599. *
  5600. * @return Returns the coerced string value.
  5601. */
  5602. toString(): string;
  5603. }
  5604. // _.prototype.value
  5605. interface LoDashWrapperBase<T, TWrapper> {
  5606. /**
  5607. * Executes the chained sequence to extract the unwrapped value.
  5608. *
  5609. * @alias _.toJSON, _.valueOf
  5610. *
  5611. * @return Returns the resolved unwrapped value.
  5612. */
  5613. value(): T;
  5614. }
  5615. // _.valueOf
  5616. interface LoDashWrapperBase<T, TWrapper> {
  5617. /**
  5618. * @see _.value
  5619. */
  5620. valueOf(): T;
  5621. }
  5622. /**************
  5623. * Collection *
  5624. *************/
  5625. // _.at
  5626. interface LoDashStatic {
  5627. /**
  5628. * Creates an array of elements corresponding to the given keys, or indexes, of collection. Keys may be
  5629. * specified as individual arguments or as arrays of keys.
  5630. *
  5631. * @param collection The collection to iterate over.
  5632. * @param props The property names or indexes of elements to pick, specified individually or in arrays.
  5633. * @return Returns the new array of picked elements.
  5634. */
  5635. at<T>(
  5636. collection: List<T> | Dictionary<T>,
  5637. ...props: (number | string | (number | string)[])[]
  5638. ): T[];
  5639. }
  5640. interface LoDashImplicitArrayWrapper<T> {
  5641. /**
  5642. * @see _.at
  5643. */
  5644. at(...props: (number | string | (number | string)[])[]): LoDashImplicitArrayWrapper<T>;
  5645. }
  5646. interface LoDashImplicitObjectWrapper<T> {
  5647. /**
  5648. * @see _.at
  5649. */
  5650. at<T>(...props: (number | string | (number | string)[])[]): LoDashImplicitArrayWrapper<T>;
  5651. }
  5652. interface LoDashExplicitArrayWrapper<T> {
  5653. /**
  5654. * @see _.at
  5655. */
  5656. at(...props: (number | string | (number | string)[])[]): LoDashExplicitArrayWrapper<T>;
  5657. }
  5658. interface LoDashExplicitObjectWrapper<T> {
  5659. /**
  5660. * @see _.at
  5661. */
  5662. at<T>(...props: (number | string | (number | string)[])[]): LoDashExplicitArrayWrapper<T>;
  5663. }
  5664. // _.countBy
  5665. interface LoDashStatic {
  5666. /**
  5667. * Creates an object composed of keys generated from the results of running each element of collection through
  5668. * iteratee. The corresponding value of each key is the number of times the key was returned by iteratee. The
  5669. * iteratee is bound to thisArg and invoked with three arguments:
  5670. * (value, index|key, collection).
  5671. *
  5672. * If a property name is provided for iteratee the created _.property style callback returns the property
  5673. * value of the given element.
  5674. *
  5675. * If a value is also provided for thisArg the created _.matchesProperty style callback returns true for
  5676. * elements that have a matching property value, else false.
  5677. *
  5678. * If an object is provided for iteratee the created _.matches style callback returns true for elements that
  5679. * have the properties of the given object, else false.
  5680. *
  5681. * @param collection The collection to iterate over.
  5682. * @param iteratee The function invoked per iteration.
  5683. * @param thisArg The this binding of iteratee.
  5684. * @return Returns the composed aggregate object.
  5685. */
  5686. countBy<T>(
  5687. collection: List<T>,
  5688. iteratee?: ListIterator<T, any>,
  5689. thisArg?: any
  5690. ): Dictionary<number>;
  5691. /**
  5692. * @see _.countBy
  5693. */
  5694. countBy<T>(
  5695. collection: Dictionary<T>,
  5696. iteratee?: DictionaryIterator<T, any>,
  5697. thisArg?: any
  5698. ): Dictionary<number>;
  5699. /**
  5700. * @see _.countBy
  5701. */
  5702. countBy<T>(
  5703. collection: NumericDictionary<T>,
  5704. iteratee?: NumericDictionaryIterator<T, any>,
  5705. thisArg?: any
  5706. ): Dictionary<number>;
  5707. /**
  5708. * @see _.countBy
  5709. */
  5710. countBy<T>(
  5711. collection: List<T> | Dictionary<T> | NumericDictionary<T>,
  5712. iteratee?: string,
  5713. thisArg?: any
  5714. ): Dictionary<number>;
  5715. /**
  5716. * @see _.countBy
  5717. */
  5718. countBy<W, T>(
  5719. collection: List<T> | Dictionary<T> | NumericDictionary<T>,
  5720. iteratee?: W
  5721. ): Dictionary<number>;
  5722. /**
  5723. * @see _.countBy
  5724. */
  5725. countBy<T>(
  5726. collection: List<T> | Dictionary<T> | NumericDictionary<T>,
  5727. iteratee?: Object
  5728. ): Dictionary<number>;
  5729. }
  5730. interface LoDashImplicitWrapper<T> {
  5731. /**
  5732. * @see _.countBy
  5733. */
  5734. countBy(
  5735. iteratee?: ListIterator<T, any>,
  5736. thisArg?: any
  5737. ): LoDashImplicitObjectWrapper<Dictionary<number>>;
  5738. }
  5739. interface LoDashImplicitArrayWrapper<T> {
  5740. /**
  5741. * @see _.countBy
  5742. */
  5743. countBy(
  5744. iteratee?: ListIterator<T, any>,
  5745. thisArg?: any
  5746. ): LoDashImplicitObjectWrapper<Dictionary<number>>;
  5747. /**
  5748. * @see _.countBy
  5749. */
  5750. countBy(
  5751. iteratee?: string,
  5752. thisArg?: any
  5753. ): LoDashImplicitObjectWrapper<Dictionary<number>>;
  5754. /**
  5755. * @see _.countBy
  5756. */
  5757. countBy<W>(
  5758. iteratee?: W
  5759. ): LoDashImplicitObjectWrapper<Dictionary<number>>;
  5760. }
  5761. interface LoDashImplicitObjectWrapper<T> {
  5762. /**
  5763. * @see _.countBy
  5764. */
  5765. countBy<T>(
  5766. iteratee?: ListIterator<T, any> | DictionaryIterator<T, any> | NumericDictionaryIterator<T, any>,
  5767. thisArg?: any
  5768. ): LoDashImplicitObjectWrapper<Dictionary<number>>;
  5769. /**
  5770. * @see _.countBy
  5771. */
  5772. countBy(
  5773. iteratee?: string,
  5774. thisArg?: any
  5775. ): LoDashImplicitObjectWrapper<Dictionary<number>>;
  5776. /**
  5777. * @see _.countBy
  5778. */
  5779. countBy<W>(
  5780. iteratee?: W
  5781. ): LoDashImplicitObjectWrapper<Dictionary<number>>;
  5782. }
  5783. interface LoDashExplicitWrapper<T> {
  5784. /**
  5785. * @see _.countBy
  5786. */
  5787. countBy(
  5788. iteratee?: ListIterator<T, any>,
  5789. thisArg?: any
  5790. ): LoDashExplicitObjectWrapper<Dictionary<number>>;
  5791. }
  5792. interface LoDashExplicitArrayWrapper<T> {
  5793. /**
  5794. * @see _.countBy
  5795. */
  5796. countBy(
  5797. iteratee?: ListIterator<T, any>,
  5798. thisArg?: any
  5799. ): LoDashExplicitObjectWrapper<Dictionary<number>>;
  5800. /**
  5801. * @see _.countBy
  5802. */
  5803. countBy(
  5804. iteratee?: string,
  5805. thisArg?: any
  5806. ): LoDashExplicitObjectWrapper<Dictionary<number>>;
  5807. /**
  5808. * @see _.countBy
  5809. */
  5810. countBy<W>(
  5811. iteratee?: W
  5812. ): LoDashExplicitObjectWrapper<Dictionary<number>>;
  5813. }
  5814. interface LoDashExplicitObjectWrapper<T> {
  5815. /**
  5816. * @see _.countBy
  5817. */
  5818. countBy<T>(
  5819. iteratee?: ListIterator<T, any> | DictionaryIterator<T, any> | NumericDictionaryIterator<T, any>,
  5820. thisArg?: any
  5821. ): LoDashExplicitObjectWrapper<Dictionary<number>>;
  5822. /**
  5823. * @see _.countBy
  5824. */
  5825. countBy(
  5826. iteratee?: string,
  5827. thisArg?: any
  5828. ): LoDashExplicitObjectWrapper<Dictionary<number>>;
  5829. /**
  5830. * @see _.countBy
  5831. */
  5832. countBy<W>(
  5833. iteratee?: W
  5834. ): LoDashExplicitObjectWrapper<Dictionary<number>>;
  5835. }
  5836. // _.each
  5837. interface LoDashStatic {
  5838. /**
  5839. * @see _.forEach
  5840. */
  5841. each<T>(
  5842. collection: T[],
  5843. iteratee?: ListIterator<T, any>,
  5844. thisArg?: any
  5845. ): T[];
  5846. /**
  5847. * @see _.forEach
  5848. */
  5849. each<T>(
  5850. collection: List<T>,
  5851. iteratee?: ListIterator<T, any>,
  5852. thisArg?: any
  5853. ): List<T>;
  5854. /**
  5855. * @see _.forEach
  5856. */
  5857. each<T>(
  5858. collection: Dictionary<T>,
  5859. iteratee?: DictionaryIterator<T, any>,
  5860. thisArg?: any
  5861. ): Dictionary<T>;
  5862. /**
  5863. * @see _.forEach
  5864. */
  5865. each<T extends {}>(
  5866. collection: T,
  5867. iteratee?: ObjectIterator<any, any>,
  5868. thisArgs?: any
  5869. ): T;
  5870. /**
  5871. * @see _.forEach
  5872. */
  5873. each<T extends {}, TValue>(
  5874. collection: T,
  5875. iteratee?: ObjectIterator<TValue, any>,
  5876. thisArgs?: any
  5877. ): T;
  5878. }
  5879. interface LoDashImplicitWrapper<T> {
  5880. /**
  5881. * @see _.forEach
  5882. */
  5883. each(
  5884. iteratee: ListIterator<string, any>,
  5885. thisArg?: any
  5886. ): LoDashImplicitWrapper<string>;
  5887. }
  5888. interface LoDashImplicitArrayWrapper<T> {
  5889. /**
  5890. * @see _.forEach
  5891. */
  5892. each(
  5893. iteratee: ListIterator<T, any>,
  5894. thisArg?: any
  5895. ): LoDashImplicitArrayWrapper<T>;
  5896. }
  5897. interface LoDashImplicitObjectWrapper<T> {
  5898. /**
  5899. * @see _.forEach
  5900. */
  5901. each<TValue>(
  5902. iteratee?: ListIterator<TValue, any> | DictionaryIterator<TValue, any>,
  5903. thisArg?: any
  5904. ): LoDashImplicitObjectWrapper<T>;
  5905. }
  5906. interface LoDashExplicitWrapper<T> {
  5907. /**
  5908. * @see _.forEach
  5909. */
  5910. each(
  5911. iteratee: ListIterator<string, any>,
  5912. thisArg?: any
  5913. ): LoDashExplicitWrapper<string>;
  5914. }
  5915. interface LoDashExplicitArrayWrapper<T> {
  5916. /**
  5917. * @see _.forEach
  5918. */
  5919. each(
  5920. iteratee: ListIterator<T, any>,
  5921. thisArg?: any
  5922. ): LoDashExplicitArrayWrapper<T>;
  5923. }
  5924. interface LoDashExplicitObjectWrapper<T> {
  5925. /**
  5926. * @see _.forEach
  5927. */
  5928. each<TValue>(
  5929. iteratee?: ListIterator<TValue, any> | DictionaryIterator<TValue, any>,
  5930. thisArg?: any
  5931. ): LoDashExplicitObjectWrapper<T>;
  5932. }
  5933. // _.eachRight
  5934. interface LoDashStatic {
  5935. /**
  5936. * @see _.forEachRight
  5937. */
  5938. eachRight<T>(
  5939. collection: T[],
  5940. iteratee?: ListIterator<T, any>,
  5941. thisArg?: any
  5942. ): T[];
  5943. /**
  5944. * @see _.forEachRight
  5945. */
  5946. eachRight<T>(
  5947. collection: List<T>,
  5948. iteratee?: ListIterator<T, any>,
  5949. thisArg?: any
  5950. ): List<T>;
  5951. /**
  5952. * @see _.forEachRight
  5953. */
  5954. eachRight<T>(
  5955. collection: Dictionary<T>,
  5956. iteratee?: DictionaryIterator<T, any>,
  5957. thisArg?: any
  5958. ): Dictionary<T>;
  5959. /**
  5960. * @see _.forEachRight
  5961. */
  5962. eachRight<T extends {}>(
  5963. collection: T,
  5964. iteratee?: ObjectIterator<any, any>,
  5965. thisArgs?: any
  5966. ): T;
  5967. /**
  5968. * @see _.forEachRight
  5969. */
  5970. eachRight<T extends {}, TValue>(
  5971. collection: T,
  5972. iteratee?: ObjectIterator<TValue, any>,
  5973. thisArgs?: any
  5974. ): T;
  5975. }
  5976. interface LoDashImplicitWrapper<T> {
  5977. /**
  5978. * @see _.forEachRight
  5979. */
  5980. eachRight(
  5981. iteratee: ListIterator<string, any>,
  5982. thisArg?: any
  5983. ): LoDashImplicitWrapper<string>;
  5984. }
  5985. interface LoDashImplicitArrayWrapper<T> {
  5986. /**
  5987. * @see _.forEachRight
  5988. */
  5989. eachRight(
  5990. iteratee: ListIterator<T, any>,
  5991. thisArg?: any
  5992. ): LoDashImplicitArrayWrapper<T>;
  5993. }
  5994. interface LoDashImplicitObjectWrapper<T> {
  5995. /**
  5996. * @see _.forEachRight
  5997. */
  5998. eachRight<TValue>(
  5999. iteratee?: ListIterator<TValue, any> | DictionaryIterator<TValue, any>,
  6000. thisArg?: any
  6001. ): LoDashImplicitObjectWrapper<T>;
  6002. }
  6003. interface LoDashExplicitWrapper<T> {
  6004. /**
  6005. * @see _.forEachRight
  6006. */
  6007. eachRight(
  6008. iteratee: ListIterator<string, any>,
  6009. thisArg?: any
  6010. ): LoDashExplicitWrapper<string>;
  6011. }
  6012. interface LoDashExplicitArrayWrapper<T> {
  6013. /**
  6014. * @see _.forEachRight
  6015. */
  6016. eachRight(
  6017. iteratee: ListIterator<T, any>,
  6018. thisArg?: any
  6019. ): LoDashExplicitArrayWrapper<T>;
  6020. }
  6021. interface LoDashExplicitObjectWrapper<T> {
  6022. /**
  6023. * @see _.forEachRight
  6024. */
  6025. eachRight<TValue>(
  6026. iteratee?: ListIterator<TValue, any> | DictionaryIterator<TValue, any>,
  6027. thisArg?: any
  6028. ): LoDashExplicitObjectWrapper<T>;
  6029. }
  6030. // _.every
  6031. interface LoDashStatic {
  6032. /**
  6033. * Checks if predicate returns truthy for all elements of collection. Iteration is stopped once predicate
  6034. * returns falsey. The predicate is invoked with three arguments: (value, index|key, collection).
  6035. *
  6036. * @param collection The collection to iterate over.
  6037. * @param predicate The function invoked per iteration.
  6038. * @return Returns true if all elements pass the predicate check, else false.
  6039. */
  6040. every<T>(
  6041. collection: List<T>,
  6042. predicate?: ListIterator<T, boolean>
  6043. ): boolean;
  6044. /**
  6045. * @see _.every
  6046. */
  6047. every<T>(
  6048. collection: Dictionary<T>,
  6049. predicate?: DictionaryIterator<T, boolean>
  6050. ): boolean;
  6051. /**
  6052. * @see _.every
  6053. */
  6054. every<T>(
  6055. collection: NumericDictionary<T>,
  6056. predicate?: NumericDictionaryIterator<T, boolean>
  6057. ): boolean;
  6058. /**
  6059. * @see _.every
  6060. */
  6061. every<T>(
  6062. collection: List<T> | Dictionary<T> | NumericDictionary<T>,
  6063. predicate?: string | any[]
  6064. ): boolean;
  6065. /**
  6066. * @see _.every
  6067. */
  6068. every<TObject extends {}, T>(
  6069. collection: List<T> | Dictionary<T> | NumericDictionary<T>,
  6070. predicate?: TObject
  6071. ): boolean;
  6072. }
  6073. interface LoDashImplicitArrayWrapper<T> {
  6074. /**
  6075. * @see _.every
  6076. */
  6077. every(
  6078. predicate?: ListIterator<T, boolean> | NumericDictionaryIterator<T, boolean>
  6079. ): boolean;
  6080. /**
  6081. * @see _.every
  6082. */
  6083. every(
  6084. predicate?: string | any[]
  6085. ): boolean;
  6086. /**
  6087. * @see _.every
  6088. */
  6089. every<TObject extends {}>(
  6090. predicate?: TObject
  6091. ): boolean;
  6092. }
  6093. interface LoDashImplicitObjectWrapper<T> {
  6094. /**
  6095. * @see _.every
  6096. */
  6097. every<TResult>(
  6098. predicate?: ListIterator<TResult, boolean> | DictionaryIterator<TResult, boolean> | NumericDictionaryIterator<T, boolean>
  6099. ): boolean;
  6100. /**
  6101. * @see _.every
  6102. */
  6103. every(
  6104. predicate?: string | any[]
  6105. ): boolean;
  6106. /**
  6107. * @see _.every
  6108. */
  6109. every<TObject extends {}>(
  6110. predicate?: TObject
  6111. ): boolean;
  6112. }
  6113. interface LoDashExplicitArrayWrapper<T> {
  6114. /**
  6115. * @see _.every
  6116. */
  6117. every(
  6118. predicate?: ListIterator<T, boolean> | NumericDictionaryIterator<T, boolean>
  6119. ): LoDashExplicitWrapper<boolean>;
  6120. /**
  6121. * @see _.every
  6122. */
  6123. every(
  6124. predicate?: string | any[]
  6125. ): LoDashExplicitWrapper<boolean>;
  6126. /**
  6127. * @see _.every
  6128. */
  6129. every<TObject extends {}>(
  6130. predicate?: TObject
  6131. ): LoDashExplicitWrapper<boolean>;
  6132. }
  6133. interface LoDashExplicitObjectWrapper<T> {
  6134. /**
  6135. * @see _.every
  6136. */
  6137. every<TResult>(
  6138. predicate?: ListIterator<TResult, boolean> | DictionaryIterator<TResult, boolean> | NumericDictionaryIterator<T, boolean>
  6139. ): LoDashExplicitWrapper<boolean>;
  6140. /**
  6141. * @see _.every
  6142. */
  6143. every(
  6144. predicate?: string | any[]
  6145. ): LoDashExplicitWrapper<boolean>;
  6146. /**
  6147. * @see _.every
  6148. */
  6149. every<TObject extends {}>(
  6150. predicate?: TObject
  6151. ): LoDashExplicitWrapper<boolean>;
  6152. }
  6153. // _.filter
  6154. interface LoDashStatic {
  6155. /**
  6156. * Iterates over elements of collection, returning an array of all elements predicate returns truthy for. The
  6157. * predicate is bound to thisArg and invoked with three arguments: (value, index|key, collection).
  6158. *
  6159. * If a property name is provided for predicate the created _.property style callback returns the property
  6160. * value of the given element.
  6161. *
  6162. * If a value is also provided for thisArg the created _.matchesProperty style callback returns true for
  6163. * elements that have a matching property value, else false.
  6164. *
  6165. * If an object is provided for predicate the created _.matches style callback returns true for elements that
  6166. * have the properties of the given object, else false.
  6167. *
  6168. * @param collection The collection to iterate over.
  6169. * @param predicate The function invoked per iteration.
  6170. * @param thisArg The this binding of predicate.
  6171. * @return Returns the new filtered array.
  6172. */
  6173. filter<T>(
  6174. collection: List<T>,
  6175. predicate?: ListIterator<T, boolean>,
  6176. thisArg?: any
  6177. ): T[];
  6178. /**
  6179. * @see _.filter
  6180. */
  6181. filter<T>(
  6182. collection: Dictionary<T>,
  6183. predicate?: DictionaryIterator<T, boolean>,
  6184. thisArg?: any
  6185. ): T[];
  6186. /**
  6187. * @see _.filter
  6188. */
  6189. filter(
  6190. collection: string,
  6191. predicate?: StringIterator<boolean>,
  6192. thisArg?: any
  6193. ): string[];
  6194. /**
  6195. * @see _.filter
  6196. */
  6197. filter<T>(
  6198. collection: List<T> | Dictionary<T>,
  6199. predicate: string,
  6200. thisArg?: any
  6201. ): T[];
  6202. /**
  6203. * @see _.filter
  6204. */
  6205. filter<W extends {}, T>(
  6206. collection: List<T> | Dictionary<T>,
  6207. predicate: W
  6208. ): T[];
  6209. }
  6210. interface LoDashImplicitWrapper<T> {
  6211. /**
  6212. * @see _.filter
  6213. */
  6214. filter(
  6215. predicate?: StringIterator<boolean>,
  6216. thisArg?: any
  6217. ): LoDashImplicitArrayWrapper<string>;
  6218. }
  6219. interface LoDashImplicitArrayWrapper<T> {
  6220. /**
  6221. * @see _.filter
  6222. */
  6223. filter(
  6224. predicate: ListIterator<T, boolean>,
  6225. thisArg?: any
  6226. ): LoDashImplicitArrayWrapper<T>;
  6227. /**
  6228. * @see _.filter
  6229. */
  6230. filter(
  6231. predicate: string,
  6232. thisArg?: any
  6233. ): LoDashImplicitArrayWrapper<T>;
  6234. /**
  6235. * @see _.filter
  6236. */
  6237. filter<W>(predicate: W): LoDashImplicitArrayWrapper<T>;
  6238. }
  6239. interface LoDashImplicitObjectWrapper<T> {
  6240. /**
  6241. * @see _.filter
  6242. */
  6243. filter<T>(
  6244. predicate: ListIterator<T, boolean> | DictionaryIterator<T, boolean>,
  6245. thisArg?: any
  6246. ): LoDashImplicitArrayWrapper<T>;
  6247. /**
  6248. * @see _.filter
  6249. */
  6250. filter<T>(
  6251. predicate: string,
  6252. thisArg?: any
  6253. ): LoDashImplicitArrayWrapper<T>;
  6254. /**
  6255. * @see _.filter
  6256. */
  6257. filter<W, T>(predicate: W): LoDashImplicitArrayWrapper<T>;
  6258. }
  6259. interface LoDashExplicitWrapper<T> {
  6260. /**
  6261. * @see _.filter
  6262. */
  6263. filter(
  6264. predicate?: StringIterator<boolean>,
  6265. thisArg?: any
  6266. ): LoDashExplicitArrayWrapper<string>;
  6267. }
  6268. interface LoDashExplicitArrayWrapper<T> {
  6269. /**
  6270. * @see _.filter
  6271. */
  6272. filter(
  6273. predicate: ListIterator<T, boolean>,
  6274. thisArg?: any
  6275. ): LoDashExplicitArrayWrapper<T>;
  6276. /**
  6277. * @see _.filter
  6278. */
  6279. filter(
  6280. predicate: string,
  6281. thisArg?: any
  6282. ): LoDashExplicitArrayWrapper<T>;
  6283. /**
  6284. * @see _.filter
  6285. */
  6286. filter<W>(predicate: W): LoDashExplicitArrayWrapper<T>;
  6287. }
  6288. interface LoDashExplicitObjectWrapper<T> {
  6289. /**
  6290. * @see _.filter
  6291. */
  6292. filter<T>(
  6293. predicate: ListIterator<T, boolean> | DictionaryIterator<T, boolean>,
  6294. thisArg?: any
  6295. ): LoDashExplicitArrayWrapper<T>;
  6296. /**
  6297. * @see _.filter
  6298. */
  6299. filter<T>(
  6300. predicate: string,
  6301. thisArg?: any
  6302. ): LoDashExplicitArrayWrapper<T>;
  6303. /**
  6304. * @see _.filter
  6305. */
  6306. filter<W, T>(predicate: W): LoDashExplicitArrayWrapper<T>;
  6307. }
  6308. // _.find
  6309. interface LoDashStatic {
  6310. /**
  6311. * Iterates over elements of collection, returning the first element predicate returns truthy for.
  6312. * The predicate is bound to thisArg and invoked with three arguments: (value, index|key, collection).
  6313. *
  6314. * If a property name is provided for predicate the created _.property style callback returns the property
  6315. * value of the given element.
  6316. *
  6317. * If a value is also provided for thisArg the created _.matchesProperty style callback returns true for
  6318. * elements that have a matching property value, else false.
  6319. *
  6320. * If an object is provided for predicate the created _.matches style callback returns true for elements that
  6321. * have the properties of the given object, else false.
  6322. *
  6323. * @param collection The collection to search.
  6324. * @param predicate The function invoked per iteration.
  6325. * @param thisArg The this binding of predicate.
  6326. * @return Returns the matched element, else undefined.
  6327. */
  6328. find<T>(
  6329. collection: List<T>,
  6330. predicate?: ListIterator<T, boolean>,
  6331. thisArg?: any
  6332. ): T;
  6333. /**
  6334. * @see _.find
  6335. */
  6336. find<T>(
  6337. collection: Dictionary<T>,
  6338. predicate?: DictionaryIterator<T, boolean>,
  6339. thisArg?: any
  6340. ): T;
  6341. /**
  6342. * @see _.find
  6343. */
  6344. find<T>(
  6345. collection: List<T> | Dictionary<T>,
  6346. predicate?: string,
  6347. thisArg?: any
  6348. ): T;
  6349. /**
  6350. * @see _.find
  6351. */
  6352. find<TObject extends {}, T>(
  6353. collection: List<T> | Dictionary<T>,
  6354. predicate?: TObject
  6355. ): T;
  6356. }
  6357. interface LoDashImplicitArrayWrapper<T> {
  6358. /**
  6359. * @see _.find
  6360. */
  6361. find(
  6362. predicate?: ListIterator<T, boolean>,
  6363. thisArg?: any
  6364. ): T;
  6365. /**
  6366. * @see _.find
  6367. */
  6368. find(
  6369. predicate?: string,
  6370. thisArg?: any
  6371. ): T;
  6372. /**
  6373. * @see _.find
  6374. */
  6375. find<TObject extends {}>(
  6376. predicate?: TObject
  6377. ): T;
  6378. }
  6379. interface LoDashImplicitObjectWrapper<T> {
  6380. /**
  6381. * @see _.find
  6382. */
  6383. find<TResult>(
  6384. predicate?: ListIterator<TResult, boolean> | DictionaryIterator<TResult, boolean>,
  6385. thisArg?: any
  6386. ): TResult;
  6387. /**
  6388. * @see _.find
  6389. */
  6390. find<TResult>(
  6391. predicate?: string,
  6392. thisArg?: any
  6393. ): TResult;
  6394. /**
  6395. * @see _.find
  6396. */
  6397. find<TObject extends {}, TResult>(
  6398. predicate?: TObject
  6399. ): TResult;
  6400. }
  6401. // _.findLast
  6402. interface LoDashStatic {
  6403. /**
  6404. * This method is like _.find except that it iterates over elements of a collection from
  6405. * right to left.
  6406. * @param collection Searches for a value in this list.
  6407. * @param callback The function called per iteration.
  6408. * @param thisArg The this binding of callback.
  6409. * @return The found element, else undefined.
  6410. */
  6411. findLast<T>(
  6412. collection: Array<T>,
  6413. callback: ListIterator<T, boolean>,
  6414. thisArg?: any): T;
  6415. /**
  6416. * @see _.find
  6417. */
  6418. findLast<T>(
  6419. collection: List<T>,
  6420. callback: ListIterator<T, boolean>,
  6421. thisArg?: any): T;
  6422. /**
  6423. * @see _.find
  6424. */
  6425. findLast<T>(
  6426. collection: Dictionary<T>,
  6427. callback: DictionaryIterator<T, boolean>,
  6428. thisArg?: any): T;
  6429. /**
  6430. * @see _.find
  6431. * @param _.pluck style callback
  6432. */
  6433. findLast<W, T>(
  6434. collection: Array<T>,
  6435. whereValue: W): T;
  6436. /**
  6437. * @see _.find
  6438. * @param _.pluck style callback
  6439. */
  6440. findLast<W, T>(
  6441. collection: List<T>,
  6442. whereValue: W): T;
  6443. /**
  6444. * @see _.find
  6445. * @param _.pluck style callback
  6446. */
  6447. findLast<W, T>(
  6448. collection: Dictionary<T>,
  6449. whereValue: W): T;
  6450. /**
  6451. * @see _.find
  6452. * @param _.where style callback
  6453. */
  6454. findLast<T>(
  6455. collection: Array<T>,
  6456. pluckValue: string): T;
  6457. /**
  6458. * @see _.find
  6459. * @param _.where style callback
  6460. */
  6461. findLast<T>(
  6462. collection: List<T>,
  6463. pluckValue: string): T;
  6464. /**
  6465. * @see _.find
  6466. * @param _.where style callback
  6467. */
  6468. findLast<T>(
  6469. collection: Dictionary<T>,
  6470. pluckValue: string): T;
  6471. }
  6472. interface LoDashImplicitArrayWrapper<T> {
  6473. /**
  6474. * @see _.findLast
  6475. */
  6476. findLast(
  6477. callback: ListIterator<T, boolean>,
  6478. thisArg?: any): T;
  6479. /**
  6480. * @see _.findLast
  6481. * @param _.where style callback
  6482. */
  6483. findLast<W>(
  6484. whereValue: W): T;
  6485. /**
  6486. * @see _.findLast
  6487. * @param _.where style callback
  6488. */
  6489. findLast(
  6490. pluckValue: string): T;
  6491. }
  6492. // _.forEach
  6493. interface LoDashStatic {
  6494. /**
  6495. * Iterates over elements of collection invoking iteratee for each element. The iteratee is bound to thisArg
  6496. * and invoked with three arguments:
  6497. * (value, index|key, collection). Iteratee functions may exit iteration early by explicitly returning false.
  6498. *
  6499. * Note: As with other "Collections" methods, objects with a "length" property are iterated like arrays. To
  6500. * avoid this behavior _.forIn or _.forOwn may be used for object iteration.
  6501. *
  6502. * @alias _.each
  6503. *
  6504. * @param collection The collection to iterate over.
  6505. * @param iteratee The function invoked per iteration.
  6506. * @param thisArg The this binding of iteratee.
  6507. */
  6508. forEach<T>(
  6509. collection: T[],
  6510. iteratee?: ListIterator<T, any>,
  6511. thisArg?: any
  6512. ): T[];
  6513. /**
  6514. * @see _.forEach
  6515. */
  6516. forEach<T>(
  6517. collection: List<T>,
  6518. iteratee?: ListIterator<T, any>,
  6519. thisArg?: any
  6520. ): List<T>;
  6521. /**
  6522. * @see _.forEach
  6523. */
  6524. forEach<T>(
  6525. collection: Dictionary<T>,
  6526. iteratee?: DictionaryIterator<T, any>,
  6527. thisArg?: any
  6528. ): Dictionary<T>;
  6529. /**
  6530. * @see _.forEach
  6531. */
  6532. forEach<T extends {}>(
  6533. collection: T,
  6534. iteratee?: ObjectIterator<any, any>,
  6535. thisArgs?: any
  6536. ): T;
  6537. /**
  6538. * @see _.forEach
  6539. */
  6540. forEach<T extends {}, TValue>(
  6541. collection: T,
  6542. iteratee?: ObjectIterator<TValue, any>,
  6543. thisArgs?: any
  6544. ): T;
  6545. }
  6546. interface LoDashImplicitWrapper<T> {
  6547. /**
  6548. * @see _.forEach
  6549. */
  6550. forEach(
  6551. iteratee: ListIterator<string, any>,
  6552. thisArg?: any
  6553. ): LoDashImplicitWrapper<string>;
  6554. }
  6555. interface LoDashImplicitArrayWrapper<T> {
  6556. /**
  6557. * @see _.forEach
  6558. */
  6559. forEach(
  6560. iteratee: ListIterator<T, any>,
  6561. thisArg?: any
  6562. ): LoDashImplicitArrayWrapper<T>;
  6563. }
  6564. interface LoDashImplicitObjectWrapper<T> {
  6565. /**
  6566. * @see _.forEach
  6567. */
  6568. forEach<TValue>(
  6569. iteratee?: ListIterator<TValue, any> | DictionaryIterator<TValue, any>,
  6570. thisArg?: any
  6571. ): LoDashImplicitObjectWrapper<T>;
  6572. }
  6573. interface LoDashExplicitWrapper<T> {
  6574. /**
  6575. * @see _.forEach
  6576. */
  6577. forEach(
  6578. iteratee: ListIterator<string, any>,
  6579. thisArg?: any
  6580. ): LoDashExplicitWrapper<string>;
  6581. }
  6582. interface LoDashExplicitArrayWrapper<T> {
  6583. /**
  6584. * @see _.forEach
  6585. */
  6586. forEach(
  6587. iteratee: ListIterator<T, any>,
  6588. thisArg?: any
  6589. ): LoDashExplicitArrayWrapper<T>;
  6590. }
  6591. interface LoDashExplicitObjectWrapper<T> {
  6592. /**
  6593. * @see _.forEach
  6594. */
  6595. forEach<TValue>(
  6596. iteratee?: ListIterator<TValue, any> | DictionaryIterator<TValue, any>,
  6597. thisArg?: any
  6598. ): LoDashExplicitObjectWrapper<T>;
  6599. }
  6600. // _.forEachRight
  6601. interface LoDashStatic {
  6602. /**
  6603. * This method is like _.forEach except that it iterates over elements of collection from right to left.
  6604. *
  6605. * @alias _.eachRight
  6606. *
  6607. * @param collection The collection to iterate over.
  6608. * @param iteratee The function called per iteration.
  6609. * @param thisArg The this binding of callback.
  6610. */
  6611. forEachRight<T>(
  6612. collection: T[],
  6613. iteratee?: ListIterator<T, any>,
  6614. thisArg?: any
  6615. ): T[];
  6616. /**
  6617. * @see _.forEachRight
  6618. */
  6619. forEachRight<T>(
  6620. collection: List<T>,
  6621. iteratee?: ListIterator<T, any>,
  6622. thisArg?: any
  6623. ): List<T>;
  6624. /**
  6625. * @see _.forEachRight
  6626. */
  6627. forEachRight<T>(
  6628. collection: Dictionary<T>,
  6629. iteratee?: DictionaryIterator<T, any>,
  6630. thisArg?: any
  6631. ): Dictionary<T>;
  6632. /**
  6633. * @see _.forEachRight
  6634. */
  6635. forEachRight<T extends {}>(
  6636. collection: T,
  6637. iteratee?: ObjectIterator<any, any>,
  6638. thisArgs?: any
  6639. ): T;
  6640. /**
  6641. * @see _.forEachRight
  6642. */
  6643. forEachRight<T extends {}, TValue>(
  6644. collection: T,
  6645. iteratee?: ObjectIterator<TValue, any>,
  6646. thisArgs?: any
  6647. ): T;
  6648. }
  6649. interface LoDashImplicitWrapper<T> {
  6650. /**
  6651. * @see _.forEachRight
  6652. */
  6653. forEachRight(
  6654. iteratee: ListIterator<string, any>,
  6655. thisArg?: any
  6656. ): LoDashImplicitWrapper<string>;
  6657. }
  6658. interface LoDashImplicitArrayWrapper<T> {
  6659. /**
  6660. * @see _.forEachRight
  6661. */
  6662. forEachRight(
  6663. iteratee: ListIterator<T, any>,
  6664. thisArg?: any
  6665. ): LoDashImplicitArrayWrapper<T>;
  6666. }
  6667. interface LoDashImplicitObjectWrapper<T> {
  6668. /**
  6669. * @see _.forEachRight
  6670. */
  6671. forEachRight<TValue>(
  6672. iteratee?: ListIterator<TValue, any> | DictionaryIterator<TValue, any>,
  6673. thisArg?: any
  6674. ): LoDashImplicitObjectWrapper<T>;
  6675. }
  6676. interface LoDashExplicitWrapper<T> {
  6677. /**
  6678. * @see _.forEachRight
  6679. */
  6680. forEachRight(
  6681. iteratee: ListIterator<string, any>,
  6682. thisArg?: any
  6683. ): LoDashExplicitWrapper<string>;
  6684. }
  6685. interface LoDashExplicitArrayWrapper<T> {
  6686. /**
  6687. * @see _.forEachRight
  6688. */
  6689. forEachRight(
  6690. iteratee: ListIterator<T, any>,
  6691. thisArg?: any
  6692. ): LoDashExplicitArrayWrapper<T>;
  6693. }
  6694. interface LoDashExplicitObjectWrapper<T> {
  6695. /**
  6696. * @see _.forEachRight
  6697. */
  6698. forEachRight<TValue>(
  6699. iteratee?: ListIterator<TValue, any> | DictionaryIterator<TValue, any>,
  6700. thisArg?: any
  6701. ): LoDashExplicitObjectWrapper<T>;
  6702. }
  6703. // _.groupBy
  6704. interface LoDashStatic {
  6705. /**
  6706. * Creates an object composed of keys generated from the results of running each element of collection through
  6707. * iteratee. The corresponding value of each key is an array of the elements responsible for generating the
  6708. * key. The iteratee is bound to thisArg and invoked with three arguments:
  6709. * (value, index|key, collection).
  6710. *
  6711. * If a property name is provided for iteratee the created _.property style callback returns the property
  6712. * value of the given element.
  6713. *
  6714. * If a value is also provided for thisArg the created _.matchesProperty style callback returns true for
  6715. * elements that have a matching property value, else false.
  6716. *
  6717. * If an object is provided for iteratee the created _.matches style callback returns true for elements that
  6718. * have the properties of the given object, else false.
  6719. *
  6720. * @param collection The collection to iterate over.
  6721. * @param iteratee The function invoked per iteration.
  6722. * @param thisArg The this binding of iteratee.
  6723. * @return Returns the composed aggregate object.
  6724. */
  6725. groupBy<T, TKey>(
  6726. collection: List<T>,
  6727. iteratee?: ListIterator<T, TKey>,
  6728. thisArg?: any
  6729. ): Dictionary<T[]>;
  6730. /**
  6731. * @see _.groupBy
  6732. */
  6733. groupBy<T>(
  6734. collection: List<any>,
  6735. iteratee?: ListIterator<T, any>,
  6736. thisArg?: any
  6737. ): Dictionary<T[]>;
  6738. /**
  6739. * @see _.groupBy
  6740. */
  6741. groupBy<T, TKey>(
  6742. collection: Dictionary<T>,
  6743. iteratee?: DictionaryIterator<T, TKey>,
  6744. thisArg?: any
  6745. ): Dictionary<T[]>;
  6746. /**
  6747. * @see _.groupBy
  6748. */
  6749. groupBy<T>(
  6750. collection: Dictionary<any>,
  6751. iteratee?: DictionaryIterator<T, any>,
  6752. thisArg?: any
  6753. ): Dictionary<T[]>;
  6754. /**
  6755. * @see _.groupBy
  6756. */
  6757. groupBy<T, TValue>(
  6758. collection: List<T> | Dictionary<T>,
  6759. iteratee?: string,
  6760. thisArg?: TValue
  6761. ): Dictionary<T[]>;
  6762. /**
  6763. * @see _.groupBy
  6764. */
  6765. groupBy<T>(
  6766. collection: List<T> | Dictionary<T>,
  6767. iteratee?: string,
  6768. thisArg?: any
  6769. ): Dictionary<T[]>;
  6770. /**
  6771. * @see _.groupBy
  6772. */
  6773. groupBy<TWhere, T>(
  6774. collection: List<T> | Dictionary<T>,
  6775. iteratee?: TWhere
  6776. ): Dictionary<T[]>;
  6777. /**
  6778. * @see _.groupBy
  6779. */
  6780. groupBy<T>(
  6781. collection: List<T> | Dictionary<T>,
  6782. iteratee?: Object
  6783. ): Dictionary<T[]>;
  6784. }
  6785. interface LoDashImplicitWrapper<T> {
  6786. /**
  6787. * @see _.groupBy
  6788. */
  6789. groupBy<TKey>(
  6790. iteratee?: ListIterator<T, TKey>,
  6791. thisArg?: any
  6792. ): LoDashImplicitObjectWrapper<Dictionary<T[]>>;
  6793. }
  6794. interface LoDashImplicitArrayWrapper<T> {
  6795. /**
  6796. * @see _.groupBy
  6797. */
  6798. groupBy<TKey>(
  6799. iteratee?: ListIterator<T, TKey>,
  6800. thisArg?: any
  6801. ): LoDashImplicitObjectWrapper<Dictionary<T[]>>;
  6802. /**
  6803. * @see _.groupBy
  6804. */
  6805. groupBy<TValue>(
  6806. iteratee?: string,
  6807. thisArg?: TValue
  6808. ): LoDashImplicitObjectWrapper<Dictionary<T[]>>;
  6809. /**
  6810. * @see _.groupBy
  6811. */
  6812. groupBy<TWhere>(
  6813. iteratee?: TWhere
  6814. ): LoDashImplicitObjectWrapper<Dictionary<T[]>>;
  6815. }
  6816. interface LoDashImplicitObjectWrapper<T> {
  6817. /**
  6818. * @see _.groupBy
  6819. */
  6820. groupBy<T, TKey>(
  6821. iteratee?: ListIterator<T, TKey> | DictionaryIterator<T, TKey>,
  6822. thisArg?: any
  6823. ): LoDashImplicitObjectWrapper<Dictionary<T[]>>;
  6824. /**
  6825. * @see _.groupBy
  6826. */
  6827. groupBy<T>(
  6828. iteratee?: ListIterator<T, any> | DictionaryIterator<T, any>,
  6829. thisArg?: any
  6830. ): LoDashImplicitObjectWrapper<Dictionary<T[]>>;
  6831. /**
  6832. * @see _.groupBy
  6833. */
  6834. groupBy<T, TValue>(
  6835. iteratee?: string,
  6836. thisArg?: TValue
  6837. ): LoDashImplicitObjectWrapper<Dictionary<T[]>>;
  6838. /**
  6839. * @see _.groupBy
  6840. */
  6841. groupBy<T>(
  6842. iteratee?: string,
  6843. thisArg?: any
  6844. ): LoDashImplicitObjectWrapper<Dictionary<T[]>>;
  6845. /**
  6846. * @see _.groupBy
  6847. */
  6848. groupBy<TWhere, T>(
  6849. iteratee?: TWhere
  6850. ): LoDashImplicitObjectWrapper<Dictionary<T[]>>;
  6851. /**
  6852. * @see _.groupBy
  6853. */
  6854. groupBy<T>(
  6855. iteratee?: Object
  6856. ): LoDashImplicitObjectWrapper<Dictionary<T[]>>;
  6857. }
  6858. interface LoDashExplicitWrapper<T> {
  6859. /**
  6860. * @see _.groupBy
  6861. */
  6862. groupBy<TKey>(
  6863. iteratee?: ListIterator<T, TKey>,
  6864. thisArg?: any
  6865. ): LoDashExplicitObjectWrapper<Dictionary<T[]>>;
  6866. }
  6867. interface LoDashExplicitArrayWrapper<T> {
  6868. /**
  6869. * @see _.groupBy
  6870. */
  6871. groupBy<TKey>(
  6872. iteratee?: ListIterator<T, TKey>,
  6873. thisArg?: any
  6874. ): LoDashExplicitObjectWrapper<Dictionary<T[]>>;
  6875. /**
  6876. * @see _.groupBy
  6877. */
  6878. groupBy<TValue>(
  6879. iteratee?: string,
  6880. thisArg?: TValue
  6881. ): LoDashExplicitObjectWrapper<Dictionary<T[]>>;
  6882. /**
  6883. * @see _.groupBy
  6884. */
  6885. groupBy<TWhere>(
  6886. iteratee?: TWhere
  6887. ): LoDashExplicitObjectWrapper<Dictionary<T[]>>;
  6888. }
  6889. interface LoDashExplicitObjectWrapper<T> {
  6890. /**
  6891. * @see _.groupBy
  6892. */
  6893. groupBy<T, TKey>(
  6894. iteratee?: ListIterator<T, TKey> | DictionaryIterator<T, TKey>,
  6895. thisArg?: any
  6896. ): LoDashExplicitObjectWrapper<Dictionary<T[]>>;
  6897. /**
  6898. * @see _.groupBy
  6899. */
  6900. groupBy<T>(
  6901. iteratee?: ListIterator<T, any> | DictionaryIterator<T, any>,
  6902. thisArg?: any
  6903. ): LoDashExplicitObjectWrapper<Dictionary<T[]>>;
  6904. /**
  6905. * @see _.groupBy
  6906. */
  6907. groupBy<T, TValue>(
  6908. iteratee?: string,
  6909. thisArg?: TValue
  6910. ): LoDashExplicitObjectWrapper<Dictionary<T[]>>;
  6911. /**
  6912. * @see _.groupBy
  6913. */
  6914. groupBy<T>(
  6915. iteratee?: string,
  6916. thisArg?: any
  6917. ): LoDashExplicitObjectWrapper<Dictionary<T[]>>;
  6918. /**
  6919. * @see _.groupBy
  6920. */
  6921. groupBy<TWhere, T>(
  6922. iteratee?: TWhere
  6923. ): LoDashExplicitObjectWrapper<Dictionary<T[]>>;
  6924. /**
  6925. * @see _.groupBy
  6926. */
  6927. groupBy<T>(
  6928. iteratee?: Object
  6929. ): LoDashExplicitObjectWrapper<Dictionary<T[]>>;
  6930. }
  6931. // _.includes
  6932. interface LoDashStatic {
  6933. /**
  6934. * Checks if target is in collection using SameValueZero for equality comparisons. If fromIndex is negative,
  6935. * its used as the offset from the end of collection.
  6936. *
  6937. * @param collection The collection to search.
  6938. * @param target The value to search for.
  6939. * @param fromIndex The index to search from.
  6940. * @return True if the target element is found, else false.
  6941. */
  6942. includes<T>(
  6943. collection: List<T> | Dictionary<T>,
  6944. target: T,
  6945. fromIndex?: number
  6946. ): boolean;
  6947. /**
  6948. * @see _.includes
  6949. */
  6950. includes(
  6951. collection: string,
  6952. target: string,
  6953. fromIndex?: number
  6954. ): boolean;
  6955. }
  6956. interface LoDashImplicitArrayWrapper<T> {
  6957. /**
  6958. * @see _.includes
  6959. */
  6960. includes(
  6961. target: T,
  6962. fromIndex?: number
  6963. ): boolean;
  6964. }
  6965. interface LoDashImplicitObjectWrapper<T> {
  6966. /**
  6967. * @see _.includes
  6968. */
  6969. includes<TValue>(
  6970. target: TValue,
  6971. fromIndex?: number
  6972. ): boolean;
  6973. }
  6974. interface LoDashImplicitWrapper<T> {
  6975. /**
  6976. * @see _.includes
  6977. */
  6978. includes(
  6979. target: string,
  6980. fromIndex?: number
  6981. ): boolean;
  6982. }
  6983. interface LoDashExplicitArrayWrapper<T> {
  6984. /**
  6985. * @see _.includes
  6986. */
  6987. includes(
  6988. target: T,
  6989. fromIndex?: number
  6990. ): LoDashExplicitWrapper<boolean>;
  6991. }
  6992. interface LoDashExplicitObjectWrapper<T> {
  6993. /**
  6994. * @see _.includes
  6995. */
  6996. includes<TValue>(
  6997. target: TValue,
  6998. fromIndex?: number
  6999. ): LoDashExplicitWrapper<boolean>;
  7000. }
  7001. interface LoDashExplicitWrapper<T> {
  7002. /**
  7003. * @see _.includes
  7004. */
  7005. includes(
  7006. target: string,
  7007. fromIndex?: number
  7008. ): LoDashExplicitWrapper<boolean>;
  7009. }
  7010. // _.keyBy
  7011. interface LoDashStatic {
  7012. /**
  7013. * Creates an object composed of keys generated from the results of running each element of collection through
  7014. * iteratee. The corresponding value of each key is the last element responsible for generating the key. The
  7015. * iteratee function is bound to thisArg and invoked with three arguments:
  7016. * (value, index|key, collection).
  7017. *
  7018. * If a property name is provided for iteratee the created _.property style callback returns the property
  7019. * value of the given element.
  7020. *
  7021. * If a value is also provided for thisArg the created _.matchesProperty style callback returns true for
  7022. * elements that have a matching property value, else false.
  7023. *
  7024. * If an object is provided for iteratee the created _.matches style callback returns true for elements that
  7025. * have the properties of the given object, else false.
  7026. *
  7027. * @param collection The collection to iterate over.
  7028. * @param iteratee The function invoked per iteration.
  7029. * @param thisArg The this binding of iteratee.
  7030. * @return Returns the composed aggregate object.
  7031. */
  7032. keyBy<T>(
  7033. collection: List<T>,
  7034. iteratee?: ListIterator<T, any>,
  7035. thisArg?: any
  7036. ): Dictionary<T>;
  7037. /**
  7038. * @see _.keyBy
  7039. */
  7040. keyBy<T>(
  7041. collection: NumericDictionary<T>,
  7042. iteratee?: NumericDictionaryIterator<T, any>,
  7043. thisArg?: any
  7044. ): Dictionary<T>;
  7045. /**
  7046. * @see _.keyBy
  7047. */
  7048. keyBy<T>(
  7049. collection: Dictionary<T>,
  7050. iteratee?: DictionaryIterator<T, any>,
  7051. thisArg?: any
  7052. ): Dictionary<T>;
  7053. /**
  7054. * @see _.keyBy
  7055. */
  7056. keyBy<T>(
  7057. collection: List<T> | NumericDictionary<T> | Dictionary<T>,
  7058. iteratee?: string,
  7059. thisArg?: any
  7060. ): Dictionary<T>;
  7061. /**
  7062. * @see _.keyBy
  7063. */
  7064. keyBy<W extends Object, T>(
  7065. collection: List<T> | NumericDictionary<T> | Dictionary<T>,
  7066. iteratee?: W
  7067. ): Dictionary<T>;
  7068. /**
  7069. * @see _.keyBy
  7070. */
  7071. keyBy<T>(
  7072. collection: List<T> | NumericDictionary<T> | Dictionary<T>,
  7073. iteratee?: Object
  7074. ): Dictionary<T>;
  7075. }
  7076. interface LoDashImplicitWrapper<T> {
  7077. /**
  7078. * @see _.keyBy
  7079. */
  7080. keyBy(
  7081. iteratee?: ListIterator<T, any>,
  7082. thisArg?: any
  7083. ): LoDashImplicitObjectWrapper<Dictionary<T>>;
  7084. }
  7085. interface LoDashImplicitArrayWrapper<T> {
  7086. /**
  7087. * @see _.keyBy
  7088. */
  7089. keyBy(
  7090. iteratee?: ListIterator<T, any>,
  7091. thisArg?: any
  7092. ): LoDashImplicitObjectWrapper<Dictionary<T>>;
  7093. /**
  7094. * @see _.keyBy
  7095. */
  7096. keyBy(
  7097. iteratee?: string,
  7098. thisArg?: any
  7099. ): LoDashImplicitObjectWrapper<Dictionary<T>>;
  7100. /**
  7101. * @see _.keyBy
  7102. */
  7103. keyBy<W extends Object>(
  7104. iteratee?: W
  7105. ): LoDashImplicitObjectWrapper<Dictionary<T>>;
  7106. }
  7107. interface LoDashImplicitObjectWrapper<T> {
  7108. /**
  7109. * @see _.keyBy
  7110. */
  7111. keyBy<T>(
  7112. iteratee?: ListIterator<T, any> | NumericDictionaryIterator<T, any> | DictionaryIterator<T, any>,
  7113. thisArg?: any
  7114. ): LoDashImplicitObjectWrapper<Dictionary<T>>;
  7115. /**
  7116. * @see _.keyBy
  7117. */
  7118. keyBy<T>(
  7119. iteratee?: string,
  7120. thisArg?: any
  7121. ): LoDashImplicitObjectWrapper<Dictionary<T>>;
  7122. /**
  7123. * @see _.keyBy
  7124. */
  7125. keyBy<W extends Object, T>(
  7126. iteratee?: W
  7127. ): LoDashImplicitObjectWrapper<Dictionary<T>>;
  7128. /**
  7129. * @see _.keyBy
  7130. */
  7131. keyBy<T>(
  7132. iteratee?: Object
  7133. ): LoDashImplicitObjectWrapper<Dictionary<T>>;
  7134. }
  7135. interface LoDashExplicitWrapper<T> {
  7136. /**
  7137. * @see _.keyBy
  7138. */
  7139. keyBy(
  7140. iteratee?: ListIterator<T, any>,
  7141. thisArg?: any
  7142. ): LoDashExplicitObjectWrapper<Dictionary<T>>;
  7143. }
  7144. interface LoDashExplicitArrayWrapper<T> {
  7145. /**
  7146. * @see _.keyBy
  7147. */
  7148. keyBy(
  7149. iteratee?: ListIterator<T, any>,
  7150. thisArg?: any
  7151. ): LoDashExplicitObjectWrapper<Dictionary<T>>;
  7152. /**
  7153. * @see _.keyBy
  7154. */
  7155. keyBy(
  7156. iteratee?: string,
  7157. thisArg?: any
  7158. ): LoDashExplicitObjectWrapper<Dictionary<T>>;
  7159. /**
  7160. * @see _.keyBy
  7161. */
  7162. keyBy<W extends Object>(
  7163. iteratee?: W
  7164. ): LoDashExplicitObjectWrapper<Dictionary<T>>;
  7165. }
  7166. interface LoDashExplicitObjectWrapper<T> {
  7167. /**
  7168. * @see _.keyBy
  7169. */
  7170. keyBy<T>(
  7171. iteratee?: ListIterator<T, any> | NumericDictionaryIterator<T, any> | DictionaryIterator<T, any>,
  7172. thisArg?: any
  7173. ): LoDashExplicitObjectWrapper<Dictionary<T>>;
  7174. /**
  7175. * @see _.keyBy
  7176. */
  7177. keyBy<T>(
  7178. iteratee?: string,
  7179. thisArg?: any
  7180. ): LoDashExplicitObjectWrapper<Dictionary<T>>;
  7181. /**
  7182. * @see _.keyBy
  7183. */
  7184. keyBy<W extends Object, T>(
  7185. iteratee?: W
  7186. ): LoDashExplicitObjectWrapper<Dictionary<T>>;
  7187. /**
  7188. * @see _.keyBy
  7189. */
  7190. keyBy<T>(
  7191. iteratee?: Object
  7192. ): LoDashExplicitObjectWrapper<Dictionary<T>>;
  7193. }
  7194. // _.invokeMap
  7195. interface LoDashStatic {
  7196. /**
  7197. * Invokes the method named by methodName on each element in the collection returning
  7198. * an array of the results of each invoked method. Additional arguments will be provided
  7199. * to each invoked method. If methodName is a function it will be invoked for, and this
  7200. * bound to, each element in the collection.
  7201. * @param collection The collection to iterate over.
  7202. * @param methodName The name of the method to invoke.
  7203. * @param args Arguments to invoke the method with.
  7204. */
  7205. invokeMap<TValue extends {}, TResult>(
  7206. collection: TValue[],
  7207. methodName: string,
  7208. ...args: any[]): TResult[];
  7209. /**
  7210. * @see _.invokeMap
  7211. */
  7212. invokeMap<TValue extends {}, TResult>(
  7213. collection: Dictionary<TValue>,
  7214. methodName: string,
  7215. ...args: any[]): TResult[];
  7216. /**
  7217. * @see _.invokeMap
  7218. */
  7219. invokeMap<TResult>(
  7220. collection: {}[],
  7221. methodName: string,
  7222. ...args: any[]): TResult[];
  7223. /**
  7224. * @see _.invokeMap
  7225. */
  7226. invokeMap<TResult>(
  7227. collection: Dictionary<{}>,
  7228. methodName: string,
  7229. ...args: any[]): TResult[];
  7230. /**
  7231. * @see _.invokeMap
  7232. */
  7233. invokeMap<TValue extends {}, TResult>(
  7234. collection: TValue[],
  7235. method: (...args: any[]) => TResult,
  7236. ...args: any[]): TResult[];
  7237. /**
  7238. * @see _.invokeMap
  7239. */
  7240. invokeMap<TValue extends {}, TResult>(
  7241. collection: Dictionary<TValue>,
  7242. method: (...args: any[]) => TResult,
  7243. ...args: any[]): TResult[];
  7244. /**
  7245. * @see _.invokeMap
  7246. */
  7247. invokeMap<TResult>(
  7248. collection: {}[],
  7249. method: (...args: any[]) => TResult,
  7250. ...args: any[]): TResult[];
  7251. /**
  7252. * @see _.invokeMap
  7253. */
  7254. invokeMap<TResult>(
  7255. collection: Dictionary<{}>,
  7256. method: (...args: any[]) => TResult,
  7257. ...args: any[]): TResult[];
  7258. }
  7259. interface LoDashImplicitArrayWrapper<T> {
  7260. /**
  7261. * @see _.invokeMap
  7262. */
  7263. invokeMap<TResult>(
  7264. methodName: string,
  7265. ...args: any[]): LoDashImplicitArrayWrapper<TResult>;
  7266. /**
  7267. * @see _.invokeMap
  7268. */
  7269. invokeMap<TResult>(
  7270. method: (...args: any[]) => TResult,
  7271. ...args: any[]): LoDashImplicitArrayWrapper<TResult>;
  7272. }
  7273. interface LoDashImplicitObjectWrapper<T> {
  7274. /**
  7275. * @see _.invokeMap
  7276. */
  7277. invokeMap<TResult>(
  7278. methodName: string,
  7279. ...args: any[]): LoDashImplicitArrayWrapper<TResult>;
  7280. /**
  7281. * @see _.invokeMap
  7282. */
  7283. invokeMap<TResult>(
  7284. method: (...args: any[]) => TResult,
  7285. ...args: any[]): LoDashImplicitArrayWrapper<TResult>;
  7286. }
  7287. interface LoDashExplicitArrayWrapper<T> {
  7288. /**
  7289. * @see _.invokeMap
  7290. */
  7291. invokeMap<TResult>(
  7292. methodName: string,
  7293. ...args: any[]): LoDashExplicitArrayWrapper<TResult>;
  7294. /**
  7295. * @see _.invokeMap
  7296. */
  7297. invokeMap<TResult>(
  7298. method: (...args: any[]) => TResult,
  7299. ...args: any[]): LoDashExplicitArrayWrapper<TResult>;
  7300. }
  7301. interface LoDashExplicitObjectWrapper<T> {
  7302. /**
  7303. * @see _.invokeMap
  7304. */
  7305. invokeMap<TResult>(
  7306. methodName: string,
  7307. ...args: any[]): LoDashExplicitArrayWrapper<TResult>;
  7308. /**
  7309. * @see _.invokeMap
  7310. */
  7311. invokeMap<TResult>(
  7312. method: (...args: any[]) => TResult,
  7313. ...args: any[]): LoDashExplicitArrayWrapper<TResult>;
  7314. }
  7315. // _.map
  7316. interface LoDashStatic {
  7317. /**
  7318. * Creates an array of values by running each element in collection through iteratee. The iteratee is bound to
  7319. * thisArg and invoked with three arguments: (value, index|key, collection).
  7320. *
  7321. * If a property name is provided for iteratee the created _.property style callback returns the property value
  7322. * of the given element.
  7323. *
  7324. * If a value is also provided for thisArg the created _.matchesProperty style callback returns true for
  7325. * elements that have a matching property value, else false.
  7326. *
  7327. * If an object is provided for iteratee the created _.matches style callback returns true for elements that
  7328. * have the properties of the given object, else false.
  7329. *
  7330. * Many lodash methods are guarded to work as iteratees for methods like _.every, _.filter, _.map, _.mapValues,
  7331. * _.reject, and _.some.
  7332. *
  7333. * The guarded methods are:
  7334. * ary, callback, chunk, clone, create, curry, curryRight, drop, dropRight, every, fill, flatten, invert, max,
  7335. * min, parseInt, slice, sortBy, take, takeRight, template, trim, trimLeft, trimRight, trunc, random, range,
  7336. * sample, some, sum, uniq, and words
  7337. *
  7338. * @param collection The collection to iterate over.
  7339. * @param iteratee The function invoked per iteration.
  7340. * @param thisArg The this binding of iteratee.
  7341. * @return Returns the new mapped array.
  7342. */
  7343. map<T, TResult>(
  7344. collection: List<T>,
  7345. iteratee?: ListIterator<T, TResult>,
  7346. thisArg?: any
  7347. ): TResult[];
  7348. /**
  7349. * @see _.map
  7350. */
  7351. map<T extends {}, TResult>(
  7352. collection: Dictionary<T>,
  7353. iteratee?: DictionaryIterator<T, TResult>,
  7354. thisArg?: any
  7355. ): TResult[];
  7356. map<T extends {}, TResult>(
  7357. collection: NumericDictionary<T>,
  7358. iteratee?: NumericDictionaryIterator<T, TResult>,
  7359. thisArg?: any
  7360. ): TResult[];
  7361. /**
  7362. * @see _.map
  7363. */
  7364. map<T, TResult>(
  7365. collection: List<T> | Dictionary<T> | NumericDictionary<T>,
  7366. iteratee?: string
  7367. ): TResult[];
  7368. /**
  7369. * @see _.map
  7370. */
  7371. map<T, TObject extends {}>(
  7372. collection: List<T> | Dictionary<T> | NumericDictionary<T>,
  7373. iteratee?: TObject
  7374. ): boolean[];
  7375. }
  7376. interface LoDashImplicitArrayWrapper<T> {
  7377. /**
  7378. * @see _.map
  7379. */
  7380. map<TResult>(
  7381. iteratee?: ListIterator<T, TResult>,
  7382. thisArg?: any
  7383. ): LoDashImplicitArrayWrapper<TResult>;
  7384. /**
  7385. * @see _.map
  7386. */
  7387. map<TResult>(
  7388. iteratee?: string
  7389. ): LoDashImplicitArrayWrapper<TResult>;
  7390. /**
  7391. * @see _.map
  7392. */
  7393. map<TObject extends {}>(
  7394. iteratee?: TObject
  7395. ): LoDashImplicitArrayWrapper<boolean>;
  7396. }
  7397. interface LoDashImplicitObjectWrapper<T> {
  7398. /**
  7399. * @see _.map
  7400. */
  7401. map<TValue, TResult>(
  7402. iteratee?: ListIterator<TValue, TResult> | DictionaryIterator<TValue, TResult>,
  7403. thisArg?: any
  7404. ): LoDashImplicitArrayWrapper<TResult>;
  7405. /**
  7406. * @see _.map
  7407. */
  7408. map<TValue, TResult>(
  7409. iteratee?: string
  7410. ): LoDashImplicitArrayWrapper<TResult>;
  7411. /**
  7412. * @see _.map
  7413. */
  7414. map<TObject extends {}>(
  7415. iteratee?: TObject
  7416. ): LoDashImplicitArrayWrapper<boolean>;
  7417. }
  7418. interface LoDashExplicitArrayWrapper<T> {
  7419. /**
  7420. * @see _.map
  7421. */
  7422. map<TResult>(
  7423. iteratee?: ListIterator<T, TResult>,
  7424. thisArg?: any
  7425. ): LoDashExplicitArrayWrapper<TResult>;
  7426. /**
  7427. * @see _.map
  7428. */
  7429. map<TResult>(
  7430. iteratee?: string
  7431. ): LoDashExplicitArrayWrapper<TResult>;
  7432. /**
  7433. * @see _.map
  7434. */
  7435. map<TObject extends {}>(
  7436. iteratee?: TObject
  7437. ): LoDashExplicitArrayWrapper<boolean>;
  7438. }
  7439. interface LoDashExplicitObjectWrapper<T> {
  7440. /**
  7441. * @see _.map
  7442. */
  7443. map<TValue, TResult>(
  7444. iteratee?: ListIterator<TValue, TResult> | DictionaryIterator<TValue, TResult>,
  7445. thisArg?: any
  7446. ): LoDashExplicitArrayWrapper<TResult>;
  7447. /**
  7448. * @see _.map
  7449. */
  7450. map<TValue, TResult>(
  7451. iteratee?: string
  7452. ): LoDashExplicitArrayWrapper<TResult>;
  7453. /**
  7454. * @see _.map
  7455. */
  7456. map<TObject extends {}>(
  7457. iteratee?: TObject
  7458. ): LoDashExplicitArrayWrapper<boolean>;
  7459. }
  7460. // _.partition
  7461. interface LoDashStatic {
  7462. /**
  7463. * Creates an array of elements split into two groups, the first of which contains elements predicate returns truthy for,
  7464. * while the second of which contains elements predicate returns falsey for.
  7465. * The predicate is bound to thisArg and invoked with three arguments: (value, index|key, collection).
  7466. *
  7467. * If a property name is provided for predicate the created _.property style callback
  7468. * returns the property value of the given element.
  7469. *
  7470. * If a value is also provided for thisArg the created _.matchesProperty style callback
  7471. * returns true for elements that have a matching property value, else false.
  7472. *
  7473. * If an object is provided for predicate the created _.matches style callback returns
  7474. * true for elements that have the properties of the given object, else false.
  7475. *
  7476. * @param collection The collection to iterate over.
  7477. * @param callback The function called per iteration.
  7478. * @param thisArg The this binding of predicate.
  7479. * @return Returns the array of grouped elements.
  7480. */
  7481. partition<T>(
  7482. collection: List<T>,
  7483. callback: ListIterator<T, boolean>,
  7484. thisArg?: any): T[][];
  7485. /**
  7486. * @see _.partition
  7487. */
  7488. partition<T>(
  7489. collection: Dictionary<T>,
  7490. callback: DictionaryIterator<T, boolean>,
  7491. thisArg?: any): T[][];
  7492. /**
  7493. * @see _.partition
  7494. */
  7495. partition<W, T>(
  7496. collection: List<T>,
  7497. whereValue: W): T[][];
  7498. /**
  7499. * @see _.partition
  7500. */
  7501. partition<W, T>(
  7502. collection: Dictionary<T>,
  7503. whereValue: W): T[][];
  7504. /**
  7505. * @see _.partition
  7506. */
  7507. partition<T>(
  7508. collection: List<T>,
  7509. path: string,
  7510. srcValue: any): T[][];
  7511. /**
  7512. * @see _.partition
  7513. */
  7514. partition<T>(
  7515. collection: Dictionary<T>,
  7516. path: string,
  7517. srcValue: any): T[][];
  7518. /**
  7519. * @see _.partition
  7520. */
  7521. partition<T>(
  7522. collection: List<T>,
  7523. pluckValue: string): T[][];
  7524. /**
  7525. * @see _.partition
  7526. */
  7527. partition<T>(
  7528. collection: Dictionary<T>,
  7529. pluckValue: string): T[][];
  7530. }
  7531. interface LoDashImplicitStringWrapper {
  7532. /**
  7533. * @see _.partition
  7534. */
  7535. partition(
  7536. callback: ListIterator<string, boolean>,
  7537. thisArg?: any): LoDashImplicitArrayWrapper<string[]>;
  7538. }
  7539. interface LoDashImplicitArrayWrapper<T> {
  7540. /**
  7541. * @see _.partition
  7542. */
  7543. partition(
  7544. callback: ListIterator<T, boolean>,
  7545. thisArg?: any): LoDashImplicitArrayWrapper<T[]>;
  7546. /**
  7547. * @see _.partition
  7548. */
  7549. partition<W>(
  7550. whereValue: W): LoDashImplicitArrayWrapper<T[]>;
  7551. /**
  7552. * @see _.partition
  7553. */
  7554. partition(
  7555. path: string,
  7556. srcValue: any): LoDashImplicitArrayWrapper<T[]>;
  7557. /**
  7558. * @see _.partition
  7559. */
  7560. partition(
  7561. pluckValue: string): LoDashImplicitArrayWrapper<T[]>;
  7562. }
  7563. interface LoDashImplicitObjectWrapper<T> {
  7564. /**
  7565. * @see _.partition
  7566. */
  7567. partition<TResult>(
  7568. callback: ListIterator<TResult, boolean>,
  7569. thisArg?: any): LoDashImplicitArrayWrapper<TResult[]>;
  7570. /**
  7571. * @see _.partition
  7572. */
  7573. partition<TResult>(
  7574. callback: DictionaryIterator<TResult, boolean>,
  7575. thisArg?: any): LoDashImplicitArrayWrapper<TResult[]>;
  7576. /**
  7577. * @see _.partition
  7578. */
  7579. partition<W, TResult>(
  7580. whereValue: W): LoDashImplicitArrayWrapper<TResult[]>;
  7581. /**
  7582. * @see _.partition
  7583. */
  7584. partition<TResult>(
  7585. path: string,
  7586. srcValue: any): LoDashImplicitArrayWrapper<TResult[]>;
  7587. /**
  7588. * @see _.partition
  7589. */
  7590. partition<TResult>(
  7591. pluckValue: string): LoDashImplicitArrayWrapper<TResult[]>;
  7592. }
  7593. // _.reduce
  7594. interface LoDashStatic {
  7595. /**
  7596. * Reduces a collection to a value which is the accumulated result of running each
  7597. * element in the collection through the callback, where each successive callback execution
  7598. * consumes the return value of the previous execution. If accumulator is not provided the
  7599. * first element of the collection will be used as the initial accumulator value. The callback
  7600. * is bound to thisArg and invoked with four arguments; (accumulator, value, index|key, collection).
  7601. * @param collection The collection to iterate over.
  7602. * @param callback The function called per iteration.
  7603. * @param accumulator Initial value of the accumulator.
  7604. * @param thisArg The this binding of callback.
  7605. * @return Returns the accumulated value.
  7606. */
  7607. reduce<T, TResult>(
  7608. collection: Array<T>,
  7609. callback: MemoIterator<T, TResult>,
  7610. accumulator: TResult,
  7611. thisArg?: any): TResult;
  7612. /**
  7613. * @see _.reduce
  7614. */
  7615. reduce<T, TResult>(
  7616. collection: List<T>,
  7617. callback: MemoIterator<T, TResult>,
  7618. accumulator: TResult,
  7619. thisArg?: any): TResult;
  7620. /**
  7621. * @see _.reduce
  7622. */
  7623. reduce<T, TResult>(
  7624. collection: Dictionary<T>,
  7625. callback: MemoIterator<T, TResult>,
  7626. accumulator: TResult,
  7627. thisArg?: any): TResult;
  7628. /**
  7629. * @see _.reduce
  7630. */
  7631. reduce<T, TResult>(
  7632. collection: NumericDictionary<T>,
  7633. callback: MemoIterator<T, TResult>,
  7634. accumulator: TResult,
  7635. thisArg?: any): TResult;
  7636. /**
  7637. * @see _.reduce
  7638. */
  7639. reduce<T, TResult>(
  7640. collection: Array<T>,
  7641. callback: MemoIterator<T, TResult>,
  7642. thisArg?: any): TResult;
  7643. /**
  7644. * @see _.reduce
  7645. */
  7646. reduce<T, TResult>(
  7647. collection: List<T>,
  7648. callback: MemoIterator<T, TResult>,
  7649. thisArg?: any): TResult;
  7650. /**
  7651. * @see _.reduce
  7652. */
  7653. reduce<T, TResult>(
  7654. collection: Dictionary<T>,
  7655. callback: MemoIterator<T, TResult>,
  7656. thisArg?: any): TResult;
  7657. /**
  7658. * @see _.reduce
  7659. */
  7660. reduce<T, TResult>(
  7661. collection: NumericDictionary<T>,
  7662. callback: MemoIterator<T, TResult>,
  7663. thisArg?: any): TResult;
  7664. }
  7665. interface LoDashImplicitArrayWrapper<T> {
  7666. /**
  7667. * @see _.reduce
  7668. */
  7669. reduce<TResult>(
  7670. callback: MemoIterator<T, TResult>,
  7671. accumulator: TResult,
  7672. thisArg?: any): TResult;
  7673. /**
  7674. * @see _.reduce
  7675. */
  7676. reduce<TResult>(
  7677. callback: MemoIterator<T, TResult>,
  7678. thisArg?: any): TResult;
  7679. }
  7680. interface LoDashImplicitObjectWrapper<T> {
  7681. /**
  7682. * @see _.reduce
  7683. */
  7684. reduce<TValue, TResult>(
  7685. callback: MemoIterator<TValue, TResult>,
  7686. accumulator: TResult,
  7687. thisArg?: any): TResult;
  7688. /**
  7689. * @see _.reduce
  7690. */
  7691. reduce<TValue, TResult>(
  7692. callback: MemoIterator<TValue, TResult>,
  7693. thisArg?: any): TResult;
  7694. }
  7695. // _.reduceRight
  7696. interface LoDashStatic {
  7697. /**
  7698. * This method is like _.reduce except that it iterates over elements of a collection from
  7699. * right to left.
  7700. * @param collection The collection to iterate over.
  7701. * @param callback The function called per iteration.
  7702. * @param accumulator Initial value of the accumulator.
  7703. * @param thisArg The this binding of callback.
  7704. * @return The accumulated value.
  7705. */
  7706. reduceRight<T, TResult>(
  7707. collection: Array<T>,
  7708. callback: MemoIterator<T, TResult>,
  7709. accumulator: TResult,
  7710. thisArg?: any): TResult;
  7711. /**
  7712. * @see _.reduceRight
  7713. */
  7714. reduceRight<T, TResult>(
  7715. collection: List<T>,
  7716. callback: MemoIterator<T, TResult>,
  7717. accumulator: TResult,
  7718. thisArg?: any): TResult;
  7719. /**
  7720. * @see _.reduceRight
  7721. */
  7722. reduceRight<T, TResult>(
  7723. collection: Dictionary<T>,
  7724. callback: MemoIterator<T, TResult>,
  7725. accumulator: TResult,
  7726. thisArg?: any): TResult;
  7727. /**
  7728. * @see _.reduceRight
  7729. */
  7730. reduceRight<T, TResult>(
  7731. collection: Array<T>,
  7732. callback: MemoIterator<T, TResult>,
  7733. thisArg?: any): TResult;
  7734. /**
  7735. * @see _.reduceRight
  7736. */
  7737. reduceRight<T, TResult>(
  7738. collection: List<T>,
  7739. callback: MemoIterator<T, TResult>,
  7740. thisArg?: any): TResult;
  7741. /**
  7742. * @see _.reduceRight
  7743. */
  7744. reduceRight<T, TResult>(
  7745. collection: Dictionary<T>,
  7746. callback: MemoIterator<T, TResult>,
  7747. thisArg?: any): TResult;
  7748. }
  7749. // _.reject
  7750. interface LoDashStatic {
  7751. /**
  7752. * The opposite of _.filter; this method returns the elements of collection that predicate does not return
  7753. * truthy for.
  7754. *
  7755. * @param collection The collection to iterate over.
  7756. * @param predicate The function invoked per iteration.
  7757. * @param thisArg The this binding of predicate.
  7758. * @return Returns the new filtered array.
  7759. */
  7760. reject<T>(
  7761. collection: List<T>,
  7762. predicate?: ListIterator<T, boolean>,
  7763. thisArg?: any
  7764. ): T[];
  7765. /**
  7766. * @see _.reject
  7767. */
  7768. reject<T>(
  7769. collection: Dictionary<T>,
  7770. predicate?: DictionaryIterator<T, boolean>,
  7771. thisArg?: any
  7772. ): T[];
  7773. /**
  7774. * @see _.reject
  7775. */
  7776. reject(
  7777. collection: string,
  7778. predicate?: StringIterator<boolean>,
  7779. thisArg?: any
  7780. ): string[];
  7781. /**
  7782. * @see _.reject
  7783. */
  7784. reject<T>(
  7785. collection: List<T> | Dictionary<T>,
  7786. predicate: string,
  7787. thisArg?: any
  7788. ): T[];
  7789. /**
  7790. * @see _.reject
  7791. */
  7792. reject<W extends {}, T>(
  7793. collection: List<T> | Dictionary<T>,
  7794. predicate: W
  7795. ): T[];
  7796. }
  7797. interface LoDashImplicitWrapper<T> {
  7798. /**
  7799. * @see _.reject
  7800. */
  7801. reject(
  7802. predicate?: StringIterator<boolean>,
  7803. thisArg?: any
  7804. ): LoDashImplicitArrayWrapper<string>;
  7805. }
  7806. interface LoDashImplicitArrayWrapper<T> {
  7807. /**
  7808. * @see _.reject
  7809. */
  7810. reject(
  7811. predicate: ListIterator<T, boolean>,
  7812. thisArg?: any
  7813. ): LoDashImplicitArrayWrapper<T>;
  7814. /**
  7815. * @see _.reject
  7816. */
  7817. reject(
  7818. predicate: string,
  7819. thisArg?: any
  7820. ): LoDashImplicitArrayWrapper<T>;
  7821. /**
  7822. * @see _.reject
  7823. */
  7824. reject<W>(predicate: W): LoDashImplicitArrayWrapper<T>;
  7825. }
  7826. interface LoDashImplicitObjectWrapper<T> {
  7827. /**
  7828. * @see _.reject
  7829. */
  7830. reject<T>(
  7831. predicate: ListIterator<T, boolean> | DictionaryIterator<T, boolean>,
  7832. thisArg?: any
  7833. ): LoDashImplicitArrayWrapper<T>;
  7834. /**
  7835. * @see _.reject
  7836. */
  7837. reject<T>(
  7838. predicate: string,
  7839. thisArg?: any
  7840. ): LoDashImplicitArrayWrapper<T>;
  7841. /**
  7842. * @see _.reject
  7843. */
  7844. reject<W, T>(predicate: W): LoDashImplicitArrayWrapper<T>;
  7845. }
  7846. interface LoDashExplicitWrapper<T> {
  7847. /**
  7848. * @see _.reject
  7849. */
  7850. reject(
  7851. predicate?: StringIterator<boolean>,
  7852. thisArg?: any
  7853. ): LoDashExplicitArrayWrapper<string>;
  7854. }
  7855. interface LoDashExplicitArrayWrapper<T> {
  7856. /**
  7857. * @see _.reject
  7858. */
  7859. reject(
  7860. predicate: ListIterator<T, boolean>,
  7861. thisArg?: any
  7862. ): LoDashExplicitArrayWrapper<T>;
  7863. /**
  7864. * @see _.reject
  7865. */
  7866. reject(
  7867. predicate: string,
  7868. thisArg?: any
  7869. ): LoDashExplicitArrayWrapper<T>;
  7870. /**
  7871. * @see _.reject
  7872. */
  7873. reject<W>(predicate: W): LoDashExplicitArrayWrapper<T>;
  7874. }
  7875. interface LoDashExplicitObjectWrapper<T> {
  7876. /**
  7877. * @see _.reject
  7878. */
  7879. reject<T>(
  7880. predicate: ListIterator<T, boolean> | DictionaryIterator<T, boolean>,
  7881. thisArg?: any
  7882. ): LoDashExplicitArrayWrapper<T>;
  7883. /**
  7884. * @see _.reject
  7885. */
  7886. reject<T>(
  7887. predicate: string,
  7888. thisArg?: any
  7889. ): LoDashExplicitArrayWrapper<T>;
  7890. /**
  7891. * @see _.reject
  7892. */
  7893. reject<W, T>(predicate: W): LoDashExplicitArrayWrapper<T>;
  7894. }
  7895. // _.sample
  7896. interface LoDashStatic {
  7897. /**
  7898. * Gets a random element from `collection`.
  7899. *
  7900. * @static
  7901. * @memberOf _
  7902. * @category Collection
  7903. * @param {Array|Object} collection The collection to sample.
  7904. * @returns {*} Returns the random element.
  7905. * @example
  7906. *
  7907. * _.sample([1, 2, 3, 4]);
  7908. * // => 2
  7909. */
  7910. sample<T>(collection: Array<T>): T;
  7911. /**
  7912. * @see _.sample
  7913. */
  7914. sample<T>(collection: List<T>): T;
  7915. /**
  7916. * @see _.sample
  7917. */
  7918. sample<T>(collection: Dictionary<T>): T;
  7919. }
  7920. interface LoDashImplicitArrayWrapper<T> {
  7921. /**
  7922. * @see _.sample
  7923. */
  7924. sample(): LoDashImplicitWrapper<T>;
  7925. }
  7926. // _.sampleSize
  7927. interface LoDashStatic {
  7928. /**
  7929. * Gets `n` random elements from `collection`.
  7930. *
  7931. * @static
  7932. * @memberOf _
  7933. * @category Collection
  7934. * @param {Array|Object} collection The collection to sample.
  7935. * @param {number} [n=0] The number of elements to sample.
  7936. * @returns {Array} Returns the random elements.
  7937. * @example
  7938. *
  7939. * _.sampleSize([1, 2, 3, 4], 2);
  7940. * // => [3, 1]
  7941. */
  7942. sampleSize<T>(collection: Array<T>, n: number): T[];
  7943. /**
  7944. * @see _.sampleSize
  7945. */
  7946. sampleSize<T>(collection: List<T>, n: number): T[];
  7947. /**
  7948. * @see _.sampleSize
  7949. */
  7950. sampleSize<T>(collection: Dictionary<T>, n: number): T[];
  7951. }
  7952. interface LoDashImplicitArrayWrapper<T> {
  7953. /**
  7954. * @see _.sampleSize
  7955. */
  7956. sampleSize(n: number): LoDashImplicitArrayWrapper<T>;
  7957. /**
  7958. * @see _.sampleSize
  7959. */
  7960. sampleSize(): LoDashImplicitWrapper<T>;
  7961. }
  7962. // _.shuffle
  7963. interface LoDashStatic {
  7964. /**
  7965. * Creates an array of shuffled values, using a version of the Fisher-Yates shuffle.
  7966. *
  7967. * @param collection The collection to shuffle.
  7968. * @return Returns the new shuffled array.
  7969. */
  7970. shuffle<T>(collection: List<T> | Dictionary<T>): T[];
  7971. /**
  7972. * @see _.shuffle
  7973. */
  7974. shuffle(collection: string): string[];
  7975. }
  7976. interface LoDashImplicitWrapper<T> {
  7977. /**
  7978. * @see _.shuffle
  7979. */
  7980. shuffle(): LoDashImplicitArrayWrapper<string>;
  7981. }
  7982. interface LoDashImplicitArrayWrapper<T> {
  7983. /**
  7984. * @see _.shuffle
  7985. */
  7986. shuffle(): LoDashImplicitArrayWrapper<T>;
  7987. }
  7988. interface LoDashImplicitObjectWrapper<T> {
  7989. /**
  7990. * @see _.shuffle
  7991. */
  7992. shuffle<T>(): LoDashImplicitArrayWrapper<T>;
  7993. }
  7994. interface LoDashExplicitWrapper<T> {
  7995. /**
  7996. * @see _.shuffle
  7997. */
  7998. shuffle(): LoDashExplicitArrayWrapper<string>;
  7999. }
  8000. interface LoDashExplicitArrayWrapper<T> {
  8001. /**
  8002. * @see _.shuffle
  8003. */
  8004. shuffle(): LoDashExplicitArrayWrapper<T>;
  8005. }
  8006. interface LoDashExplicitObjectWrapper<T> {
  8007. /**
  8008. * @see _.shuffle
  8009. */
  8010. shuffle<T>(): LoDashExplicitArrayWrapper<T>;
  8011. }
  8012. // _.size
  8013. interface LoDashStatic {
  8014. /**
  8015. * Gets the size of collection by returning its length for array-like values or the number of own enumerable
  8016. * properties for objects.
  8017. *
  8018. * @param collection The collection to inspect.
  8019. * @return Returns the size of collection.
  8020. */
  8021. size<T>(collection: List<T> | Dictionary<T>): number;
  8022. /**
  8023. * @see _.size
  8024. */
  8025. size(collection: string): number;
  8026. }
  8027. interface LoDashImplicitWrapper<T> {
  8028. /**
  8029. * @see _.size
  8030. */
  8031. size(): number;
  8032. }
  8033. interface LoDashImplicitArrayWrapper<T> {
  8034. /**
  8035. * @see _.size
  8036. */
  8037. size(): number;
  8038. }
  8039. interface LoDashImplicitObjectWrapper<T> {
  8040. /**
  8041. * @see _.size
  8042. */
  8043. size(): number;
  8044. }
  8045. interface LoDashExplicitWrapper<T> {
  8046. /**
  8047. * @see _.size
  8048. */
  8049. size(): LoDashExplicitWrapper<number>;
  8050. }
  8051. interface LoDashExplicitArrayWrapper<T> {
  8052. /**
  8053. * @see _.size
  8054. */
  8055. size(): LoDashExplicitWrapper<number>;
  8056. }
  8057. interface LoDashExplicitObjectWrapper<T> {
  8058. /**
  8059. * @see _.size
  8060. */
  8061. size(): LoDashExplicitWrapper<number>;
  8062. }
  8063. // _.some
  8064. interface LoDashStatic {
  8065. /**
  8066. * Checks if predicate returns truthy for any element of collection. Iteration is stopped once predicate
  8067. * returns truthy. The predicate is invoked with three arguments: (value, index|key, collection).
  8068. *
  8069. * @param collection The collection to iterate over.
  8070. * @param predicate The function invoked per iteration.
  8071. * @return Returns true if any element passes the predicate check, else false.
  8072. */
  8073. some<T>(
  8074. collection: List<T>,
  8075. predicate?: ListIterator<T, boolean>
  8076. ): boolean;
  8077. /**
  8078. * @see _.some
  8079. */
  8080. some<T>(
  8081. collection: Dictionary<T>,
  8082. predicate?: DictionaryIterator<T, boolean>
  8083. ): boolean;
  8084. /**
  8085. * @see _.some
  8086. */
  8087. some<T>(
  8088. collection: NumericDictionary<T>,
  8089. predicate?: NumericDictionaryIterator<T, boolean>
  8090. ): boolean;
  8091. /**
  8092. * @see _.some
  8093. */
  8094. some<T>(
  8095. collection: List<T> | Dictionary<T> | NumericDictionary<T>,
  8096. predicate?: string | any[]
  8097. ): boolean;
  8098. /**
  8099. * @see _.some
  8100. */
  8101. some<TObject extends {}, T>(
  8102. collection: List<T> | Dictionary<T> | NumericDictionary<T>,
  8103. predicate?: TObject
  8104. ): boolean;
  8105. }
  8106. interface LoDashImplicitArrayWrapper<T> {
  8107. /**
  8108. * @see _.some
  8109. */
  8110. some(
  8111. predicate?: ListIterator<T, boolean> | NumericDictionaryIterator<T, boolean>
  8112. ): boolean;
  8113. /**
  8114. * @see _.some
  8115. */
  8116. some(
  8117. predicate?: string | any[]
  8118. ): boolean;
  8119. /**
  8120. * @see _.some
  8121. */
  8122. some<TObject extends {}>(
  8123. predicate?: TObject
  8124. ): boolean;
  8125. }
  8126. interface LoDashImplicitObjectWrapper<T> {
  8127. /**
  8128. * @see _.some
  8129. */
  8130. some<TResult>(
  8131. predicate?: ListIterator<TResult, boolean> | DictionaryIterator<TResult, boolean> | NumericDictionaryIterator<T, boolean>
  8132. ): boolean;
  8133. /**
  8134. * @see _.some
  8135. */
  8136. some(
  8137. predicate?: string | any[]
  8138. ): boolean;
  8139. /**
  8140. * @see _.some
  8141. */
  8142. some<TObject extends {}>(
  8143. predicate?: TObject
  8144. ): boolean;
  8145. }
  8146. interface LoDashExplicitArrayWrapper<T> {
  8147. /**
  8148. * @see _.some
  8149. */
  8150. some(
  8151. predicate?: ListIterator<T, boolean> | NumericDictionaryIterator<T, boolean>
  8152. ): LoDashExplicitWrapper<boolean>;
  8153. /**
  8154. * @see _.some
  8155. */
  8156. some(
  8157. predicate?: string | any[]
  8158. ): LoDashExplicitWrapper<boolean>;
  8159. /**
  8160. * @see _.some
  8161. */
  8162. some<TObject extends {}>(
  8163. predicate?: TObject
  8164. ): LoDashExplicitWrapper<boolean>;
  8165. }
  8166. interface LoDashExplicitObjectWrapper<T> {
  8167. /**
  8168. * @see _.some
  8169. */
  8170. some<TResult>(
  8171. predicate?: ListIterator<TResult, boolean> | DictionaryIterator<TResult, boolean> | NumericDictionaryIterator<T, boolean>
  8172. ): LoDashExplicitWrapper<boolean>;
  8173. /**
  8174. * @see _.some
  8175. */
  8176. some(
  8177. predicate?: string | any[]
  8178. ): LoDashExplicitWrapper<boolean>;
  8179. /**
  8180. * @see _.some
  8181. */
  8182. some<TObject extends {}>(
  8183. predicate?: TObject
  8184. ): LoDashExplicitWrapper<boolean>;
  8185. }
  8186. // _.sortBy
  8187. interface LoDashStatic {
  8188. /**
  8189. * Creates an array of elements, sorted in ascending order by the results of
  8190. * running each element in a collection through each iteratee. This method
  8191. * performs a stable sort, that is, it preserves the original sort order of
  8192. * equal elements. The iteratees are invoked with one argument: (value).
  8193. *
  8194. * @static
  8195. * @memberOf _
  8196. * @category Collection
  8197. * @param {Array|Object} collection The collection to iterate over.
  8198. * @param {...(Function|Function[]|Object|Object[]|string|string[])} [iteratees=[_.identity]]
  8199. * The iteratees to sort by, specified individually or in arrays.
  8200. * @returns {Array} Returns the new sorted array.
  8201. * @example
  8202. *
  8203. * var users = [
  8204. * { 'user': 'fred', 'age': 48 },
  8205. * { 'user': 'barney', 'age': 36 },
  8206. * { 'user': 'fred', 'age': 42 },
  8207. * { 'user': 'barney', 'age': 34 }
  8208. * ];
  8209. *
  8210. * _.sortBy(users, function(o) { return o.user; });
  8211. * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 42]]
  8212. *
  8213. * _.sortBy(users, ['user', 'age']);
  8214. * // => objects for [['barney', 34], ['barney', 36], ['fred', 42], ['fred', 48]]
  8215. *
  8216. * _.sortBy(users, 'user', function(o) {
  8217. * return Math.floor(o.age / 10);
  8218. * });
  8219. * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 42]]
  8220. */
  8221. sortBy<T, TSort>(
  8222. collection: List<T>,
  8223. iteratee?: ListIterator<T, TSort>
  8224. ): T[];
  8225. /**
  8226. * @see _.sortBy
  8227. */
  8228. sortBy<T, TSort>(
  8229. collection: Dictionary<T>,
  8230. iteratee?: DictionaryIterator<T, TSort>
  8231. ): T[];
  8232. /**
  8233. * @see _.sortBy
  8234. */
  8235. sortBy<T>(
  8236. collection: List<T> | Dictionary<T>,
  8237. iteratee: string
  8238. ): T[];
  8239. /**
  8240. * @see _.sortBy
  8241. */
  8242. sortBy<W extends {}, T>(
  8243. collection: List<T> | Dictionary<T>,
  8244. whereValue: W
  8245. ): T[];
  8246. /**
  8247. * @see _.sortBy
  8248. */
  8249. sortBy<T>(
  8250. collection: List<T> | Dictionary<T>
  8251. ): T[];
  8252. /**
  8253. * @see _.sortBy
  8254. */
  8255. sortBy<T>(
  8256. collection: (Array<T> | List<T>),
  8257. iteratees: (ListIterator<T, any> | string | Object)[]): T[];
  8258. /**
  8259. * @see _.sortBy
  8260. */
  8261. sortBy<T>(
  8262. collection: (Array<T> | List<T>),
  8263. ...iteratees: (ListIterator<T, boolean> | Object | string)[]): T[];
  8264. }
  8265. interface LoDashImplicitArrayWrapper<T> {
  8266. /**
  8267. * @see _.sortBy
  8268. */
  8269. sortBy<TSort>(
  8270. iteratee?: ListIterator<T, TSort>
  8271. ): LoDashImplicitArrayWrapper<T>;
  8272. /**
  8273. * @see _.sortBy
  8274. */
  8275. sortBy(iteratee: string): LoDashImplicitArrayWrapper<T>;
  8276. /**
  8277. * @see _.sortBy
  8278. */
  8279. sortBy<W extends {}>(whereValue: W): LoDashImplicitArrayWrapper<T>;
  8280. /**
  8281. * @see _.sortBy
  8282. */
  8283. sortBy(): LoDashImplicitArrayWrapper<T>;
  8284. /**
  8285. * @see _.sortBy
  8286. */
  8287. sortBy(...iteratees: (ListIterator<T, boolean> | Object | string)[]): LoDashImplicitArrayWrapper<T>;
  8288. /**
  8289. * @see _.sortBy
  8290. */
  8291. sortBy(iteratees: (ListIterator<T, any> | string | Object)[]): LoDashImplicitArrayWrapper<T>;
  8292. }
  8293. interface LoDashImplicitObjectWrapper<T> {
  8294. /**
  8295. * @see _.sortBy
  8296. */
  8297. sortBy<T, TSort>(
  8298. iteratee?: ListIterator<T, TSort> | DictionaryIterator<T, TSort>
  8299. ): LoDashImplicitArrayWrapper<T>;
  8300. /**
  8301. * @see _.sortBy
  8302. */
  8303. sortBy<T>(iteratee: string): LoDashImplicitArrayWrapper<T>;
  8304. /**
  8305. * @see _.sortBy
  8306. */
  8307. sortBy<W extends {}, T>(whereValue: W): LoDashImplicitArrayWrapper<T>;
  8308. /**
  8309. * @see _.sortBy
  8310. */
  8311. sortBy<T>(): LoDashImplicitArrayWrapper<T>;
  8312. }
  8313. interface LoDashExplicitArrayWrapper<T> {
  8314. /**
  8315. * @see _.sortBy
  8316. */
  8317. sortBy<TSort>(
  8318. iteratee?: ListIterator<T, TSort>
  8319. ): LoDashExplicitArrayWrapper<T>;
  8320. /**
  8321. * @see _.sortBy
  8322. */
  8323. sortBy(iteratee: string): LoDashExplicitArrayWrapper<T>;
  8324. /**
  8325. * @see _.sortBy
  8326. */
  8327. sortBy<W extends {}>(whereValue: W): LoDashExplicitArrayWrapper<T>;
  8328. /**
  8329. * @see _.sortBy
  8330. */
  8331. sortBy(): LoDashExplicitArrayWrapper<T>;
  8332. }
  8333. interface LoDashExplicitObjectWrapper<T> {
  8334. /**
  8335. * @see _.sortBy
  8336. */
  8337. sortBy<T, TSort>(
  8338. iteratee?: ListIterator<T, TSort> | DictionaryIterator<T, TSort>
  8339. ): LoDashExplicitArrayWrapper<T>;
  8340. /**
  8341. * @see _.sortBy
  8342. */
  8343. sortBy<T>(iteratee: string): LoDashExplicitArrayWrapper<T>;
  8344. /**
  8345. * @see _.sortBy
  8346. */
  8347. sortBy<W extends {}, T>(whereValue: W): LoDashExplicitArrayWrapper<T>;
  8348. /**
  8349. * @see _.sortBy
  8350. */
  8351. sortBy<T>(): LoDashExplicitArrayWrapper<T>;
  8352. }
  8353. // _.orderBy
  8354. interface LoDashStatic {
  8355. /**
  8356. * This method is like `_.sortBy` except that it allows specifying the sort
  8357. * orders of the iteratees to sort by. If `orders` is unspecified, all values
  8358. * are sorted in ascending order. Otherwise, specify an order of "desc" for
  8359. * descending or "asc" for ascending sort order of corresponding values.
  8360. *
  8361. * @static
  8362. * @memberOf _
  8363. * @category Collection
  8364. * @param {Array|Object} collection The collection to iterate over.
  8365. * @param {Function[]|Object[]|string[]} [iteratees=[_.identity]] The iteratees to sort by.
  8366. * @param {string[]} [orders] The sort orders of `iteratees`.
  8367. * @param- {Object} [guard] Enables use as an iteratee for functions like `_.reduce`.
  8368. * @returns {Array} Returns the new sorted array.
  8369. * @example
  8370. *
  8371. * var users = [
  8372. * { 'user': 'fred', 'age': 48 },
  8373. * { 'user': 'barney', 'age': 34 },
  8374. * { 'user': 'fred', 'age': 42 },
  8375. * { 'user': 'barney', 'age': 36 }
  8376. * ];
  8377. *
  8378. * // sort by `user` in ascending order and by `age` in descending order
  8379. * _.orderBy(users, ['user', 'age'], ['asc', 'desc']);
  8380. * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 42]]
  8381. */
  8382. orderBy<W extends Object, T>(
  8383. collection: List<T>,
  8384. iteratees: ListIterator<T, any> | string | W | (ListIterator<T, any> | string | W)[],
  8385. orders?: boolean | string | (boolean | string)[]
  8386. ): T[];
  8387. /**
  8388. * @see _.orderBy
  8389. */
  8390. orderBy<T>(
  8391. collection: List<T>,
  8392. iteratees: ListIterator<T, any> | string | Object | (ListIterator<T, any> | string | Object)[],
  8393. orders?: boolean | string | (boolean | string)[]
  8394. ): T[];
  8395. /**
  8396. * @see _.orderBy
  8397. */
  8398. orderBy<W extends Object, T>(
  8399. collection: NumericDictionary<T>,
  8400. iteratees: NumericDictionaryIterator<T, any> | string | W | (NumericDictionaryIterator<T, any> | string | W)[],
  8401. orders?: boolean | string | (boolean | string)[]
  8402. ): T[];
  8403. /**
  8404. * @see _.orderBy
  8405. */
  8406. orderBy<T>(
  8407. collection: NumericDictionary<T>,
  8408. iteratees: NumericDictionaryIterator<T, any> | string | Object | (NumericDictionaryIterator<T, any> | string | Object)[],
  8409. orders?: boolean | string | (boolean | string)[]
  8410. ): T[];
  8411. /**
  8412. * @see _.orderBy
  8413. */
  8414. orderBy<W extends Object, T>(
  8415. collection: Dictionary<T>,
  8416. iteratees: DictionaryIterator<T, any> | string | W | (DictionaryIterator<T, any> | string | W)[],
  8417. orders?: boolean | string | (boolean | string)[]
  8418. ): T[];
  8419. /**
  8420. * @see _.orderBy
  8421. */
  8422. orderBy<T>(
  8423. collection: Dictionary<T>,
  8424. iteratees: DictionaryIterator<T, any> | string | Object | (DictionaryIterator<T, any> | string | Object)[],
  8425. orders?: boolean | string | (boolean | string)[]
  8426. ): T[];
  8427. }
  8428. interface LoDashImplicitWrapper<T> {
  8429. /**
  8430. * @see _.orderBy
  8431. */
  8432. orderBy(
  8433. iteratees: ListIterator<T, any> | string | (ListIterator<T, any> | string)[],
  8434. orders?: boolean | string | (boolean | string)[]
  8435. ): LoDashImplicitArrayWrapper<T>;
  8436. }
  8437. interface LoDashImplicitArrayWrapper<T> {
  8438. /**
  8439. * @see _.orderBy
  8440. */
  8441. orderBy<W extends Object>(
  8442. iteratees: ListIterator<T, any> | string | W | (ListIterator<T, any> | string | W)[],
  8443. orders?: boolean | string | (boolean | string)[]
  8444. ): LoDashImplicitArrayWrapper<T>;
  8445. }
  8446. interface LoDashImplicitObjectWrapper<T> {
  8447. /**
  8448. * @see _.orderBy
  8449. */
  8450. orderBy<W extends Object, T>(
  8451. iteratees: ListIterator<T, any> | string | W | (ListIterator<T, any> | string | W)[],
  8452. orders?: boolean | string | (boolean | string)[]
  8453. ): LoDashImplicitArrayWrapper<T>;
  8454. /**
  8455. * @see _.orderBy
  8456. */
  8457. orderBy<T>(
  8458. iteratees: ListIterator<T, any> | string | Object | (ListIterator<T, any> | string | Object)[],
  8459. orders?: boolean | string | (boolean | string)[]
  8460. ): LoDashImplicitArrayWrapper<T>;
  8461. /**
  8462. * @see _.orderBy
  8463. */
  8464. orderBy<W extends Object, T>(
  8465. iteratees: NumericDictionaryIterator<T, any> | string | W | (NumericDictionaryIterator<T, any> | string | W)[],
  8466. orders?: boolean | string | (boolean | string)[]
  8467. ): LoDashImplicitArrayWrapper<T>;
  8468. /**
  8469. * @see _.orderBy
  8470. */
  8471. orderBy<T>(
  8472. iteratees: NumericDictionaryIterator<T, any> | string | Object | (NumericDictionaryIterator<T, any> | string | Object)[],
  8473. orders?: boolean | string | (boolean | string)[]
  8474. ): LoDashImplicitArrayWrapper<T>;
  8475. /**
  8476. * @see _.orderBy
  8477. */
  8478. orderBy<W extends Object, T>(
  8479. iteratees: DictionaryIterator<T, any> | string | W | (DictionaryIterator<T, any> | string | W)[],
  8480. orders?: boolean | string | (boolean | string)[]
  8481. ): LoDashImplicitArrayWrapper<T>;
  8482. /**
  8483. * @see _.orderBy
  8484. */
  8485. orderBy<T>(
  8486. iteratees: DictionaryIterator<T, any> | string | Object | (DictionaryIterator<T, any> | string | Object)[],
  8487. orders?: boolean | string | (boolean | string)[]
  8488. ): LoDashImplicitArrayWrapper<T>;
  8489. }
  8490. interface LoDashExplicitWrapper<T> {
  8491. /**
  8492. * @see _.orderBy
  8493. */
  8494. orderBy(
  8495. iteratees: ListIterator<T, any> | string | (ListIterator<T, any> | string)[],
  8496. orders?: boolean | string | (boolean | string)[]
  8497. ): LoDashExplicitArrayWrapper<T>;
  8498. }
  8499. interface LoDashExplicitArrayWrapper<T> {
  8500. /**
  8501. * @see _.orderBy
  8502. */
  8503. orderBy<W extends Object>(
  8504. iteratees: ListIterator<T, any> | string | W | (ListIterator<T, any> | string | W)[],
  8505. orders?: boolean | string | (boolean | string)[]
  8506. ): LoDashExplicitArrayWrapper<T>;
  8507. }
  8508. interface LoDashExplicitObjectWrapper<T> {
  8509. /**
  8510. * @see _.orderBy
  8511. */
  8512. orderBy<W extends Object, T>(
  8513. iteratees: ListIterator<T, any> | string | W | (ListIterator<T, any> | string | W)[],
  8514. orders?: boolean | string | (boolean | string)[]
  8515. ): LoDashExplicitArrayWrapper<T>;
  8516. /**
  8517. * @see _.orderBy
  8518. */
  8519. orderBy<T>(
  8520. iteratees: ListIterator<T, any> | string | Object | (ListIterator<T, any> | string | Object)[],
  8521. orders?: boolean | string | (boolean | string)[]
  8522. ): LoDashExplicitArrayWrapper<T>;
  8523. /**
  8524. * @see _.orderBy
  8525. */
  8526. orderBy<W extends Object, T>(
  8527. iteratees: NumericDictionaryIterator<T, any> | string | W | (NumericDictionaryIterator<T, any> | string | W)[],
  8528. orders?: boolean | string | (boolean | string)[]
  8529. ): LoDashExplicitArrayWrapper<T>;
  8530. /**
  8531. * @see _.orderBy
  8532. */
  8533. orderBy<T>(
  8534. iteratees: NumericDictionaryIterator<T, any> | string | Object | (NumericDictionaryIterator<T, any> | string | Object)[],
  8535. orders?: boolean | string | (boolean | string)[]
  8536. ): LoDashExplicitArrayWrapper<T>;
  8537. /**
  8538. * @see _.orderBy
  8539. */
  8540. orderBy<W extends Object, T>(
  8541. iteratees: DictionaryIterator<T, any> | string | W | (DictionaryIterator<T, any> | string | W)[],
  8542. orders?: boolean | string | (boolean | string)[]
  8543. ): LoDashExplicitArrayWrapper<T>;
  8544. /**
  8545. * @see _.orderBy
  8546. */
  8547. orderBy<T>(
  8548. iteratees: DictionaryIterator<T, any> | string | Object | (DictionaryIterator<T, any> | string | Object)[],
  8549. orders?: boolean | string | (boolean | string)[]
  8550. ): LoDashExplicitArrayWrapper<T>;
  8551. }
  8552. /********
  8553. * Date *
  8554. *******/
  8555. // _.now
  8556. interface LoDashStatic {
  8557. /**
  8558. * Gets the number of milliseconds that have elapsed since the Unix epoch (1 January 1970 00:00:00 UTC).
  8559. *
  8560. * @return The number of milliseconds.
  8561. */
  8562. now(): number;
  8563. }
  8564. interface LoDashImplicitWrapperBase<T, TWrapper> {
  8565. /**
  8566. * @see _.now
  8567. */
  8568. now(): number;
  8569. }
  8570. interface LoDashExplicitWrapperBase<T, TWrapper> {
  8571. /**
  8572. * @see _.now
  8573. */
  8574. now(): LoDashExplicitWrapper<number>;
  8575. }
  8576. /*************
  8577. * Functions *
  8578. ************/
  8579. // _.after
  8580. interface LoDashStatic {
  8581. /**
  8582. * The opposite of _.before; this method creates a function that invokes func once its called n or more times.
  8583. *
  8584. * @param n The number of calls before func is invoked.
  8585. * @param func The function to restrict.
  8586. * @return Returns the new restricted function.
  8587. */
  8588. after<TFunc extends Function>(
  8589. n: number,
  8590. func: TFunc
  8591. ): TFunc;
  8592. }
  8593. interface LoDashImplicitWrapper<T> {
  8594. /**
  8595. * @see _.after
  8596. */
  8597. after<TFunc extends Function>(func: TFunc): LoDashImplicitObjectWrapper<TFunc>;
  8598. }
  8599. interface LoDashExplicitWrapper<T> {
  8600. /**
  8601. * @see _.after
  8602. */
  8603. after<TFunc extends Function>(func: TFunc): LoDashExplicitObjectWrapper<TFunc>;
  8604. }
  8605. // _.ary
  8606. interface LoDashStatic {
  8607. /**
  8608. * Creates a function that accepts up to n arguments ignoring any additional arguments.
  8609. *
  8610. * @param func The function to cap arguments for.
  8611. * @param n The arity cap.
  8612. * @returns Returns the new function.
  8613. */
  8614. ary<TResult extends Function>(
  8615. func: Function,
  8616. n?: number
  8617. ): TResult;
  8618. ary<T extends Function, TResult extends Function>(
  8619. func: T,
  8620. n?: number
  8621. ): TResult;
  8622. }
  8623. interface LoDashImplicitObjectWrapper<T> {
  8624. /**
  8625. * @see _.ary
  8626. */
  8627. ary<TResult extends Function>(n?: number): LoDashImplicitObjectWrapper<TResult>;
  8628. }
  8629. interface LoDashExplicitObjectWrapper<T> {
  8630. /**
  8631. * @see _.ary
  8632. */
  8633. ary<TResult extends Function>(n?: number): LoDashExplicitObjectWrapper<TResult>;
  8634. }
  8635. // _.before
  8636. interface LoDashStatic {
  8637. /**
  8638. * Creates a function that invokes func, with the this binding and arguments of the created function, while
  8639. * its called less than n times. Subsequent calls to the created function return the result of the last func
  8640. * invocation.
  8641. *
  8642. * @param n The number of calls at which func is no longer invoked.
  8643. * @param func The function to restrict.
  8644. * @return Returns the new restricted function.
  8645. */
  8646. before<TFunc extends Function>(
  8647. n: number,
  8648. func: TFunc
  8649. ): TFunc;
  8650. }
  8651. interface LoDashImplicitWrapper<T> {
  8652. /**
  8653. * @see _.before
  8654. */
  8655. before<TFunc extends Function>(func: TFunc): LoDashImplicitObjectWrapper<TFunc>;
  8656. }
  8657. interface LoDashExplicitWrapper<T> {
  8658. /**
  8659. * @see _.before
  8660. */
  8661. before<TFunc extends Function>(func: TFunc): LoDashExplicitObjectWrapper<TFunc>;
  8662. }
  8663. // _.bind
  8664. interface FunctionBind {
  8665. placeholder: any;
  8666. <T extends Function, TResult extends Function>(
  8667. func: T,
  8668. thisArg: any,
  8669. ...partials: any[]
  8670. ): TResult;
  8671. <TResult extends Function>(
  8672. func: Function,
  8673. thisArg: any,
  8674. ...partials: any[]
  8675. ): TResult;
  8676. }
  8677. interface LoDashStatic {
  8678. /**
  8679. * Creates a function that invokes func with the this binding of thisArg and prepends any additional _.bind
  8680. * arguments to those provided to the bound function.
  8681. *
  8682. * The _.bind.placeholder value, which defaults to _ in monolithic builds, may be used as a placeholder for
  8683. * partially applied arguments.
  8684. *
  8685. * Note: Unlike native Function#bind this method does not set the "length" property of bound functions.
  8686. *
  8687. * @param func The function to bind.
  8688. * @param thisArg The this binding of func.
  8689. * @param partials The arguments to be partially applied.
  8690. * @return Returns the new bound function.
  8691. */
  8692. bind: FunctionBind;
  8693. }
  8694. interface LoDashImplicitObjectWrapper<T> {
  8695. /**
  8696. * @see _.bind
  8697. */
  8698. bind<TResult extends Function>(
  8699. thisArg: any,
  8700. ...partials: any[]
  8701. ): LoDashImplicitObjectWrapper<TResult>;
  8702. }
  8703. interface LoDashExplicitObjectWrapper<T> {
  8704. /**
  8705. * @see _.bind
  8706. */
  8707. bind<TResult extends Function>(
  8708. thisArg: any,
  8709. ...partials: any[]
  8710. ): LoDashExplicitObjectWrapper<TResult>;
  8711. }
  8712. // _.bindAll
  8713. interface LoDashStatic {
  8714. /**
  8715. * Binds methods of an object to the object itself, overwriting the existing method. Method names may be
  8716. * specified as individual arguments or as arrays of method names. If no method names are provided all
  8717. * enumerable function properties, own and inherited, of object are bound.
  8718. *
  8719. * Note: This method does not set the "length" property of bound functions.
  8720. *
  8721. * @param object The object to bind and assign the bound methods to.
  8722. * @param methodNames The object method names to bind, specified as individual method names or arrays of
  8723. * method names.
  8724. * @return Returns object.
  8725. */
  8726. bindAll<T>(
  8727. object: T,
  8728. ...methodNames: (string | string[])[]
  8729. ): T;
  8730. }
  8731. interface LoDashImplicitObjectWrapper<T> {
  8732. /**
  8733. * @see _.bindAll
  8734. */
  8735. bindAll(...methodNames: (string | string[])[]): LoDashImplicitObjectWrapper<T>;
  8736. }
  8737. interface LoDashExplicitObjectWrapper<T> {
  8738. /**
  8739. * @see _.bindAll
  8740. */
  8741. bindAll(...methodNames: (string | string[])[]): LoDashExplicitObjectWrapper<T>;
  8742. }
  8743. // _.bindKey
  8744. interface FunctionBindKey {
  8745. placeholder: any;
  8746. <T extends Object, TResult extends Function>(
  8747. object: T,
  8748. key: any,
  8749. ...partials: any[]
  8750. ): TResult;
  8751. <TResult extends Function>(
  8752. object: Object,
  8753. key: any,
  8754. ...partials: any[]
  8755. ): TResult;
  8756. }
  8757. interface LoDashStatic {
  8758. /**
  8759. * Creates a function that invokes the method at object[key] and prepends any additional _.bindKey arguments
  8760. * to those provided to the bound function.
  8761. *
  8762. * This method differs from _.bind by allowing bound functions to reference methods that may be redefined
  8763. * or dont yet exist. See Peter Michauxs article for more details.
  8764. *
  8765. * The _.bindKey.placeholder value, which defaults to _ in monolithic builds, may be used as a placeholder
  8766. * for partially applied arguments.
  8767. *
  8768. * @param object The object the method belongs to.
  8769. * @param key The key of the method.
  8770. * @param partials The arguments to be partially applied.
  8771. * @return Returns the new bound function.
  8772. */
  8773. bindKey: FunctionBindKey;
  8774. }
  8775. interface LoDashImplicitObjectWrapper<T> {
  8776. /**
  8777. * @see _.bindKey
  8778. */
  8779. bindKey<TResult extends Function>(
  8780. key: any,
  8781. ...partials: any[]
  8782. ): LoDashImplicitObjectWrapper<TResult>;
  8783. }
  8784. interface LoDashExplicitObjectWrapper<T> {
  8785. /**
  8786. * @see _.bindKey
  8787. */
  8788. bindKey<TResult extends Function>(
  8789. key: any,
  8790. ...partials: any[]
  8791. ): LoDashExplicitObjectWrapper<TResult>;
  8792. }
  8793. // _.createCallback
  8794. interface LoDashStatic {
  8795. /**
  8796. * Produces a callback bound to an optional thisArg. If func is a property name the created
  8797. * callback will return the property value for a given element. If func is an object the created
  8798. * callback will return true for elements that contain the equivalent object properties,
  8799. * otherwise it will return false.
  8800. * @param func The value to convert to a callback.
  8801. * @param thisArg The this binding of the created callback.
  8802. * @param argCount The number of arguments the callback accepts.
  8803. * @return A callback function.
  8804. */
  8805. createCallback(
  8806. func: string,
  8807. thisArg?: any,
  8808. argCount?: number): () => any;
  8809. /**
  8810. * @see _.createCallback
  8811. */
  8812. createCallback(
  8813. func: Dictionary<any>,
  8814. thisArg?: any,
  8815. argCount?: number): () => boolean;
  8816. }
  8817. interface LoDashImplicitWrapper<T> {
  8818. /**
  8819. * @see _.createCallback
  8820. */
  8821. createCallback(
  8822. thisArg?: any,
  8823. argCount?: number): LoDashImplicitObjectWrapper<() => any>;
  8824. }
  8825. interface LoDashImplicitObjectWrapper<T> {
  8826. /**
  8827. * @see _.createCallback
  8828. */
  8829. createCallback(
  8830. thisArg?: any,
  8831. argCount?: number): LoDashImplicitObjectWrapper<() => any>;
  8832. }
  8833. // _.curry
  8834. interface LoDashStatic {
  8835. /**
  8836. * Creates a function that accepts one or more arguments of func that when called either invokes func returning
  8837. * its result, if all func arguments have been provided, or returns a function that accepts one or more of the
  8838. * remaining func arguments, and so on. The arity of func may be specified if func.length is not sufficient.
  8839. * @param func The function to curry.
  8840. * @return Returns the new curried function.
  8841. */
  8842. curry<T1, R>(func: (t1: T1) => R):
  8843. CurriedFunction1<T1, R>;
  8844. /**
  8845. * Creates a function that accepts one or more arguments of func that when called either invokes func returning
  8846. * its result, if all func arguments have been provided, or returns a function that accepts one or more of the
  8847. * remaining func arguments, and so on. The arity of func may be specified if func.length is not sufficient.
  8848. * @param func The function to curry.
  8849. * @return Returns the new curried function.
  8850. */
  8851. curry<T1, T2, R>(func: (t1: T1, t2: T2) => R):
  8852. CurriedFunction2<T1, T2, R>;
  8853. /**
  8854. * Creates a function that accepts one or more arguments of func that when called either invokes func returning
  8855. * its result, if all func arguments have been provided, or returns a function that accepts one or more of the
  8856. * remaining func arguments, and so on. The arity of func may be specified if func.length is not sufficient.
  8857. * @param func The function to curry.
  8858. * @return Returns the new curried function.
  8859. */
  8860. curry<T1, T2, T3, R>(func: (t1: T1, t2: T2, t3: T3) => R):
  8861. CurriedFunction3<T1, T2, T3, R>;
  8862. /**
  8863. * Creates a function that accepts one or more arguments of func that when called either invokes func returning
  8864. * its result, if all func arguments have been provided, or returns a function that accepts one or more of the
  8865. * remaining func arguments, and so on. The arity of func may be specified if func.length is not sufficient.
  8866. * @param func The function to curry.
  8867. * @return Returns the new curried function.
  8868. */
  8869. curry<T1, T2, T3, T4, R>(func: (t1: T1, t2: T2, t3: T3, t4: T4) => R):
  8870. CurriedFunction4<T1, T2, T3, T4, R>;
  8871. /**
  8872. * Creates a function that accepts one or more arguments of func that when called either invokes func returning
  8873. * its result, if all func arguments have been provided, or returns a function that accepts one or more of the
  8874. * remaining func arguments, and so on. The arity of func may be specified if func.length is not sufficient.
  8875. * @param func The function to curry.
  8876. * @return Returns the new curried function.
  8877. */
  8878. curry<T1, T2, T3, T4, T5, R>(func: (t1: T1, t2: T2, t3: T3, t4: T4, t5: T5) => R):
  8879. CurriedFunction5<T1, T2, T3, T4, T5, R>;
  8880. /**
  8881. * Creates a function that accepts one or more arguments of func that when called either invokes func returning
  8882. * its result, if all func arguments have been provided, or returns a function that accepts one or more of the
  8883. * remaining func arguments, and so on. The arity of func may be specified if func.length is not sufficient.
  8884. * @param func The function to curry.
  8885. * @param arity The arity of func.
  8886. * @return Returns the new curried function.
  8887. */
  8888. curry<TResult extends Function>(
  8889. func: Function,
  8890. arity?: number): TResult;
  8891. }
  8892. interface CurriedFunction1<T1, R> {
  8893. (): CurriedFunction1<T1, R>;
  8894. (t1: T1): R;
  8895. }
  8896. interface CurriedFunction2<T1, T2, R> {
  8897. (): CurriedFunction2<T1, T2, R>;
  8898. (t1: T1): CurriedFunction1<T2, R>;
  8899. (t1: T1, t2: T2): R;
  8900. }
  8901. interface CurriedFunction3<T1, T2, T3, R> {
  8902. (): CurriedFunction3<T1, T2, T3, R>;
  8903. (t1: T1): CurriedFunction2<T2, T3, R>;
  8904. (t1: T1, t2: T2): CurriedFunction1<T3, R>;
  8905. (t1: T1, t2: T2, t3: T3): R;
  8906. }
  8907. interface CurriedFunction4<T1, T2, T3, T4, R> {
  8908. (): CurriedFunction4<T1, T2, T3, T4, R>;
  8909. (t1: T1): CurriedFunction3<T2, T3, T4, R>;
  8910. (t1: T1, t2: T2): CurriedFunction2<T3, T4, R>;
  8911. (t1: T1, t2: T2, t3: T3): CurriedFunction1<T4, R>;
  8912. (t1: T1, t2: T2, t3: T3, t4: T4): R;
  8913. }
  8914. interface CurriedFunction5<T1, T2, T3, T4, T5, R> {
  8915. (): CurriedFunction5<T1, T2, T3, T4, T5, R>;
  8916. (t1: T1): CurriedFunction4<T2, T3, T4, T5, R>;
  8917. (t1: T1, t2: T2): CurriedFunction3<T3, T4, T5, R>;
  8918. (t1: T1, t2: T2, t3: T3): CurriedFunction2<T4, T5, R>;
  8919. (t1: T1, t2: T2, t3: T3, t4: T4): CurriedFunction1<T5, R>;
  8920. (t1: T1, t2: T2, t3: T3, t4: T4, t5: T5): R;
  8921. }
  8922. interface LoDashImplicitObjectWrapper<T> {
  8923. /**
  8924. * @see _.curry
  8925. */
  8926. curry<TResult extends Function>(arity?: number): LoDashImplicitObjectWrapper<TResult>;
  8927. }
  8928. // _.curryRight
  8929. interface LoDashStatic {
  8930. /**
  8931. * This method is like _.curry except that arguments are applied to func in the manner of _.partialRight
  8932. * instead of _.partial.
  8933. * @param func The function to curry.
  8934. * @return Returns the new curried function.
  8935. */
  8936. curryRight<T1, R>(func: (t1: T1) => R):
  8937. CurriedFunction1<T1, R>;
  8938. /**
  8939. * This method is like _.curry except that arguments are applied to func in the manner of _.partialRight
  8940. * instead of _.partial.
  8941. * @param func The function to curry.
  8942. * @return Returns the new curried function.
  8943. */
  8944. curryRight<T1, T2, R>(func: (t1: T1, t2: T2) => R):
  8945. CurriedFunction2<T2, T1, R>;
  8946. /**
  8947. * This method is like _.curry except that arguments are applied to func in the manner of _.partialRight
  8948. * instead of _.partial.
  8949. * @param func The function to curry.
  8950. * @return Returns the new curried function.
  8951. */
  8952. curryRight<T1, T2, T3, R>(func: (t1: T1, t2: T2, t3: T3) => R):
  8953. CurriedFunction3<T3, T2, T1, R>;
  8954. /**
  8955. * This method is like _.curry except that arguments are applied to func in the manner of _.partialRight
  8956. * instead of _.partial.
  8957. * @param func The function to curry.
  8958. * @return Returns the new curried function.
  8959. */
  8960. curryRight<T1, T2, T3, T4, R>(func: (t1: T1, t2: T2, t3: T3, t4: T4) => R):
  8961. CurriedFunction4<T4, T3, T2, T1, R>;
  8962. /**
  8963. * This method is like _.curry except that arguments are applied to func in the manner of _.partialRight
  8964. * instead of _.partial.
  8965. * @param func The function to curry.
  8966. * @return Returns the new curried function.
  8967. */
  8968. curryRight<T1, T2, T3, T4, T5, R>(func: (t1: T1, t2: T2, t3: T3, t4: T4, t5: T5) => R):
  8969. CurriedFunction5<T5, T4, T3, T2, T1, R>;
  8970. /**
  8971. * This method is like _.curry except that arguments are applied to func in the manner of _.partialRight
  8972. * instead of _.partial.
  8973. * @param func The function to curry.
  8974. * @param arity The arity of func.
  8975. * @return Returns the new curried function.
  8976. */
  8977. curryRight<TResult extends Function>(
  8978. func: Function,
  8979. arity?: number): TResult;
  8980. }
  8981. interface LoDashImplicitObjectWrapper<T> {
  8982. /**
  8983. * @see _.curryRight
  8984. */
  8985. curryRight<TResult extends Function>(arity?: number): LoDashImplicitObjectWrapper<TResult>;
  8986. }
  8987. // _.debounce
  8988. interface DebounceSettings {
  8989. /**
  8990. * Specify invoking on the leading edge of the timeout.
  8991. */
  8992. leading?: boolean;
  8993. /**
  8994. * The maximum time func is allowed to be delayed before its invoked.
  8995. */
  8996. maxWait?: number;
  8997. /**
  8998. * Specify invoking on the trailing edge of the timeout.
  8999. */
  9000. trailing?: boolean;
  9001. }
  9002. interface LoDashStatic {
  9003. /**
  9004. * Creates a debounced function that delays invoking func until after wait milliseconds have elapsed since
  9005. * the last time the debounced function was invoked. The debounced function comes with a cancel method to
  9006. * cancel delayed invocations. Provide an options object to indicate that func should be invoked on the
  9007. * leading and/or trailing edge of the wait timeout. Subsequent calls to the debounced function return the
  9008. * result of the last func invocation.
  9009. *
  9010. * Note: If leading and trailing options are true, func is invoked on the trailing edge of the timeout only
  9011. * if the the debounced function is invoked more than once during the wait timeout.
  9012. *
  9013. * See David Corbachos article for details over the differences between _.debounce and _.throttle.
  9014. *
  9015. * @param func The function to debounce.
  9016. * @param wait The number of milliseconds to delay.
  9017. * @param options The options object.
  9018. * @param options.leading Specify invoking on the leading edge of the timeout.
  9019. * @param options.maxWait The maximum time func is allowed to be delayed before its invoked.
  9020. * @param options.trailing Specify invoking on the trailing edge of the timeout.
  9021. * @return Returns the new debounced function.
  9022. */
  9023. debounce<T extends Function>(
  9024. func: T,
  9025. wait?: number,
  9026. options?: DebounceSettings
  9027. ): T & Cancelable;
  9028. }
  9029. interface LoDashImplicitObjectWrapper<T> {
  9030. /**
  9031. * @see _.debounce
  9032. */
  9033. debounce(
  9034. wait?: number,
  9035. options?: DebounceSettings
  9036. ): LoDashImplicitObjectWrapper<T & Cancelable>;
  9037. }
  9038. interface LoDashExplicitObjectWrapper<T> {
  9039. /**
  9040. * @see _.debounce
  9041. */
  9042. debounce(
  9043. wait?: number,
  9044. options?: DebounceSettings
  9045. ): LoDashExplicitObjectWrapper<T & Cancelable>;
  9046. }
  9047. // _.defer
  9048. interface LoDashStatic {
  9049. /**
  9050. * Defers invoking the func until the current call stack has cleared. Any additional arguments are provided to
  9051. * func when its invoked.
  9052. *
  9053. * @param func The function to defer.
  9054. * @param args The arguments to invoke the function with.
  9055. * @return Returns the timer id.
  9056. */
  9057. defer<T extends Function>(
  9058. func: T,
  9059. ...args: any[]
  9060. ): number;
  9061. }
  9062. interface LoDashImplicitObjectWrapper<T> {
  9063. /**
  9064. * @see _.defer
  9065. */
  9066. defer(...args: any[]): LoDashImplicitWrapper<number>;
  9067. }
  9068. interface LoDashExplicitObjectWrapper<T> {
  9069. /**
  9070. * @see _.defer
  9071. */
  9072. defer(...args: any[]): LoDashExplicitWrapper<number>;
  9073. }
  9074. // _.delay
  9075. interface LoDashStatic {
  9076. /**
  9077. * Invokes func after wait milliseconds. Any additional arguments are provided to func when its invoked.
  9078. *
  9079. * @param func The function to delay.
  9080. * @param wait The number of milliseconds to delay invocation.
  9081. * @param args The arguments to invoke the function with.
  9082. * @return Returns the timer id.
  9083. */
  9084. delay<T extends Function>(
  9085. func: T,
  9086. wait: number,
  9087. ...args: any[]
  9088. ): number;
  9089. }
  9090. interface LoDashImplicitObjectWrapper<T> {
  9091. /**
  9092. * @see _.delay
  9093. */
  9094. delay(
  9095. wait: number,
  9096. ...args: any[]
  9097. ): LoDashImplicitWrapper<number>;
  9098. }
  9099. interface LoDashExplicitObjectWrapper<T> {
  9100. /**
  9101. * @see _.delay
  9102. */
  9103. delay(
  9104. wait: number,
  9105. ...args: any[]
  9106. ): LoDashExplicitWrapper<number>;
  9107. }
  9108. interface LoDashStatic {
  9109. /**
  9110. * Creates a function that invokes `func` with arguments reversed.
  9111. *
  9112. * @static
  9113. * @memberOf _
  9114. * @category Function
  9115. * @param {Function} func The function to flip arguments for.
  9116. * @returns {Function} Returns the new function.
  9117. * @example
  9118. *
  9119. * var flipped = _.flip(function() {
  9120. * return _.toArray(arguments);
  9121. * });
  9122. *
  9123. * flipped('a', 'b', 'c', 'd');
  9124. * // => ['d', 'c', 'b', 'a']
  9125. */
  9126. flip<T extends Function>(func: T): T;
  9127. }
  9128. interface LoDashImplicitObjectWrapper<T> {
  9129. /**
  9130. * @see _.flip
  9131. */
  9132. flip(): LoDashImplicitObjectWrapper<T>;
  9133. }
  9134. interface LoDashExplicitObjectWrapper<T> {
  9135. /**
  9136. * @see _.flip
  9137. */
  9138. flip(): LoDashExplicitObjectWrapper<T>;
  9139. }
  9140. // _.flow
  9141. interface LoDashStatic {
  9142. /**
  9143. * Creates a function that returns the result of invoking the provided functions with the this binding of the
  9144. * created function, where each successive invocation is supplied the return value of the previous.
  9145. *
  9146. * @param funcs Functions to invoke.
  9147. * @return Returns the new function.
  9148. */
  9149. flow<TResult extends Function>(...funcs: Function[]): TResult;
  9150. }
  9151. interface LoDashImplicitObjectWrapper<T> {
  9152. /**
  9153. * @see _.flow
  9154. */
  9155. flow<TResult extends Function>(...funcs: Function[]): LoDashImplicitObjectWrapper<TResult>;
  9156. }
  9157. interface LoDashExplicitObjectWrapper<T> {
  9158. /**
  9159. * @see _.flow
  9160. */
  9161. flow<TResult extends Function>(...funcs: Function[]): LoDashExplicitObjectWrapper<TResult>;
  9162. }
  9163. // _.flowRight
  9164. interface LoDashStatic {
  9165. /**
  9166. * This method is like _.flow except that it creates a function that invokes the provided functions from right
  9167. * to left.
  9168. *
  9169. * @param funcs Functions to invoke.
  9170. * @return Returns the new function.
  9171. */
  9172. flowRight<TResult extends Function>(...funcs: Function[]): TResult;
  9173. }
  9174. interface LoDashImplicitObjectWrapper<T> {
  9175. /**
  9176. * @see _.flowRight
  9177. */
  9178. flowRight<TResult extends Function>(...funcs: Function[]): LoDashImplicitObjectWrapper<TResult>;
  9179. }
  9180. interface LoDashExplicitObjectWrapper<T> {
  9181. /**
  9182. * @see _.flowRight
  9183. */
  9184. flowRight<TResult extends Function>(...funcs: Function[]): LoDashExplicitObjectWrapper<TResult>;
  9185. }
  9186. // _.memoize
  9187. interface MemoizedFunction extends Function {
  9188. cache: MapCache;
  9189. }
  9190. interface LoDashStatic {
  9191. /**
  9192. * Creates a function that memoizes the result of func. If resolver is provided it determines the cache key for
  9193. * storing the result based on the arguments provided to the memoized function. By default, the first argument
  9194. * provided to the memoized function is coerced to a string and used as the cache key. The func is invoked with
  9195. * the this binding of the memoized function.
  9196. * @param func The function to have its output memoized.
  9197. * @param resolver The function to resolve the cache key.
  9198. * @return Returns the new memoizing function.
  9199. */
  9200. memoize: {
  9201. <T extends Function>(func: T, resolver?: Function): T & MemoizedFunction;
  9202. Cache: MapCache;
  9203. };
  9204. }
  9205. interface LoDashImplicitObjectWrapper<T> {
  9206. /**
  9207. * @see _.memoize
  9208. */
  9209. memoize(resolver?: Function): LoDashImplicitObjectWrapper<T & MemoizedFunction>;
  9210. }
  9211. // _.overArgs (was _.modArgs)
  9212. interface LoDashStatic {
  9213. /**
  9214. * Creates a function that runs each argument through a corresponding transform function.
  9215. *
  9216. * @param func The function to wrap.
  9217. * @param transforms The functions to transform arguments, specified as individual functions or arrays
  9218. * of functions.
  9219. * @return Returns the new function.
  9220. */
  9221. overArgs<T extends Function, TResult extends Function>(
  9222. func: T,
  9223. ...transforms: Function[]
  9224. ): TResult;
  9225. /**
  9226. * @see _.overArgs
  9227. */
  9228. overArgs<T extends Function, TResult extends Function>(
  9229. func: T,
  9230. transforms: Function[]
  9231. ): TResult;
  9232. }
  9233. interface LoDashImplicitObjectWrapper<T> {
  9234. /**
  9235. * @see _.overArgs
  9236. */
  9237. overArgs<TResult extends Function>(...transforms: Function[]): LoDashImplicitObjectWrapper<TResult>;
  9238. /**
  9239. * @see _.overArgs
  9240. */
  9241. overArgs<TResult extends Function>(transforms: Function[]): LoDashImplicitObjectWrapper<TResult>;
  9242. }
  9243. interface LoDashExplicitObjectWrapper<T> {
  9244. /**
  9245. * @see _.overArgs
  9246. */
  9247. overArgs<TResult extends Function>(...transforms: Function[]): LoDashExplicitObjectWrapper<TResult>;
  9248. /**
  9249. * @see _.overArgs
  9250. */
  9251. overArgs<TResult extends Function>(transforms: Function[]): LoDashExplicitObjectWrapper<TResult>;
  9252. }
  9253. // _.negate
  9254. interface LoDashStatic {
  9255. /**
  9256. * Creates a function that negates the result of the predicate func. The func predicate is invoked with
  9257. * the this binding and arguments of the created function.
  9258. *
  9259. * @param predicate The predicate to negate.
  9260. * @return Returns the new function.
  9261. */
  9262. negate<T extends Function>(predicate: T): (...args: any[]) => boolean;
  9263. /**
  9264. * @see _.negate
  9265. */
  9266. negate<T extends Function, TResult extends Function>(predicate: T): TResult;
  9267. }
  9268. interface LoDashImplicitObjectWrapper<T> {
  9269. /**
  9270. * @see _.negate
  9271. */
  9272. negate(): LoDashImplicitObjectWrapper<(...args: any[]) => boolean>;
  9273. /**
  9274. * @see _.negate
  9275. */
  9276. negate<TResult extends Function>(): LoDashImplicitObjectWrapper<TResult>;
  9277. }
  9278. interface LoDashExplicitObjectWrapper<T> {
  9279. /**
  9280. * @see _.negate
  9281. */
  9282. negate(): LoDashExplicitObjectWrapper<(...args: any[]) => boolean>;
  9283. /**
  9284. * @see _.negate
  9285. */
  9286. negate<TResult extends Function>(): LoDashExplicitObjectWrapper<TResult>;
  9287. }
  9288. // _.once
  9289. interface LoDashStatic {
  9290. /**
  9291. * Creates a function that is restricted to invoking func once. Repeat calls to the function return the value
  9292. * of the first call. The func is invoked with the this binding and arguments of the created function.
  9293. *
  9294. * @param func The function to restrict.
  9295. * @return Returns the new restricted function.
  9296. */
  9297. once<T extends Function>(func: T): T;
  9298. }
  9299. interface LoDashImplicitObjectWrapper<T> {
  9300. /**
  9301. * @see _.once
  9302. */
  9303. once(): LoDashImplicitObjectWrapper<T>;
  9304. }
  9305. interface LoDashExplicitObjectWrapper<T> {
  9306. /**
  9307. * @see _.once
  9308. */
  9309. once(): LoDashExplicitObjectWrapper<T>;
  9310. }
  9311. // _.partial
  9312. interface LoDashStatic {
  9313. /**
  9314. * Creates a function that, when called, invokes func with any additional partial arguments
  9315. * prepended to those provided to the new function. This method is similar to _.bind except
  9316. * it does not alter the this binding.
  9317. * @param func The function to partially apply arguments to.
  9318. * @param args Arguments to be partially applied.
  9319. * @return The new partially applied function.
  9320. */
  9321. partial: Partial;
  9322. }
  9323. type PH = LoDashStatic;
  9324. interface Function0<R> {
  9325. (): R;
  9326. }
  9327. interface Function1<T1, R> {
  9328. (t1: T1): R;
  9329. }
  9330. interface Function2<T1, T2, R> {
  9331. (t1: T1, t2: T2): R;
  9332. }
  9333. interface Function3<T1, T2, T3, R> {
  9334. (t1: T1, t2: T2, t3: T3): R;
  9335. }
  9336. interface Function4<T1, T2, T3, T4, R> {
  9337. (t1: T1, t2: T2, t3: T3, t4: T4): R;
  9338. }
  9339. interface Partial {
  9340. // arity 0
  9341. <R>(func: Function0<R>): Function0<R>;
  9342. // arity 1
  9343. <T1, R>(func: Function1<T1, R>): Function1<T1, R>;
  9344. <T1, R>(func: Function1<T1, R>, arg1: T1): Function0<R>;
  9345. // arity 2
  9346. <T1, T2, R>(func: Function2<T1, T2, R>): Function2<T1, T2, R>;
  9347. <T1, T2, R>(func: Function2<T1, T2, R>, arg1: T1): Function1<T2, R>;
  9348. <T1, T2, R>(func: Function2<T1, T2, R>, plc1: PH, arg2: T2): Function1<T1, R>;
  9349. <T1, T2, R>(func: Function2<T1, T2, R>, arg1: T1, arg2: T2): Function0<R>;
  9350. // arity 3
  9351. <T1, T2, T3, R>(func: Function3<T1, T2, T3, R>): Function3<T1, T2, T3, R>;
  9352. <T1, T2, T3, R>(func: Function3<T1, T2, T3, R>, arg1: T1): Function2<T2, T3, R>;
  9353. <T1, T2, T3, R>(func: Function3<T1, T2, T3, R>, plc1: PH, arg2: T2): Function2<T1, T3, R>;
  9354. <T1, T2, T3, R>(func: Function3<T1, T2, T3, R>, arg1: T1, arg2: T2): Function1<T3, R>;
  9355. <T1, T2, T3, R>(func: Function3<T1, T2, T3, R>, plc1: PH, plc2: PH, arg3: T3): Function2<T1, T2, R>;
  9356. <T1, T2, T3, R>(func: Function3<T1, T2, T3, R>, arg1: T1, plc2: PH, arg3: T3): Function1<T2, R>;
  9357. <T1, T2, T3, R>(func: Function3<T1, T2, T3, R>, plc1: PH, arg2: T2, arg3: T3): Function1<T1, R>;
  9358. <T1, T2, T3, R>(func: Function3<T1, T2, T3, R>, arg1: T1, arg2: T2, arg3: T3): Function0<R>;
  9359. // arity 4
  9360. <T1, T2, T3, T4, R>(func: Function4<T1, T2, T3, T4, R>): Function4<T1, T2, T3, T4, R>;
  9361. <T1, T2, T3, T4, R>(func: Function4<T1, T2, T3, T4, R>, arg1: T1): Function3<T2, T3, T4, R>;
  9362. <T1, T2, T3, T4, R>(func: Function4<T1, T2, T3, T4, R>, plc1: PH, arg2: T2): Function3<T1, T3, T4, R>;
  9363. <T1, T2, T3, T4, R>(func: Function4<T1, T2, T3, T4, R>, arg1: T1, arg2: T2): Function2<T3, T4, R>;
  9364. <T1, T2, T3, T4, R>(func: Function4<T1, T2, T3, T4, R>, plc1: PH, plc2: PH, arg3: T3): Function3<T1, T2, T4, R>;
  9365. <T1, T2, T3, T4, R>(func: Function4<T1, T2, T3, T4, R>, arg1: T1, plc2: PH, arg3: T3): Function2<T2, T4, R>;
  9366. <T1, T2, T3, T4, R>(func: Function4<T1, T2, T3, T4, R>, plc1: PH, arg2: T2, arg3: T3): Function2<T1, T4, R>;
  9367. <T1, T2, T3, T4, R>(func: Function4<T1, T2, T3, T4, R>, arg1: T1, arg2: T2, arg3: T3): Function1<T4, R>;
  9368. <T1, T2, T3, T4, R>(func: Function4<T1, T2, T3, T4, R>, plc1: PH, plc2: PH, plc3: PH, arg4: T4): Function3<T1, T2, T3, R>;
  9369. <T1, T2, T3, T4, R>(func: Function4<T1, T2, T3, T4, R>, arg1: T1, plc2: PH, plc3: PH, arg4: T4): Function2<T2, T3, R>;
  9370. <T1, T2, T3, T4, R>(func: Function4<T1, T2, T3, T4, R>, plc1: PH, arg2: T2, plc3: PH, arg4: T4): Function2<T1, T3, R>;
  9371. <T1, T2, T3, T4, R>(func: Function4<T1, T2, T3, T4, R>, arg1: T1, arg2: T2, plc3: PH, arg4: T4): Function1<T3, R>;
  9372. <T1, T2, T3, T4, R>(func: Function4<T1, T2, T3, T4, R>, plc1: PH, plc2: PH, arg3: T3, arg4: T4): Function2<T1, T2, R>;
  9373. <T1, T2, T3, T4, R>(func: Function4<T1, T2, T3, T4, R>, arg1: T1, plc2: PH, arg3: T3, arg4: T4): Function1<T2, R>;
  9374. <T1, T2, T3, T4, R>(func: Function4<T1, T2, T3, T4, R>, plc1: PH, arg2: T2, arg3: T3, arg4: T4): Function1<T1, R>;
  9375. <T1, T2, T3, T4, R>(func: Function4<T1, T2, T3, T4, R>, arg1: T1, arg2: T2, arg3: T3, arg4: T4): Function0<R>;
  9376. // catch-all
  9377. (func: Function, ...args: any[]): Function;
  9378. }
  9379. // _.partialRight
  9380. interface LoDashStatic {
  9381. /**
  9382. * This method is like _.partial except that partial arguments are appended to those provided
  9383. * to the new function.
  9384. * @param func The function to partially apply arguments to.
  9385. * @param args Arguments to be partially applied.
  9386. * @return The new partially applied function.
  9387. */
  9388. partialRight: PartialRight;
  9389. }
  9390. interface PartialRight {
  9391. // arity 0
  9392. <R>(func: Function0<R>): Function0<R>;
  9393. // arity 1
  9394. <T1, R>(func: Function1<T1, R>): Function1<T1, R>;
  9395. <T1, R>(func: Function1<T1, R>, arg1: T1): Function0<R>;
  9396. // arity 2
  9397. <T1, T2, R>(func: Function2<T1, T2, R>): Function2<T1, T2, R>;
  9398. <T1, T2, R>(func: Function2<T1, T2, R>, arg1: T1, plc2: PH): Function1<T2, R>;
  9399. <T1, T2, R>(func: Function2<T1, T2, R>, arg2: T2): Function1<T1, R>;
  9400. <T1, T2, R>(func: Function2<T1, T2, R>, arg1: T1, arg2: T2): Function0<R>;
  9401. // arity 3
  9402. <T1, T2, T3, R>(func: Function3<T1, T2, T3, R>): Function3<T1, T2, T3, R>;
  9403. <T1, T2, T3, R>(func: Function3<T1, T2, T3, R>, arg1: T1, plc2: PH, plc3: PH): Function2<T2, T3, R>;
  9404. <T1, T2, T3, R>(func: Function3<T1, T2, T3, R>, arg2: T2, plc3: PH): Function2<T1, T3, R>;
  9405. <T1, T2, T3, R>(func: Function3<T1, T2, T3, R>, arg1: T1, arg2: T2, plc3: PH): Function1<T3, R>;
  9406. <T1, T2, T3, R>(func: Function3<T1, T2, T3, R>, arg3: T3): Function2<T1, T2, R>;
  9407. <T1, T2, T3, R>(func: Function3<T1, T2, T3, R>, arg1: T1, plc2: PH, arg3: T3): Function1<T2, R>;
  9408. <T1, T2, T3, R>(func: Function3<T1, T2, T3, R>, arg2: T2, arg3: T3): Function1<T1, R>;
  9409. <T1, T2, T3, R>(func: Function3<T1, T2, T3, R>, arg1: T1, arg2: T2, arg3: T3): Function0<R>;
  9410. // arity 4
  9411. <T1, T2, T3, T4, R>(func: Function4<T1, T2, T3, T4, R>): Function4<T1, T2, T3, T4, R>;
  9412. <T1, T2, T3, T4, R>(func: Function4<T1, T2, T3, T4, R>, arg1: T1, plc2: PH, plc3: PH, plc4: PH): Function3<T2, T3, T4, R>;
  9413. <T1, T2, T3, T4, R>(func: Function4<T1, T2, T3, T4, R>, arg2: T2, plc3: PH, plc4: PH): Function3<T1, T3, T4, R>;
  9414. <T1, T2, T3, T4, R>(func: Function4<T1, T2, T3, T4, R>, arg1: T1, arg2: T2, plc3: PH, plc4: PH): Function2<T3, T4, R>;
  9415. <T1, T2, T3, T4, R>(func: Function4<T1, T2, T3, T4, R>, arg3: T3, plc4: PH): Function3<T1, T2, T4, R>;
  9416. <T1, T2, T3, T4, R>(func: Function4<T1, T2, T3, T4, R>, arg1: T1, plc2: PH, arg3: T3, plc4: PH): Function2<T2, T4, R>;
  9417. <T1, T2, T3, T4, R>(func: Function4<T1, T2, T3, T4, R>, arg2: T2, arg3: T3, plc4: PH): Function2<T1, T4, R>;
  9418. <T1, T2, T3, T4, R>(func: Function4<T1, T2, T3, T4, R>, arg1: T1, arg2: T2, arg3: T3, plc4: PH): Function1<T4, R>;
  9419. <T1, T2, T3, T4, R>(func: Function4<T1, T2, T3, T4, R>, arg4: T4): Function3<T1, T2, T3, R>;
  9420. <T1, T2, T3, T4, R>(func: Function4<T1, T2, T3, T4, R>, arg1: T1, plc2: PH, plc3: PH, arg4: T4): Function2<T2, T3, R>;
  9421. <T1, T2, T3, T4, R>(func: Function4<T1, T2, T3, T4, R>, arg2: T2, plc3: PH, arg4: T4): Function2<T1, T3, R>;
  9422. <T1, T2, T3, T4, R>(func: Function4<T1, T2, T3, T4, R>, arg1: T1, arg2: T2, plc3: PH, arg4: T4): Function1<T3, R>;
  9423. <T1, T2, T3, T4, R>(func: Function4<T1, T2, T3, T4, R>, arg3: T3, arg4: T4): Function2<T1, T2, R>;
  9424. <T1, T2, T3, T4, R>(func: Function4<T1, T2, T3, T4, R>, arg1: T1, plc2: PH, arg3: T3, arg4: T4): Function1<T2, R>;
  9425. <T1, T2, T3, T4, R>(func: Function4<T1, T2, T3, T4, R>, arg2: T2, arg3: T3, arg4: T4): Function1<T1, R>;
  9426. <T1, T2, T3, T4, R>(func: Function4<T1, T2, T3, T4, R>, arg1: T1, arg2: T2, arg3: T3, arg4: T4): Function0<R>;
  9427. // catch-all
  9428. (func: Function, ...args: any[]): Function;
  9429. }
  9430. // _.rearg
  9431. interface LoDashStatic {
  9432. /**
  9433. * Creates a function that invokes func with arguments arranged according to the specified indexes where the
  9434. * argument value at the first index is provided as the first argument, the argument value at the second index
  9435. * is provided as the second argument, and so on.
  9436. * @param func The function to rearrange arguments for.
  9437. * @param indexes The arranged argument indexes, specified as individual indexes or arrays of indexes.
  9438. * @return Returns the new function.
  9439. */
  9440. rearg<TResult extends Function>(func: Function, indexes: number[]): TResult;
  9441. /**
  9442. * @see _.rearg
  9443. */
  9444. rearg<TResult extends Function>(func: Function, ...indexes: number[]): TResult;
  9445. }
  9446. interface LoDashImplicitObjectWrapper<T> {
  9447. /**
  9448. * @see _.rearg
  9449. */
  9450. rearg<TResult extends Function>(indexes: number[]): LoDashImplicitObjectWrapper<TResult>;
  9451. /**
  9452. * @see _.rearg
  9453. */
  9454. rearg<TResult extends Function>(...indexes: number[]): LoDashImplicitObjectWrapper<TResult>;
  9455. }
  9456. // _.rest
  9457. interface LoDashStatic {
  9458. /**
  9459. * Creates a function that invokes func with the this binding of the created function and arguments from start
  9460. * and beyond provided as an array.
  9461. *
  9462. * Note: This method is based on the rest parameter.
  9463. *
  9464. * @param func The function to apply a rest parameter to.
  9465. * @param start The start position of the rest parameter.
  9466. * @return Returns the new function.
  9467. */
  9468. rest<TResult extends Function>(
  9469. func: Function,
  9470. start?: number
  9471. ): TResult;
  9472. /**
  9473. * @see _.rest
  9474. */
  9475. rest<TResult extends Function, TFunc extends Function>(
  9476. func: TFunc,
  9477. start?: number
  9478. ): TResult;
  9479. }
  9480. interface LoDashImplicitObjectWrapper<T> {
  9481. /**
  9482. * @see _.rest
  9483. */
  9484. rest<TResult extends Function>(start?: number): LoDashImplicitObjectWrapper<TResult>;
  9485. }
  9486. interface LoDashExplicitObjectWrapper<T> {
  9487. /**
  9488. * @see _.rest
  9489. */
  9490. rest<TResult extends Function>(start?: number): LoDashExplicitObjectWrapper<TResult>;
  9491. }
  9492. // _.spread
  9493. interface LoDashStatic {
  9494. /**
  9495. * Creates a function that invokes func with the this binding of the created function and an array of arguments
  9496. * much like Function#apply.
  9497. *
  9498. * Note: This method is based on the spread operator.
  9499. *
  9500. * @param func The function to spread arguments over.
  9501. * @return Returns the new function.
  9502. */
  9503. spread<F extends Function, T extends Function>(func: F): T;
  9504. /**
  9505. * @see _.spread
  9506. */
  9507. spread<T extends Function>(func: Function): T;
  9508. }
  9509. interface LoDashImplicitObjectWrapper<T> {
  9510. /**
  9511. * @see _.spread
  9512. */
  9513. spread<T extends Function>(): LoDashImplicitObjectWrapper<T>;
  9514. }
  9515. interface LoDashExplicitObjectWrapper<T> {
  9516. /**
  9517. * @see _.spread
  9518. */
  9519. spread<T extends Function>(): LoDashExplicitObjectWrapper<T>;
  9520. }
  9521. // _.throttle
  9522. interface ThrottleSettings {
  9523. /**
  9524. * If you'd like to disable the leading-edge call, pass this as false.
  9525. */
  9526. leading?: boolean;
  9527. /**
  9528. * If you'd like to disable the execution on the trailing-edge, pass false.
  9529. */
  9530. trailing?: boolean;
  9531. }
  9532. interface LoDashStatic {
  9533. /**
  9534. * Creates a throttled function that only invokes func at most once per every wait milliseconds. The throttled
  9535. * function comes with a cancel method to cancel delayed invocations. Provide an options object to indicate
  9536. * that func should be invoked on the leading and/or trailing edge of the wait timeout. Subsequent calls to
  9537. * the throttled function return the result of the last func call.
  9538. *
  9539. * Note: If leading and trailing options are true, func is invoked on the trailing edge of the timeout only if
  9540. * the the throttled function is invoked more than once during the wait timeout.
  9541. *
  9542. * @param func The function to throttle.
  9543. * @param wait The number of milliseconds to throttle invocations to.
  9544. * @param options The options object.
  9545. * @param options.leading Specify invoking on the leading edge of the timeout.
  9546. * @param options.trailing Specify invoking on the trailing edge of the timeout.
  9547. * @return Returns the new throttled function.
  9548. */
  9549. throttle<T extends Function>(
  9550. func: T,
  9551. wait?: number,
  9552. options?: ThrottleSettings
  9553. ): T & Cancelable;
  9554. }
  9555. interface LoDashImplicitObjectWrapper<T> {
  9556. /**
  9557. * @see _.throttle
  9558. */
  9559. throttle(
  9560. wait?: number,
  9561. options?: ThrottleSettings
  9562. ): LoDashImplicitObjectWrapper<T & Cancelable>;
  9563. }
  9564. interface LoDashExplicitObjectWrapper<T> {
  9565. /**
  9566. * @see _.throttle
  9567. */
  9568. throttle(
  9569. wait?: number,
  9570. options?: ThrottleSettings
  9571. ): LoDashExplicitObjectWrapper<T & Cancelable>;
  9572. }
  9573. // _.unary
  9574. interface LoDashStatic {
  9575. /**
  9576. * Creates a function that accepts up to one argument, ignoring any
  9577. * additional arguments.
  9578. *
  9579. * @static
  9580. * @memberOf _
  9581. * @category Function
  9582. * @param {Function} func The function to cap arguments for.
  9583. * @returns {Function} Returns the new function.
  9584. * @example
  9585. *
  9586. * _.map(['6', '8', '10'], _.unary(parseInt));
  9587. * // => [6, 8, 10]
  9588. */
  9589. unary<T extends Function>(func: T): T;
  9590. }
  9591. interface LoDashImplicitObjectWrapper<T> {
  9592. /**
  9593. * @see _.unary
  9594. */
  9595. unary(): LoDashImplicitObjectWrapper<T>;
  9596. }
  9597. interface LoDashExplicitObjectWrapper<T> {
  9598. /**
  9599. * @see _.unary
  9600. */
  9601. unary(): LoDashExplicitObjectWrapper<T>;
  9602. }
  9603. // _.wrap
  9604. interface LoDashStatic {
  9605. /**
  9606. * Creates a function that provides value to the wrapper function as its first argument. Any additional
  9607. * arguments provided to the function are appended to those provided to the wrapper function. The wrapper is
  9608. * invoked with the this binding of the created function.
  9609. *
  9610. * @param value The value to wrap.
  9611. * @param wrapper The wrapper function.
  9612. * @return Returns the new function.
  9613. */
  9614. wrap<V, W extends Function, R extends Function>(
  9615. value: V,
  9616. wrapper: W
  9617. ): R;
  9618. /**
  9619. * @see _.wrap
  9620. */
  9621. wrap<V, R extends Function>(
  9622. value: V,
  9623. wrapper: Function
  9624. ): R;
  9625. /**
  9626. * @see _.wrap
  9627. */
  9628. wrap<R extends Function>(
  9629. value: any,
  9630. wrapper: Function
  9631. ): R;
  9632. }
  9633. interface LoDashImplicitWrapper<T> {
  9634. /**
  9635. * @see _.wrap
  9636. */
  9637. wrap<W extends Function, R extends Function>(wrapper: W): LoDashImplicitObjectWrapper<R>;
  9638. /**
  9639. * @see _.wrap
  9640. */
  9641. wrap<R extends Function>(wrapper: Function): LoDashImplicitObjectWrapper<R>;
  9642. }
  9643. interface LoDashImplicitArrayWrapper<T> {
  9644. /**
  9645. * @see _.wrap
  9646. */
  9647. wrap<W extends Function, R extends Function>(wrapper: W): LoDashImplicitObjectWrapper<R>;
  9648. /**
  9649. * @see _.wrap
  9650. */
  9651. wrap<R extends Function>(wrapper: Function): LoDashImplicitObjectWrapper<R>;
  9652. }
  9653. interface LoDashImplicitObjectWrapper<T> {
  9654. /**
  9655. * @see _.wrap
  9656. */
  9657. wrap<W extends Function, R extends Function>(wrapper: W): LoDashImplicitObjectWrapper<R>;
  9658. /**
  9659. * @see _.wrap
  9660. */
  9661. wrap<R extends Function>(wrapper: Function): LoDashImplicitObjectWrapper<R>;
  9662. }
  9663. interface LoDashExplicitWrapper<T> {
  9664. /**
  9665. * @see _.wrap
  9666. */
  9667. wrap<W extends Function, R extends Function>(wrapper: W): LoDashExplicitObjectWrapper<R>;
  9668. /**
  9669. * @see _.wrap
  9670. */
  9671. wrap<R extends Function>(wrapper: Function): LoDashExplicitObjectWrapper<R>;
  9672. }
  9673. interface LoDashExplicitArrayWrapper<T> {
  9674. /**
  9675. * @see _.wrap
  9676. */
  9677. wrap<W extends Function, R extends Function>(wrapper: W): LoDashExplicitObjectWrapper<R>;
  9678. /**
  9679. * @see _.wrap
  9680. */
  9681. wrap<R extends Function>(wrapper: Function): LoDashExplicitObjectWrapper<R>;
  9682. }
  9683. interface LoDashExplicitObjectWrapper<T> {
  9684. /**
  9685. * @see _.wrap
  9686. */
  9687. wrap<W extends Function, R extends Function>(wrapper: W): LoDashExplicitObjectWrapper<R>;
  9688. /**
  9689. * @see _.wrap
  9690. */
  9691. wrap<R extends Function>(wrapper: Function): LoDashExplicitObjectWrapper<R>;
  9692. }
  9693. /********
  9694. * Lang *
  9695. *******/
  9696. // _.castArray
  9697. interface LoDashStatic {
  9698. /**
  9699. * Casts value as an array if its not one.
  9700. *
  9701. * @param value The value to inspect.
  9702. * @return Returns the cast array.
  9703. */
  9704. castArray<T>(value?: T | T[]): T[];
  9705. }
  9706. interface LoDashImplicitWrapper<T> {
  9707. /**
  9708. * @see _.castArray
  9709. */
  9710. castArray(): LoDashImplicitArrayWrapper<T>;
  9711. }
  9712. interface LoDashImplicitArrayWrapper<T> {
  9713. /**
  9714. * @see _.castArray
  9715. */
  9716. castArray(): LoDashImplicitArrayWrapper<T>;
  9717. }
  9718. interface LoDashImplicitObjectWrapper<T> {
  9719. /**
  9720. * @see _.castArray
  9721. */
  9722. castArray(): LoDashImplicitArrayWrapper<T>;
  9723. }
  9724. interface LoDashExplicitWrapper<T> {
  9725. /**
  9726. * @see _.castArray
  9727. */
  9728. castArray(): LoDashExplicitArrayWrapper<T>;
  9729. }
  9730. interface LoDashExplicitArrayWrapper<T> {
  9731. /**
  9732. * @see _.castArray
  9733. */
  9734. castArray(): LoDashExplicitArrayWrapper<T>;
  9735. }
  9736. interface LoDashExplicitObjectWrapper<T> {
  9737. /**
  9738. * @see _.castArray
  9739. */
  9740. castArray(): LoDashExplicitArrayWrapper<T>;
  9741. }
  9742. // _.clone
  9743. interface LoDashStatic {
  9744. /**
  9745. * Creates a shallow clone of `value`.
  9746. *
  9747. * **Note:** This method is loosely based on the
  9748. * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)
  9749. * and supports cloning arrays, array buffers, booleans, date objects, maps,
  9750. * numbers, `Object` objects, regexes, sets, strings, symbols, and typed
  9751. * arrays. The own enumerable properties of `arguments` objects are cloned
  9752. * as plain objects. An empty object is returned for uncloneable values such
  9753. * as error objects, functions, DOM nodes, and WeakMaps.
  9754. *
  9755. * @static
  9756. * @memberOf _
  9757. * @category Lang
  9758. * @param {*} value The value to clone.
  9759. * @returns {*} Returns the cloned value.
  9760. * @example
  9761. *
  9762. * var objects = [{ 'a': 1 }, { 'b': 2 }];
  9763. *
  9764. * var shallow = _.clone(objects);
  9765. * console.log(shallow[0] === objects[0]);
  9766. * // => true
  9767. */
  9768. clone<T>(value: T): T;
  9769. }
  9770. interface LoDashImplicitWrapper<T> {
  9771. /**
  9772. * @see _.clone
  9773. */
  9774. clone(): T;
  9775. }
  9776. interface LoDashImplicitArrayWrapper<T> {
  9777. /**
  9778. * @see _.clone
  9779. */
  9780. clone(): T[];
  9781. }
  9782. interface LoDashImplicitObjectWrapper<T> {
  9783. /**
  9784. * @see _.clone
  9785. */
  9786. clone(): T;
  9787. }
  9788. // _.cloneDeep
  9789. interface LoDashStatic {
  9790. /**
  9791. * This method is like `_.clone` except that it recursively clones `value`.
  9792. *
  9793. * @static
  9794. * @memberOf _
  9795. * @category Lang
  9796. * @param {*} value The value to recursively clone.
  9797. * @returns {*} Returns the deep cloned value.
  9798. * @example
  9799. *
  9800. * var objects = [{ 'a': 1 }, { 'b': 2 }];
  9801. *
  9802. * var deep = _.cloneDeep(objects);
  9803. * console.log(deep[0] === objects[0]);
  9804. * // => false
  9805. */
  9806. cloneDeep<T>(value: T): T;
  9807. }
  9808. interface LoDashImplicitWrapper<T> {
  9809. /**
  9810. * @see _.cloneDeep
  9811. */
  9812. cloneDeep(): T;
  9813. }
  9814. interface LoDashImplicitArrayWrapper<T> {
  9815. /**
  9816. * @see _.cloneDeep
  9817. */
  9818. cloneDeep(): T[];
  9819. }
  9820. interface LoDashImplicitObjectWrapper<T> {
  9821. /**
  9822. * @see _.cloneDeep
  9823. */
  9824. cloneDeep(): T;
  9825. }
  9826. // _.cloneWith
  9827. interface LoDashStatic {
  9828. /**
  9829. * Creates a shallow clone of `value`.
  9830. *
  9831. * **Note:** This method is loosely based on the
  9832. * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)
  9833. * and supports cloning arrays, array buffers, booleans, date objects, maps,
  9834. * numbers, `Object` objects, regexes, sets, strings, symbols, and typed
  9835. * arrays. The own enumerable properties of `arguments` objects are cloned
  9836. * as plain objects. An empty object is returned for uncloneable values such
  9837. * as error objects, functions, DOM nodes, and WeakMaps.
  9838. *
  9839. * @static
  9840. * @memberOf _
  9841. * @category Lang
  9842. * @param {*} value The value to clone.
  9843. * @returns {*} Returns the cloned value.
  9844. * @example
  9845. *
  9846. * var objects = [{ 'a': 1 }, { 'b': 2 }];
  9847. *
  9848. * var shallow = _.clone(objects);
  9849. * console.log(shallow[0] === objects[0]);
  9850. * // => true
  9851. */
  9852. cloneWith<T>(
  9853. value: T,
  9854. customizer: (value: any) => any): T;
  9855. }
  9856. interface LoDashImplicitWrapper<T> {
  9857. /**
  9858. * @see _.clone
  9859. */
  9860. cloneWith(customizer: (value: any) => any): T;
  9861. }
  9862. interface LoDashImplicitArrayWrapper<T> {
  9863. /**
  9864. * @see _.clone
  9865. */
  9866. cloneWith(customizer: (value: any) => any): T[];
  9867. }
  9868. interface LoDashImplicitObjectWrapper<T> {
  9869. /**
  9870. * @see _.clone
  9871. */
  9872. cloneWith(customizer: (value: any) => any): T;
  9873. }
  9874. // _.cloneDeepWith
  9875. interface LoDashStatic {
  9876. /**
  9877. * Creates a deep clone of value. If customizer is provided its invoked to produce the cloned values. If
  9878. * customizer returns undefined cloning is handled by the method instead. The customizer is bound to thisArg
  9879. * and invoked with up to three argument; (value [, index|key, object]).
  9880. * Note: This method is loosely based on the structured clone algorithm. The enumerable properties of arguments
  9881. * objects and objects created by constructors other than Object are cloned to plain Object objects. An empty
  9882. * object is returned for uncloneable values such as functions, DOM nodes, Maps, Sets, and WeakMaps.
  9883. * @param value The value to deep clone.
  9884. * @param customizer The function to customize cloning values.
  9885. * @param thisArg The this binding of customizer.
  9886. * @return Returns the deep cloned value.
  9887. */
  9888. cloneDeepWith<T>(
  9889. value: T,
  9890. customizer: (value: any) => any): T;
  9891. }
  9892. interface LoDashImplicitWrapper<T> {
  9893. /**
  9894. * @see _.cloneDeep
  9895. */
  9896. cloneDeepWith(customizer: (value: any) => any): T;
  9897. }
  9898. interface LoDashImplicitArrayWrapper<T> {
  9899. /**
  9900. * @see _.cloneDeep
  9901. */
  9902. cloneDeepWith(customizer: (value: any) => any): T[];
  9903. }
  9904. interface LoDashImplicitObjectWrapper<T> {
  9905. /**
  9906. * @see _.cloneDeep
  9907. */
  9908. cloneDeepWith(customizer: (value: any) => any): T;
  9909. }
  9910. // _.eq
  9911. interface LoDashStatic {
  9912. /**
  9913. * Performs a [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
  9914. * comparison between two values to determine if they are equivalent.
  9915. *
  9916. * @static
  9917. * @memberOf _
  9918. * @category Lang
  9919. * @param {*} value The value to compare.
  9920. * @param {*} other The other value to compare.
  9921. * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
  9922. * @example
  9923. *
  9924. * var object = { 'user': 'fred' };
  9925. * var other = { 'user': 'fred' };
  9926. *
  9927. * _.eq(object, object);
  9928. * // => true
  9929. *
  9930. * _.eq(object, other);
  9931. * // => false
  9932. *
  9933. * _.eq('a', 'a');
  9934. * // => true
  9935. *
  9936. * _.eq('a', Object('a'));
  9937. * // => false
  9938. *
  9939. * _.eq(NaN, NaN);
  9940. * // => true
  9941. */
  9942. eq(
  9943. value: any,
  9944. other: any
  9945. ): boolean;
  9946. }
  9947. interface LoDashImplicitWrapperBase<T, TWrapper> {
  9948. /**
  9949. * @see _.isEqual
  9950. */
  9951. eq(
  9952. other: any
  9953. ): boolean;
  9954. }
  9955. interface LoDashExplicitWrapperBase<T, TWrapper> {
  9956. /**
  9957. * @see _.isEqual
  9958. */
  9959. eq(
  9960. other: any
  9961. ): LoDashExplicitWrapper<boolean>;
  9962. }
  9963. // _.gt
  9964. interface LoDashStatic {
  9965. /**
  9966. * Checks if value is greater than other.
  9967. *
  9968. * @param value The value to compare.
  9969. * @param other The other value to compare.
  9970. * @return Returns true if value is greater than other, else false.
  9971. */
  9972. gt(
  9973. value: any,
  9974. other: any
  9975. ): boolean;
  9976. }
  9977. interface LoDashImplicitWrapperBase<T, TWrapper> {
  9978. /**
  9979. * @see _.gt
  9980. */
  9981. gt(other: any): boolean;
  9982. }
  9983. interface LoDashExplicitWrapperBase<T, TWrapper> {
  9984. /**
  9985. * @see _.gt
  9986. */
  9987. gt(other: any): LoDashExplicitWrapper<boolean>;
  9988. }
  9989. // _.gte
  9990. interface LoDashStatic {
  9991. /**
  9992. * Checks if value is greater than or equal to other.
  9993. *
  9994. * @param value The value to compare.
  9995. * @param other The other value to compare.
  9996. * @return Returns true if value is greater than or equal to other, else false.
  9997. */
  9998. gte(
  9999. value: any,
  10000. other: any
  10001. ): boolean;
  10002. }
  10003. interface LoDashImplicitWrapperBase<T, TWrapper> {
  10004. /**
  10005. * @see _.gte
  10006. */
  10007. gte(other: any): boolean;
  10008. }
  10009. interface LoDashExplicitWrapperBase<T, TWrapper> {
  10010. /**
  10011. * @see _.gte
  10012. */
  10013. gte(other: any): LoDashExplicitWrapper<boolean>;
  10014. }
  10015. // _.isArguments
  10016. interface LoDashStatic {
  10017. /**
  10018. * Checks if value is classified as an arguments object.
  10019. *
  10020. * @param value The value to check.
  10021. * @return Returns true if value is correctly classified, else false.
  10022. */
  10023. isArguments(value?: any): value is IArguments;
  10024. }
  10025. interface LoDashImplicitWrapperBase<T, TWrapper> {
  10026. /**
  10027. * @see _.isArguments
  10028. */
  10029. isArguments(): boolean;
  10030. }
  10031. interface LoDashExplicitWrapperBase<T, TWrapper> {
  10032. /**
  10033. * @see _.isArguments
  10034. */
  10035. isArguments(): LoDashExplicitWrapper<boolean>;
  10036. }
  10037. // _.isArray
  10038. interface LoDashStatic {
  10039. /**
  10040. * Checks if value is classified as an Array object.
  10041. * @param value The value to check.
  10042. *
  10043. * @return Returns true if value is correctly classified, else false.
  10044. */
  10045. isArray<T>(value?: any): value is T[];
  10046. }
  10047. interface LoDashImplicitWrapperBase<T, TWrapper> {
  10048. /**
  10049. * @see _.isArray
  10050. */
  10051. isArray(): boolean;
  10052. }
  10053. interface LoDashExplicitWrapperBase<T, TWrapper> {
  10054. /**
  10055. * @see _.isArray
  10056. */
  10057. isArray(): LoDashExplicitWrapper<boolean>;
  10058. }
  10059. // _.isArrayBuffer
  10060. interface LoDashStatic {
  10061. /**
  10062. * Checks if value is classified as an ArrayBuffer object.
  10063. *
  10064. * @param value The value to check.
  10065. * @return Returns true if value is correctly classified, else false.
  10066. */
  10067. isArrayBuffer(value?: any): value is ArrayBuffer;
  10068. }
  10069. interface LoDashImplicitWrapperBase<T, TWrapper> {
  10070. /**
  10071. * @see _.isArrayBuffer
  10072. */
  10073. isArrayBuffer(): boolean;
  10074. }
  10075. interface LoDashExplicitWrapperBase<T, TWrapper> {
  10076. /**
  10077. * @see _.isArrayBuffer
  10078. */
  10079. isArrayBuffer(): LoDashExplicitWrapper<boolean>;
  10080. }
  10081. // _.isArrayLike
  10082. interface LoDashStatic {
  10083. /**
  10084. * Checks if `value` is array-like. A value is considered array-like if it's
  10085. * not a function and has a `value.length` that's an integer greater than or
  10086. * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
  10087. *
  10088. * @static
  10089. * @memberOf _
  10090. * @type Function
  10091. * @category Lang
  10092. * @param {*} value The value to check.
  10093. * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
  10094. * @example
  10095. *
  10096. * _.isArrayLike([1, 2, 3]);
  10097. * // => true
  10098. *
  10099. * _.isArrayLike(document.body.children);
  10100. * // => true
  10101. *
  10102. * _.isArrayLike('abc');
  10103. * // => true
  10104. *
  10105. * _.isArrayLike(_.noop);
  10106. * // => false
  10107. */
  10108. isArrayLike<T>(value?: any): value is T[];
  10109. }
  10110. interface LoDashImplicitWrapperBase<T, TWrapper> {
  10111. /**
  10112. * @see _.isArrayLike
  10113. */
  10114. isArrayLike(): boolean;
  10115. }
  10116. interface LoDashExplicitWrapperBase<T, TWrapper> {
  10117. /**
  10118. * @see _.isArrayLike
  10119. */
  10120. isArrayLike(): LoDashExplicitWrapper<boolean>;
  10121. }
  10122. // _.isArrayLikeObject
  10123. interface LoDashStatic {
  10124. /**
  10125. * This method is like `_.isArrayLike` except that it also checks if `value`
  10126. * is an object.
  10127. *
  10128. * @static
  10129. * @memberOf _
  10130. * @type Function
  10131. * @category Lang
  10132. * @param {*} value The value to check.
  10133. * @returns {boolean} Returns `true` if `value` is an array-like object, else `false`.
  10134. * @example
  10135. *
  10136. * _.isArrayLikeObject([1, 2, 3]);
  10137. * // => true
  10138. *
  10139. * _.isArrayLikeObject(document.body.children);
  10140. * // => true
  10141. *
  10142. * _.isArrayLikeObject('abc');
  10143. * // => false
  10144. *
  10145. * _.isArrayLikeObject(_.noop);
  10146. * // => false
  10147. */
  10148. isArrayLikeObject<T>(value?: any): value is T[];
  10149. }
  10150. interface LoDashImplicitWrapperBase<T, TWrapper> {
  10151. /**
  10152. * @see _.isArrayLikeObject
  10153. */
  10154. isArrayLikeObject(): boolean;
  10155. }
  10156. interface LoDashExplicitWrapperBase<T, TWrapper> {
  10157. /**
  10158. * @see _.isArrayLikeObject
  10159. */
  10160. isArrayLikeObject(): LoDashExplicitWrapper<boolean>;
  10161. }
  10162. // _.isBoolean
  10163. interface LoDashStatic {
  10164. /**
  10165. * Checks if value is classified as a boolean primitive or object.
  10166. *
  10167. * @param value The value to check.
  10168. * @return Returns true if value is correctly classified, else false.
  10169. */
  10170. isBoolean(value?: any): value is boolean;
  10171. }
  10172. interface LoDashImplicitWrapperBase<T, TWrapper> {
  10173. /**
  10174. * @see _.isBoolean
  10175. */
  10176. isBoolean(): boolean;
  10177. }
  10178. interface LoDashExplicitWrapperBase<T, TWrapper> {
  10179. /**
  10180. * @see _.isBoolean
  10181. */
  10182. isBoolean(): LoDashExplicitWrapper<boolean>;
  10183. }
  10184. // _.isBuffer
  10185. interface LoDashStatic {
  10186. /**
  10187. * Checks if value is a buffer.
  10188. *
  10189. * @param value The value to check.
  10190. * @return Returns true if value is a buffer, else false.
  10191. */
  10192. isBuffer(value?: any): boolean;
  10193. }
  10194. interface LoDashImplicitWrapperBase<T, TWrapper> {
  10195. /**
  10196. * @see _.isBuffer
  10197. */
  10198. isBuffer(): boolean;
  10199. }
  10200. interface LoDashExplicitWrapperBase<T, TWrapper> {
  10201. /**
  10202. * @see _.isBuffer
  10203. */
  10204. isBuffer(): LoDashExplicitWrapper<boolean>;
  10205. }
  10206. // _.isDate
  10207. interface LoDashStatic {
  10208. /**
  10209. * Checks if value is classified as a Date object.
  10210. * @param value The value to check.
  10211. *
  10212. * @return Returns true if value is correctly classified, else false.
  10213. */
  10214. isDate(value?: any): value is Date;
  10215. }
  10216. interface LoDashImplicitWrapperBase<T, TWrapper> {
  10217. /**
  10218. * @see _.isDate
  10219. */
  10220. isDate(): boolean;
  10221. }
  10222. interface LoDashExplicitWrapperBase<T, TWrapper> {
  10223. /**
  10224. * @see _.isDate
  10225. */
  10226. isDate(): LoDashExplicitWrapper<boolean>;
  10227. }
  10228. // _.isElement
  10229. interface LoDashStatic {
  10230. /**
  10231. * Checks if value is a DOM element.
  10232. *
  10233. * @param value The value to check.
  10234. * @return Returns true if value is a DOM element, else false.
  10235. */
  10236. isElement(value?: any): boolean;
  10237. }
  10238. interface LoDashImplicitWrapperBase<T, TWrapper> {
  10239. /**
  10240. * @see _.isElement
  10241. */
  10242. isElement(): boolean;
  10243. }
  10244. interface LoDashExplicitWrapperBase<T, TWrapper> {
  10245. /**
  10246. * @see _.isElement
  10247. */
  10248. isElement(): LoDashExplicitWrapper<boolean>;
  10249. }
  10250. // _.isEmpty
  10251. interface LoDashStatic {
  10252. /**
  10253. * Checks if value is empty. A value is considered empty unless its an arguments object, array, string, or
  10254. * jQuery-like collection with a length greater than 0 or an object with own enumerable properties.
  10255. *
  10256. * @param value The value to inspect.
  10257. * @return Returns true if value is empty, else false.
  10258. */
  10259. isEmpty(value?: any): boolean;
  10260. }
  10261. interface LoDashImplicitWrapperBase<T, TWrapper> {
  10262. /**
  10263. * @see _.isEmpty
  10264. */
  10265. isEmpty(): boolean;
  10266. }
  10267. interface LoDashExplicitWrapperBase<T, TWrapper> {
  10268. /**
  10269. * @see _.isEmpty
  10270. */
  10271. isEmpty(): LoDashExplicitWrapper<boolean>;
  10272. }
  10273. // _.isEqual
  10274. interface LoDashStatic {
  10275. /**
  10276. * Performs a deep comparison between two values to determine if they are
  10277. * equivalent.
  10278. *
  10279. * **Note:** This method supports comparing arrays, array buffers, booleans,
  10280. * date objects, error objects, maps, numbers, `Object` objects, regexes,
  10281. * sets, strings, symbols, and typed arrays. `Object` objects are compared
  10282. * by their own, not inherited, enumerable properties. Functions and DOM
  10283. * nodes are **not** supported.
  10284. *
  10285. * @static
  10286. * @memberOf _
  10287. * @category Lang
  10288. * @param {*} value The value to compare.
  10289. * @param {*} other The other value to compare.
  10290. * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
  10291. * @example
  10292. *
  10293. * var object = { 'user': 'fred' };
  10294. * var other = { 'user': 'fred' };
  10295. *
  10296. * _.isEqual(object, other);
  10297. * // => true
  10298. *
  10299. * object === other;
  10300. * // => false
  10301. */
  10302. isEqual(
  10303. value: any,
  10304. other: any
  10305. ): boolean;
  10306. }
  10307. interface LoDashImplicitWrapperBase<T, TWrapper> {
  10308. /**
  10309. * @see _.isEqual
  10310. */
  10311. isEqual(
  10312. other: any
  10313. ): boolean;
  10314. }
  10315. interface LoDashExplicitWrapperBase<T, TWrapper> {
  10316. /**
  10317. * @see _.isEqual
  10318. */
  10319. isEqual(
  10320. other: any
  10321. ): LoDashExplicitWrapper<boolean>;
  10322. }
  10323. // _.isEqualWith
  10324. interface IsEqualCustomizer {
  10325. (value: any, other: any, indexOrKey?: number | string): boolean;
  10326. }
  10327. interface LoDashStatic {
  10328. /**
  10329. * This method is like `_.isEqual` except that it accepts `customizer` which is
  10330. * invoked to compare values. If `customizer` returns `undefined` comparisons are
  10331. * handled by the method instead. The `customizer` is invoked with up to seven arguments:
  10332. * (objValue, othValue [, index|key, object, other, stack]).
  10333. *
  10334. * @static
  10335. * @memberOf _
  10336. * @category Lang
  10337. * @param {*} value The value to compare.
  10338. * @param {*} other The other value to compare.
  10339. * @param {Function} [customizer] The function to customize comparisons.
  10340. * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
  10341. * @example
  10342. *
  10343. * function isGreeting(value) {
  10344. * return /^h(?:i|ello)$/.test(value);
  10345. * }
  10346. *
  10347. * function customizer(objValue, othValue) {
  10348. * if (isGreeting(objValue) && isGreeting(othValue)) {
  10349. * return true;
  10350. * }
  10351. * }
  10352. *
  10353. * var array = ['hello', 'goodbye'];
  10354. * var other = ['hi', 'goodbye'];
  10355. *
  10356. * _.isEqualWith(array, other, customizer);
  10357. * // => true
  10358. */
  10359. isEqualWith(
  10360. value: any,
  10361. other: any,
  10362. customizer: IsEqualCustomizer
  10363. ): boolean;
  10364. }
  10365. interface LoDashImplicitWrapperBase<T, TWrapper> {
  10366. /**
  10367. * @see _.isEqualWith
  10368. */
  10369. isEqualWith(
  10370. other: any,
  10371. customizer: IsEqualCustomizer
  10372. ): boolean;
  10373. }
  10374. interface LoDashExplicitWrapperBase<T, TWrapper> {
  10375. /**
  10376. * @see _.isEqualWith
  10377. */
  10378. isEqualWith(
  10379. other: any,
  10380. customizer: IsEqualCustomizer
  10381. ): LoDashExplicitWrapper<boolean>;
  10382. }
  10383. // _.isError
  10384. interface LoDashStatic {
  10385. /**
  10386. * Checks if value is an Error, EvalError, RangeError, ReferenceError, SyntaxError, TypeError, or URIError
  10387. * object.
  10388. *
  10389. * @param value The value to check.
  10390. * @return Returns true if value is an error object, else false.
  10391. */
  10392. isError(value: any): value is Error;
  10393. }
  10394. interface LoDashImplicitWrapperBase<T, TWrapper> {
  10395. /**
  10396. * @see _.isError
  10397. */
  10398. isError(): boolean;
  10399. }
  10400. interface LoDashExplicitWrapperBase<T, TWrapper> {
  10401. /**
  10402. * @see _.isError
  10403. */
  10404. isError(): LoDashExplicitWrapper<boolean>;
  10405. }
  10406. // _.isFinite
  10407. interface LoDashStatic {
  10408. /**
  10409. * Checks if value is a finite primitive number.
  10410. *
  10411. * Note: This method is based on Number.isFinite.
  10412. *
  10413. * @param value The value to check.
  10414. * @return Returns true if value is a finite number, else false.
  10415. */
  10416. isFinite(value?: any): boolean;
  10417. }
  10418. interface LoDashImplicitWrapperBase<T, TWrapper> {
  10419. /**
  10420. * @see _.isFinite
  10421. */
  10422. isFinite(): boolean;
  10423. }
  10424. interface LoDashExplicitWrapperBase<T, TWrapper> {
  10425. /**
  10426. * @see _.isFinite
  10427. */
  10428. isFinite(): LoDashExplicitWrapper<boolean>;
  10429. }
  10430. // _.isFunction
  10431. interface LoDashStatic {
  10432. /**
  10433. * Checks if value is classified as a Function object.
  10434. *
  10435. * @param value The value to check.
  10436. * @return Returns true if value is correctly classified, else false.
  10437. */
  10438. isFunction(value?: any): value is Function;
  10439. }
  10440. interface LoDashImplicitWrapperBase<T, TWrapper> {
  10441. /**
  10442. * @see _.isFunction
  10443. */
  10444. isFunction(): boolean;
  10445. }
  10446. interface LoDashExplicitWrapperBase<T, TWrapper> {
  10447. /**
  10448. * @see _.isFunction
  10449. */
  10450. isFunction(): LoDashExplicitWrapper<boolean>;
  10451. }
  10452. // _.isInteger
  10453. interface LoDashStatic {
  10454. /**
  10455. * Checks if `value` is an integer.
  10456. *
  10457. * **Note:** This method is based on [`Number.isInteger`](https://mdn.io/Number/isInteger).
  10458. *
  10459. * @static
  10460. * @memberOf _
  10461. * @category Lang
  10462. * @param {*} value The value to check.
  10463. * @returns {boolean} Returns `true` if `value` is an integer, else `false`.
  10464. * @example
  10465. *
  10466. * _.isInteger(3);
  10467. * // => true
  10468. *
  10469. * _.isInteger(Number.MIN_VALUE);
  10470. * // => false
  10471. *
  10472. * _.isInteger(Infinity);
  10473. * // => false
  10474. *
  10475. * _.isInteger('3');
  10476. * // => false
  10477. */
  10478. isInteger(value?: any): boolean;
  10479. }
  10480. interface LoDashImplicitWrapperBase<T, TWrapper> {
  10481. /**
  10482. * @see _.isInteger
  10483. */
  10484. isInteger(): boolean;
  10485. }
  10486. interface LoDashExplicitWrapperBase<T, TWrapper> {
  10487. /**
  10488. * @see _.isInteger
  10489. */
  10490. isInteger(): LoDashExplicitWrapper<boolean>;
  10491. }
  10492. // _.isLength
  10493. interface LoDashStatic {
  10494. /**
  10495. * Checks if `value` is a valid array-like length.
  10496. *
  10497. * **Note:** This function is loosely based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).
  10498. *
  10499. * @static
  10500. * @memberOf _
  10501. * @category Lang
  10502. * @param {*} value The value to check.
  10503. * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
  10504. * @example
  10505. *
  10506. * _.isLength(3);
  10507. * // => true
  10508. *
  10509. * _.isLength(Number.MIN_VALUE);
  10510. * // => false
  10511. *
  10512. * _.isLength(Infinity);
  10513. * // => false
  10514. *
  10515. * _.isLength('3');
  10516. * // => false
  10517. */
  10518. isLength(value?: any): boolean;
  10519. }
  10520. interface LoDashImplicitWrapperBase<T, TWrapper> {
  10521. /**
  10522. * @see _.isLength
  10523. */
  10524. isLength(): boolean;
  10525. }
  10526. interface LoDashExplicitWrapperBase<T, TWrapper> {
  10527. /**
  10528. * @see _.isLength
  10529. */
  10530. isLength(): LoDashExplicitWrapper<boolean>;
  10531. }
  10532. // _.isMap
  10533. interface LoDashStatic {
  10534. /**
  10535. * Checks if value is classified as a Map object.
  10536. *
  10537. * @param value The value to check.
  10538. * @returns Returns true if value is correctly classified, else false.
  10539. */
  10540. isMap<K, V>(value?: any): value is Map<K, V>;
  10541. }
  10542. interface LoDashImplicitWrapperBase<T, TWrapper> {
  10543. /**
  10544. * @see _.isMap
  10545. */
  10546. isMap(): boolean;
  10547. }
  10548. interface LoDashExplicitWrapperBase<T, TWrapper> {
  10549. /**
  10550. * @see _.isMap
  10551. */
  10552. isMap(): LoDashExplicitWrapper<boolean>;
  10553. }
  10554. // _.isMatch
  10555. interface isMatchCustomizer {
  10556. (value: any, other: any, indexOrKey?: number | string): boolean;
  10557. }
  10558. interface LoDashStatic {
  10559. /**
  10560. * Performs a deep comparison between `object` and `source` to determine if
  10561. * `object` contains equivalent property values.
  10562. *
  10563. * **Note:** This method supports comparing the same values as `_.isEqual`.
  10564. *
  10565. * @static
  10566. * @memberOf _
  10567. * @category Lang
  10568. * @param {Object} object The object to inspect.
  10569. * @param {Object} source The object of property values to match.
  10570. * @returns {boolean} Returns `true` if `object` is a match, else `false`.
  10571. * @example
  10572. *
  10573. * var object = { 'user': 'fred', 'age': 40 };
  10574. *
  10575. * _.isMatch(object, { 'age': 40 });
  10576. * // => true
  10577. *
  10578. * _.isMatch(object, { 'age': 36 });
  10579. * // => false
  10580. */
  10581. isMatch(object: Object, source: Object): boolean;
  10582. }
  10583. interface LoDashImplicitObjectWrapper<T> {
  10584. /**
  10585. * @see _.isMatch
  10586. */
  10587. isMatch(source: Object): boolean;
  10588. }
  10589. // _.isMatchWith
  10590. interface isMatchWithCustomizer {
  10591. (value: any, other: any, indexOrKey?: number | string): boolean;
  10592. }
  10593. interface LoDashStatic {
  10594. /**
  10595. * This method is like `_.isMatch` except that it accepts `customizer` which
  10596. * is invoked to compare values. If `customizer` returns `undefined` comparisons
  10597. * are handled by the method instead. The `customizer` is invoked with three
  10598. * arguments: (objValue, srcValue, index|key, object, source).
  10599. *
  10600. * @static
  10601. * @memberOf _
  10602. * @category Lang
  10603. * @param {Object} object The object to inspect.
  10604. * @param {Object} source The object of property values to match.
  10605. * @param {Function} [customizer] The function to customize comparisons.
  10606. * @returns {boolean} Returns `true` if `object` is a match, else `false`.
  10607. * @example
  10608. *
  10609. * function isGreeting(value) {
  10610. * return /^h(?:i|ello)$/.test(value);
  10611. * }
  10612. *
  10613. * function customizer(objValue, srcValue) {
  10614. * if (isGreeting(objValue) && isGreeting(srcValue)) {
  10615. * return true;
  10616. * }
  10617. * }
  10618. *
  10619. * var object = { 'greeting': 'hello' };
  10620. * var source = { 'greeting': 'hi' };
  10621. *
  10622. * _.isMatchWith(object, source, customizer);
  10623. * // => true
  10624. */
  10625. isMatchWith(object: Object, source: Object, customizer: isMatchWithCustomizer): boolean;
  10626. }
  10627. interface LoDashImplicitObjectWrapper<T> {
  10628. /**
  10629. * @see _.isMatchWith
  10630. */
  10631. isMatchWith(source: Object, customizer: isMatchWithCustomizer): boolean;
  10632. }
  10633. // _.isNaN
  10634. interface LoDashStatic {
  10635. /**
  10636. * Checks if value is NaN.
  10637. *
  10638. * Note: This method is not the same as isNaN which returns true for undefined and other non-numeric values.
  10639. *
  10640. * @param value The value to check.
  10641. * @return Returns true if value is NaN, else false.
  10642. */
  10643. isNaN(value?: any): boolean;
  10644. }
  10645. interface LoDashImplicitWrapperBase<T, TWrapper> {
  10646. /**
  10647. * @see _.isNaN
  10648. */
  10649. isNaN(): boolean;
  10650. }
  10651. interface LoDashExplicitWrapperBase<T, TWrapper> {
  10652. /**
  10653. * @see _.isNaN
  10654. */
  10655. isNaN(): LoDashExplicitWrapper<boolean>;
  10656. }
  10657. // _.isNative
  10658. interface LoDashStatic {
  10659. /**
  10660. * Checks if value is a native function.
  10661. * @param value The value to check.
  10662. *
  10663. * @retrun Returns true if value is a native function, else false.
  10664. */
  10665. isNative(value: any): value is Function;
  10666. }
  10667. interface LoDashImplicitWrapperBase<T, TWrapper> {
  10668. /**
  10669. * see _.isNative
  10670. */
  10671. isNative(): boolean;
  10672. }
  10673. interface LoDashExplicitWrapperBase<T, TWrapper> {
  10674. /**
  10675. * see _.isNative
  10676. */
  10677. isNative(): LoDashExplicitWrapper<boolean>;
  10678. }
  10679. // _.isNil
  10680. interface LoDashStatic {
  10681. /**
  10682. * Checks if `value` is `null` or `undefined`.
  10683. *
  10684. * @static
  10685. * @memberOf _
  10686. * @category Lang
  10687. * @param {*} value The value to check.
  10688. * @returns {boolean} Returns `true` if `value` is nullish, else `false`.
  10689. * @example
  10690. *
  10691. * _.isNil(null);
  10692. * // => true
  10693. *
  10694. * _.isNil(void 0);
  10695. * // => true
  10696. *
  10697. * _.isNil(NaN);
  10698. * // => false
  10699. */
  10700. isNil(value?: any): boolean;
  10701. }
  10702. interface LoDashImplicitWrapperBase<T, TWrapper> {
  10703. /**
  10704. * see _.isNil
  10705. */
  10706. isNil(): boolean;
  10707. }
  10708. interface LoDashExplicitWrapperBase<T, TWrapper> {
  10709. /**
  10710. * see _.isNil
  10711. */
  10712. isNil(): LoDashExplicitWrapper<boolean>;
  10713. }
  10714. // _.isNull
  10715. interface LoDashStatic {
  10716. /**
  10717. * Checks if value is null.
  10718. *
  10719. * @param value The value to check.
  10720. * @return Returns true if value is null, else false.
  10721. */
  10722. isNull(value?: any): boolean;
  10723. }
  10724. interface LoDashImplicitWrapperBase<T, TWrapper> {
  10725. /**
  10726. * see _.isNull
  10727. */
  10728. isNull(): boolean;
  10729. }
  10730. interface LoDashExplicitWrapperBase<T, TWrapper> {
  10731. /**
  10732. * see _.isNull
  10733. */
  10734. isNull(): LoDashExplicitWrapper<boolean>;
  10735. }
  10736. // _.isNumber
  10737. interface LoDashStatic {
  10738. /**
  10739. * Checks if value is classified as a Number primitive or object.
  10740. *
  10741. * Note: To exclude Infinity, -Infinity, and NaN, which are classified as numbers, use the _.isFinite method.
  10742. *
  10743. * @param value The value to check.
  10744. * @return Returns true if value is correctly classified, else false.
  10745. */
  10746. isNumber(value?: any): value is number;
  10747. }
  10748. interface LoDashImplicitWrapperBase<T, TWrapper> {
  10749. /**
  10750. * see _.isNumber
  10751. */
  10752. isNumber(): boolean;
  10753. }
  10754. interface LoDashExplicitWrapperBase<T, TWrapper> {
  10755. /**
  10756. * see _.isNumber
  10757. */
  10758. isNumber(): LoDashExplicitWrapper<boolean>;
  10759. }
  10760. // _.isObject
  10761. interface LoDashStatic {
  10762. /**
  10763. * Checks if value is the language type of Object. (e.g. arrays, functions, objects, regexes, new Number(0),
  10764. * and new String(''))
  10765. *
  10766. * @param value The value to check.
  10767. * @return Returns true if value is an object, else false.
  10768. */
  10769. isObject(value?: any): boolean;
  10770. }
  10771. interface LoDashImplicitWrapperBase<T, TWrapper> {
  10772. /**
  10773. * see _.isObject
  10774. */
  10775. isObject(): boolean;
  10776. }
  10777. interface LoDashExplicitWrapperBase<T, TWrapper> {
  10778. /**
  10779. * see _.isObject
  10780. */
  10781. isObject(): LoDashExplicitWrapper<boolean>;
  10782. }
  10783. // _.isObjectLike
  10784. interface LoDashStatic {
  10785. /**
  10786. * Checks if `value` is object-like. A value is object-like if it's not `null`
  10787. * and has a `typeof` result of "object".
  10788. *
  10789. * @static
  10790. * @memberOf _
  10791. * @category Lang
  10792. * @param {*} value The value to check.
  10793. * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
  10794. * @example
  10795. *
  10796. * _.isObjectLike({});
  10797. * // => true
  10798. *
  10799. * _.isObjectLike([1, 2, 3]);
  10800. * // => true
  10801. *
  10802. * _.isObjectLike(_.noop);
  10803. * // => false
  10804. *
  10805. * _.isObjectLike(null);
  10806. * // => false
  10807. */
  10808. isObjectLike(value?: any): boolean;
  10809. }
  10810. interface LoDashImplicitWrapperBase<T, TWrapper> {
  10811. /**
  10812. * see _.isObjectLike
  10813. */
  10814. isObjectLike(): boolean;
  10815. }
  10816. interface LoDashExplicitWrapperBase<T, TWrapper> {
  10817. /**
  10818. * see _.isObjectLike
  10819. */
  10820. isObjectLike(): LoDashExplicitWrapper<boolean>;
  10821. }
  10822. // _.isPlainObject
  10823. interface LoDashStatic {
  10824. /**
  10825. * Checks if value is a plain object, that is, an object created by the Object constructor or one with a
  10826. * [[Prototype]] of null.
  10827. *
  10828. * Note: This method assumes objects created by the Object constructor have no inherited enumerable properties.
  10829. *
  10830. * @param value The value to check.
  10831. * @return Returns true if value is a plain object, else false.
  10832. */
  10833. isPlainObject(value?: any): boolean;
  10834. }
  10835. interface LoDashImplicitWrapperBase<T, TWrapper> {
  10836. /**
  10837. * see _.isPlainObject
  10838. */
  10839. isPlainObject(): boolean;
  10840. }
  10841. interface LoDashExplicitWrapperBase<T, TWrapper> {
  10842. /**
  10843. * see _.isPlainObject
  10844. */
  10845. isPlainObject(): LoDashExplicitWrapper<boolean>;
  10846. }
  10847. // _.isRegExp
  10848. interface LoDashStatic {
  10849. /**
  10850. * Checks if value is classified as a RegExp object.
  10851. * @param value The value to check.
  10852. *
  10853. * @return Returns true if value is correctly classified, else false.
  10854. */
  10855. isRegExp(value?: any): value is RegExp;
  10856. }
  10857. interface LoDashImplicitWrapperBase<T, TWrapper> {
  10858. /**
  10859. * see _.isRegExp
  10860. */
  10861. isRegExp(): boolean;
  10862. }
  10863. interface LoDashExplicitWrapperBase<T, TWrapper> {
  10864. /**
  10865. * see _.isRegExp
  10866. */
  10867. isRegExp(): LoDashExplicitWrapper<boolean>;
  10868. }
  10869. // _.isSafeInteger
  10870. interface LoDashStatic {
  10871. /**
  10872. * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754
  10873. * double precision number which isn't the result of a rounded unsafe integer.
  10874. *
  10875. * **Note:** This method is based on [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger).
  10876. *
  10877. * @static
  10878. * @memberOf _
  10879. * @category Lang
  10880. * @param {*} value The value to check.
  10881. * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`.
  10882. * @example
  10883. *
  10884. * _.isSafeInteger(3);
  10885. * // => true
  10886. *
  10887. * _.isSafeInteger(Number.MIN_VALUE);
  10888. * // => false
  10889. *
  10890. * _.isSafeInteger(Infinity);
  10891. * // => false
  10892. *
  10893. * _.isSafeInteger('3');
  10894. * // => false
  10895. */
  10896. isSafeInteger(value: any): boolean;
  10897. }
  10898. interface LoDashImplicitWrapperBase<T, TWrapper> {
  10899. /**
  10900. * see _.isSafeInteger
  10901. */
  10902. isSafeInteger(): boolean;
  10903. }
  10904. interface LoDashExplicitWrapperBase<T, TWrapper> {
  10905. /**
  10906. * see _.isSafeInteger
  10907. */
  10908. isSafeInteger(): LoDashExplicitWrapper<boolean>;
  10909. }
  10910. // _.isString
  10911. interface LoDashStatic {
  10912. /**
  10913. * Checks if value is classified as a String primitive or object.
  10914. *
  10915. * @param value The value to check.
  10916. * @return Returns true if value is correctly classified, else false.
  10917. */
  10918. isString(value?: any): value is string;
  10919. }
  10920. interface LoDashImplicitWrapperBase<T, TWrapper> {
  10921. /**
  10922. * see _.isString
  10923. */
  10924. isString(): boolean;
  10925. }
  10926. interface LoDashExplicitWrapperBase<T, TWrapper> {
  10927. /**
  10928. * see _.isString
  10929. */
  10930. isString(): LoDashExplicitWrapper<boolean>;
  10931. }
  10932. // _.isSymbol
  10933. interface LoDashStatic {
  10934. /**
  10935. * Checks if `value` is classified as a `Symbol` primitive or object.
  10936. *
  10937. * @static
  10938. * @memberOf _
  10939. * @category Lang
  10940. * @param {*} value The value to check.
  10941. * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
  10942. * @example
  10943. *
  10944. * _.isSymbol(Symbol.iterator);
  10945. * // => true
  10946. *
  10947. * _.isSymbol('abc');
  10948. * // => false
  10949. */
  10950. isSymbol(value: any): boolean;
  10951. }
  10952. interface LoDashImplicitWrapperBase<T, TWrapper> {
  10953. /**
  10954. * see _.isSymbol
  10955. */
  10956. isSymbol(): boolean;
  10957. }
  10958. interface LoDashExplicitWrapperBase<T, TWrapper> {
  10959. /**
  10960. * see _.isSymbol
  10961. */
  10962. isSymbol(): LoDashExplicitWrapper<boolean>;
  10963. }
  10964. // _.isTypedArray
  10965. interface LoDashStatic {
  10966. /**
  10967. * Checks if value is classified as a typed array.
  10968. *
  10969. * @param value The value to check.
  10970. * @return Returns true if value is correctly classified, else false.
  10971. */
  10972. isTypedArray(value: any): boolean;
  10973. }
  10974. interface LoDashImplicitWrapperBase<T, TWrapper> {
  10975. /**
  10976. * see _.isTypedArray
  10977. */
  10978. isTypedArray(): boolean;
  10979. }
  10980. interface LoDashExplicitWrapperBase<T, TWrapper> {
  10981. /**
  10982. * see _.isTypedArray
  10983. */
  10984. isTypedArray(): LoDashExplicitWrapper<boolean>;
  10985. }
  10986. // _.isUndefined
  10987. interface LoDashStatic {
  10988. /**
  10989. * Checks if value is undefined.
  10990. *
  10991. * @param value The value to check.
  10992. * @return Returns true if value is undefined, else false.
  10993. */
  10994. isUndefined(value: any): boolean;
  10995. }
  10996. interface LoDashImplicitWrapperBase<T, TWrapper> {
  10997. /**
  10998. * see _.isUndefined
  10999. */
  11000. isUndefined(): boolean;
  11001. }
  11002. interface LoDashExplicitWrapperBase<T, TWrapper> {
  11003. /**
  11004. * see _.isUndefined
  11005. */
  11006. isUndefined(): LoDashExplicitWrapper<boolean>;
  11007. }
  11008. // _.lt
  11009. interface LoDashStatic {
  11010. /**
  11011. * Checks if value is less than other.
  11012. *
  11013. * @param value The value to compare.
  11014. * @param other The other value to compare.
  11015. * @return Returns true if value is less than other, else false.
  11016. */
  11017. lt(
  11018. value: any,
  11019. other: any
  11020. ): boolean;
  11021. }
  11022. interface LoDashImplicitWrapperBase<T, TWrapper> {
  11023. /**
  11024. * @see _.lt
  11025. */
  11026. lt(other: any): boolean;
  11027. }
  11028. interface LoDashExplicitWrapperBase<T, TWrapper> {
  11029. /**
  11030. * @see _.lt
  11031. */
  11032. lt(other: any): LoDashExplicitWrapper<boolean>;
  11033. }
  11034. // _.lte
  11035. interface LoDashStatic {
  11036. /**
  11037. * Checks if value is less than or equal to other.
  11038. *
  11039. * @param value The value to compare.
  11040. * @param other The other value to compare.
  11041. * @return Returns true if value is less than or equal to other, else false.
  11042. */
  11043. lte(
  11044. value: any,
  11045. other: any
  11046. ): boolean;
  11047. }
  11048. interface LoDashImplicitWrapperBase<T, TWrapper> {
  11049. /**
  11050. * @see _.lte
  11051. */
  11052. lte(other: any): boolean;
  11053. }
  11054. interface LoDashExplicitWrapperBase<T, TWrapper> {
  11055. /**
  11056. * @see _.lte
  11057. */
  11058. lte(other: any): LoDashExplicitWrapper<boolean>;
  11059. }
  11060. // _.toArray
  11061. interface LoDashStatic {
  11062. /**
  11063. * Converts value to an array.
  11064. *
  11065. * @param value The value to convert.
  11066. * @return Returns the converted array.
  11067. */
  11068. toArray<T>(value: List<T> | Dictionary<T> | NumericDictionary<T>): T[];
  11069. /**
  11070. * @see _.toArray
  11071. */
  11072. toArray<TValue, TResult>(value: TValue): TResult[];
  11073. /**
  11074. * @see _.toArray
  11075. */
  11076. toArray<TResult>(value?: any): TResult[];
  11077. }
  11078. interface LoDashImplicitWrapper<T> {
  11079. /**
  11080. * @see _.toArray
  11081. */
  11082. toArray<TResult>(): LoDashImplicitArrayWrapper<TResult>;
  11083. }
  11084. interface LoDashImplicitArrayWrapper<T> {
  11085. /**
  11086. * @see _.toArray
  11087. */
  11088. toArray(): LoDashImplicitArrayWrapper<T>;
  11089. }
  11090. interface LoDashImplicitObjectWrapper<T> {
  11091. /**
  11092. * @see _.toArray
  11093. */
  11094. toArray<TResult>(): LoDashImplicitArrayWrapper<TResult>;
  11095. }
  11096. interface LoDashExplicitWrapper<T> {
  11097. /**
  11098. * @see _.toArray
  11099. */
  11100. toArray<TResult>(): LoDashExplicitArrayWrapper<TResult>;
  11101. }
  11102. interface LoDashExplicitArrayWrapper<T> {
  11103. /**
  11104. * @see _.toArray
  11105. */
  11106. toArray(): LoDashExplicitArrayWrapper<T>;
  11107. }
  11108. interface LoDashExplicitObjectWrapper<T> {
  11109. /**
  11110. * @see _.toArray
  11111. */
  11112. toArray<TResult>(): LoDashExplicitArrayWrapper<TResult>;
  11113. }
  11114. // _.toPlainObject
  11115. interface LoDashStatic {
  11116. /**
  11117. * Converts value to a plain object flattening inherited enumerable properties of value to own properties
  11118. * of the plain object.
  11119. *
  11120. * @param value The value to convert.
  11121. * @return Returns the converted plain object.
  11122. */
  11123. toPlainObject<TResult extends {}>(value?: any): TResult;
  11124. }
  11125. interface LoDashImplicitWrapperBase<T, TWrapper> {
  11126. /**
  11127. * @see _.toPlainObject
  11128. */
  11129. toPlainObject<TResult extends {}>(): LoDashImplicitObjectWrapper<TResult>;
  11130. }
  11131. // _.toInteger
  11132. interface LoDashStatic {
  11133. /**
  11134. * Converts `value` to an integer.
  11135. *
  11136. * **Note:** This function is loosely based on [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger).
  11137. *
  11138. * @static
  11139. * @memberOf _
  11140. * @category Lang
  11141. * @param {*} value The value to convert.
  11142. * @returns {number} Returns the converted integer.
  11143. * @example
  11144. *
  11145. * _.toInteger(3);
  11146. * // => 3
  11147. *
  11148. * _.toInteger(Number.MIN_VALUE);
  11149. * // => 0
  11150. *
  11151. * _.toInteger(Infinity);
  11152. * // => 1.7976931348623157e+308
  11153. *
  11154. * _.toInteger('3');
  11155. * // => 3
  11156. */
  11157. toInteger(value: any): number;
  11158. }
  11159. interface LoDashImplicitWrapperBase<T, TWrapper> {
  11160. /**
  11161. * @see _.toInteger
  11162. */
  11163. toInteger(): LoDashImplicitWrapper<number>;
  11164. }
  11165. interface LoDashExplicitWrapperBase<T, TWrapper> {
  11166. /**
  11167. * @see _.toInteger
  11168. */
  11169. toInteger(): LoDashExplicitWrapper<number>;
  11170. }
  11171. // _.toLength
  11172. interface LoDashStatic {
  11173. /**
  11174. * Converts `value` to an integer suitable for use as the length of an
  11175. * array-like object.
  11176. *
  11177. * **Note:** This method is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).
  11178. *
  11179. * @static
  11180. * @memberOf _
  11181. * @category Lang
  11182. * @param {*} value The value to convert.
  11183. * @return {number} Returns the converted integer.
  11184. * @example
  11185. *
  11186. * _.toLength(3);
  11187. * // => 3
  11188. *
  11189. * _.toLength(Number.MIN_VALUE);
  11190. * // => 0
  11191. *
  11192. * _.toLength(Infinity);
  11193. * // => 4294967295
  11194. *
  11195. * _.toLength('3');
  11196. * // => 3
  11197. */
  11198. toLength(value: any): number;
  11199. }
  11200. interface LoDashImplicitWrapperBase<T, TWrapper> {
  11201. /**
  11202. * @see _.toLength
  11203. */
  11204. toLength(): LoDashImplicitWrapper<number>;
  11205. }
  11206. interface LoDashExplicitWrapperBase<T, TWrapper> {
  11207. /**
  11208. * @see _.toLength
  11209. */
  11210. toLength(): LoDashExplicitWrapper<number>;
  11211. }
  11212. // _.toNumber
  11213. interface LoDashStatic {
  11214. /**
  11215. * Converts `value` to a number.
  11216. *
  11217. * @static
  11218. * @memberOf _
  11219. * @category Lang
  11220. * @param {*} value The value to process.
  11221. * @returns {number} Returns the number.
  11222. * @example
  11223. *
  11224. * _.toNumber(3);
  11225. * // => 3
  11226. *
  11227. * _.toNumber(Number.MIN_VALUE);
  11228. * // => 5e-324
  11229. *
  11230. * _.toNumber(Infinity);
  11231. * // => Infinity
  11232. *
  11233. * _.toNumber('3');
  11234. * // => 3
  11235. */
  11236. toNumber(value: any): number;
  11237. }
  11238. interface LoDashImplicitWrapperBase<T, TWrapper> {
  11239. /**
  11240. * @see _.toNumber
  11241. */
  11242. toNumber(): LoDashImplicitWrapper<number>;
  11243. }
  11244. interface LoDashExplicitWrapperBase<T, TWrapper> {
  11245. /**
  11246. * @see _.toNumber
  11247. */
  11248. toNumber(): LoDashExplicitWrapper<number>;
  11249. }
  11250. // _.toSafeInteger
  11251. interface LoDashStatic {
  11252. /**
  11253. * Converts `value` to a safe integer. A safe integer can be compared and
  11254. * represented correctly.
  11255. *
  11256. * @static
  11257. * @memberOf _
  11258. * @category Lang
  11259. * @param {*} value The value to convert.
  11260. * @returns {number} Returns the converted integer.
  11261. * @example
  11262. *
  11263. * _.toSafeInteger(3);
  11264. * // => 3
  11265. *
  11266. * _.toSafeInteger(Number.MIN_VALUE);
  11267. * // => 0
  11268. *
  11269. * _.toSafeInteger(Infinity);
  11270. * // => 9007199254740991
  11271. *
  11272. * _.toSafeInteger('3');
  11273. * // => 3
  11274. */
  11275. toSafeInteger(value: any): number;
  11276. }
  11277. interface LoDashImplicitWrapperBase<T, TWrapper> {
  11278. /**
  11279. * @see _.toSafeInteger
  11280. */
  11281. toSafeInteger(): LoDashImplicitWrapper<number>;
  11282. }
  11283. interface LoDashExplicitWrapperBase<T, TWrapper> {
  11284. /**
  11285. * @see _.toSafeInteger
  11286. */
  11287. toSafeInteger(): LoDashExplicitWrapper<number>;
  11288. }
  11289. // _.toString DUMMY
  11290. interface LoDashStatic {
  11291. /**
  11292. * Converts `value` to a string if it's not one. An empty string is returned
  11293. * for `null` and `undefined` values. The sign of `-0` is preserved.
  11294. *
  11295. * @static
  11296. * @memberOf _
  11297. * @category Lang
  11298. * @param {*} value The value to process.
  11299. * @returns {string} Returns the string.
  11300. * @example
  11301. *
  11302. * _.toString(null);
  11303. * // => ''
  11304. *
  11305. * _.toString(-0);
  11306. * // => '-0'
  11307. *
  11308. * _.toString([1, 2, 3]);
  11309. * // => '1,2,3'
  11310. */
  11311. toString(value: any): string;
  11312. }
  11313. /********
  11314. * Math *
  11315. *******/
  11316. // _.add
  11317. interface LoDashStatic {
  11318. /**
  11319. * Adds two numbers.
  11320. *
  11321. * @param augend The first number to add.
  11322. * @param addend The second number to add.
  11323. * @return Returns the sum.
  11324. */
  11325. add(
  11326. augend: number,
  11327. addend: number
  11328. ): number;
  11329. }
  11330. interface LoDashImplicitWrapper<T> {
  11331. /**
  11332. * @see _.add
  11333. */
  11334. add(addend: number): number;
  11335. }
  11336. interface LoDashExplicitWrapper<T> {
  11337. /**
  11338. * @see _.add
  11339. */
  11340. add(addend: number): LoDashExplicitWrapper<number>;
  11341. }
  11342. // _.ceil
  11343. interface LoDashStatic {
  11344. /**
  11345. * Calculates n rounded up to precision.
  11346. *
  11347. * @param n The number to round up.
  11348. * @param precision The precision to round up to.
  11349. * @return Returns the rounded up number.
  11350. */
  11351. ceil(
  11352. n: number,
  11353. precision?: number
  11354. ): number;
  11355. }
  11356. interface LoDashImplicitWrapper<T> {
  11357. /**
  11358. * @see _.ceil
  11359. */
  11360. ceil(precision?: number): number;
  11361. }
  11362. interface LoDashExplicitWrapper<T> {
  11363. /**
  11364. * @see _.ceil
  11365. */
  11366. ceil(precision?: number): LoDashExplicitWrapper<number>;
  11367. }
  11368. // _.floor
  11369. interface LoDashStatic {
  11370. /**
  11371. * Calculates n rounded down to precision.
  11372. *
  11373. * @param n The number to round down.
  11374. * @param precision The precision to round down to.
  11375. * @return Returns the rounded down number.
  11376. */
  11377. floor(
  11378. n: number,
  11379. precision?: number
  11380. ): number;
  11381. }
  11382. interface LoDashImplicitWrapper<T> {
  11383. /**
  11384. * @see _.floor
  11385. */
  11386. floor(precision?: number): number;
  11387. }
  11388. interface LoDashExplicitWrapper<T> {
  11389. /**
  11390. * @see _.floor
  11391. */
  11392. floor(precision?: number): LoDashExplicitWrapper<number>;
  11393. }
  11394. // _.max
  11395. interface LoDashStatic {
  11396. /**
  11397. * Computes the maximum value of `array`. If `array` is empty or falsey
  11398. * `undefined` is returned.
  11399. *
  11400. * @static
  11401. * @memberOf _
  11402. * @category Math
  11403. * @param {Array} array The array to iterate over.
  11404. * @returns {*} Returns the maximum value.
  11405. */
  11406. max<T>(
  11407. collection: List<T>
  11408. ): T;
  11409. }
  11410. interface LoDashImplicitArrayWrapper<T> {
  11411. /**
  11412. * @see _.max
  11413. */
  11414. max(): T;
  11415. }
  11416. interface LoDashImplicitObjectWrapper<T> {
  11417. /**
  11418. * @see _.max
  11419. */
  11420. max<T>(): T;
  11421. }
  11422. // _.maxBy
  11423. interface LoDashStatic {
  11424. /**
  11425. * This method is like `_.max` except that it accepts `iteratee` which is
  11426. * invoked for each element in `array` to generate the criterion by which
  11427. * the value is ranked. The iteratee is invoked with one argument: (value).
  11428. *
  11429. * @static
  11430. * @memberOf _
  11431. * @category Math
  11432. * @param {Array} array The array to iterate over.
  11433. * @param {Function|Object|string} [iteratee=_.identity] The iteratee invoked per element.
  11434. * @returns {*} Returns the maximum value.
  11435. * @example
  11436. *
  11437. * var objects = [{ 'n': 1 }, { 'n': 2 }];
  11438. *
  11439. * _.maxBy(objects, function(o) { return o.a; });
  11440. * // => { 'n': 2 }
  11441. *
  11442. * // using the `_.property` iteratee shorthand
  11443. * _.maxBy(objects, 'n');
  11444. * // => { 'n': 2 }
  11445. */
  11446. maxBy<T>(
  11447. collection: List<T>,
  11448. iteratee?: ListIterator<T, any>
  11449. ): T;
  11450. /**
  11451. * @see _.maxBy
  11452. */
  11453. maxBy<T>(
  11454. collection: Dictionary<T>,
  11455. iteratee?: DictionaryIterator<T, any>
  11456. ): T;
  11457. /**
  11458. * @see _.maxBy
  11459. */
  11460. maxBy<T>(
  11461. collection: List<T> | Dictionary<T>,
  11462. iteratee?: string
  11463. ): T;
  11464. /**
  11465. * @see _.maxBy
  11466. */
  11467. maxBy<TObject extends {}, T>(
  11468. collection: List<T> | Dictionary<T>,
  11469. whereValue?: TObject
  11470. ): T;
  11471. }
  11472. interface LoDashImplicitArrayWrapper<T> {
  11473. /**
  11474. * @see _.maxBy
  11475. */
  11476. maxBy(
  11477. iteratee?: ListIterator<T, any>
  11478. ): T;
  11479. /**
  11480. * @see _.maxBy
  11481. */
  11482. maxBy(
  11483. iteratee?: string
  11484. ): T;
  11485. /**
  11486. * @see _.maxBy
  11487. */
  11488. maxBy<TObject extends {}>(
  11489. whereValue?: TObject
  11490. ): T;
  11491. }
  11492. interface LoDashImplicitObjectWrapper<T> {
  11493. /**
  11494. * @see _.maxBy
  11495. */
  11496. maxBy<T>(
  11497. iteratee?: ListIterator<T, any> | DictionaryIterator<T, any>,
  11498. thisArg?: any
  11499. ): T;
  11500. /**
  11501. * @see _.maxBy
  11502. */
  11503. maxBy<T>(
  11504. iteratee?: string,
  11505. thisArg?: any
  11506. ): T;
  11507. /**
  11508. * @see _.maxBy
  11509. */
  11510. maxBy<TObject extends {}, T>(
  11511. whereValue?: TObject
  11512. ): T;
  11513. }
  11514. // _.mean
  11515. interface LoDashStatic {
  11516. /**
  11517. * Computes the mean of the values in `array`.
  11518. *
  11519. * @static
  11520. * @memberOf _
  11521. * @category Math
  11522. * @param {Array} array The array to iterate over.
  11523. * @returns {number} Returns the mean.
  11524. * @example
  11525. *
  11526. * _.mean([4, 2, 8, 6]);
  11527. * // => 5
  11528. */
  11529. mean<T>(
  11530. collection: List<T>
  11531. ): number;
  11532. }
  11533. interface LoDashImplicitArrayWrapper<T> {
  11534. /**
  11535. * @see _.mean
  11536. */
  11537. mean<T>(): number;
  11538. /**
  11539. * @see _.mean
  11540. */
  11541. mean(): number;
  11542. }
  11543. // _.min
  11544. interface LoDashStatic {
  11545. /**
  11546. * Computes the minimum value of `array`. If `array` is empty or falsey
  11547. * `undefined` is returned.
  11548. *
  11549. * @static
  11550. * @memberOf _
  11551. * @category Math
  11552. * @param {Array} array The array to iterate over.
  11553. * @returns {*} Returns the minimum value.
  11554. */
  11555. min<T>(
  11556. collection: List<T>
  11557. ): T;
  11558. }
  11559. interface LoDashImplicitArrayWrapper<T> {
  11560. /**
  11561. * @see _.min
  11562. */
  11563. min(): T;
  11564. }
  11565. interface LoDashImplicitObjectWrapper<T> {
  11566. /**
  11567. * @see _.min
  11568. */
  11569. min<T>(): T;
  11570. }
  11571. // _.minBy
  11572. interface LoDashStatic {
  11573. /**
  11574. * This method is like `_.min` except that it accepts `iteratee` which is
  11575. * invoked for each element in `array` to generate the criterion by which
  11576. * the value is ranked. The iteratee is invoked with one argument: (value).
  11577. *
  11578. * @static
  11579. * @memberOf _
  11580. * @category Math
  11581. * @param {Array} array The array to iterate over.
  11582. * @param {Function|Object|string} [iteratee=_.identity] The iteratee invoked per element.
  11583. * @returns {*} Returns the minimum value.
  11584. * @example
  11585. *
  11586. * var objects = [{ 'n': 1 }, { 'n': 2 }];
  11587. *
  11588. * _.minBy(objects, function(o) { return o.a; });
  11589. * // => { 'n': 1 }
  11590. *
  11591. * // using the `_.property` iteratee shorthand
  11592. * _.minBy(objects, 'n');
  11593. * // => { 'n': 1 }
  11594. */
  11595. minBy<T>(
  11596. collection: List<T>,
  11597. iteratee?: ListIterator<T, any>
  11598. ): T;
  11599. /**
  11600. * @see _.minBy
  11601. */
  11602. minBy<T>(
  11603. collection: Dictionary<T>,
  11604. iteratee?: DictionaryIterator<T, any>
  11605. ): T;
  11606. /**
  11607. * @see _.minBy
  11608. */
  11609. minBy<T>(
  11610. collection: List<T> | Dictionary<T>,
  11611. iteratee?: string
  11612. ): T;
  11613. /**
  11614. * @see _.minBy
  11615. */
  11616. minBy<TObject extends {}, T>(
  11617. collection: List<T> | Dictionary<T>,
  11618. whereValue?: TObject
  11619. ): T;
  11620. }
  11621. interface LoDashImplicitArrayWrapper<T> {
  11622. /**
  11623. * @see _.minBy
  11624. */
  11625. minBy(
  11626. iteratee?: ListIterator<T, any>
  11627. ): T;
  11628. /**
  11629. * @see _.minBy
  11630. */
  11631. minBy(
  11632. iteratee?: string
  11633. ): T;
  11634. /**
  11635. * @see _.minBy
  11636. */
  11637. minBy<TObject extends {}>(
  11638. whereValue?: TObject
  11639. ): T;
  11640. }
  11641. interface LoDashImplicitObjectWrapper<T> {
  11642. /**
  11643. * @see _.minBy
  11644. */
  11645. minBy<T>(
  11646. iteratee?: ListIterator<T, any> | DictionaryIterator<T, any>,
  11647. thisArg?: any
  11648. ): T;
  11649. /**
  11650. * @see _.minBy
  11651. */
  11652. minBy<T>(
  11653. iteratee?: string,
  11654. thisArg?: any
  11655. ): T;
  11656. /**
  11657. * @see _.minBy
  11658. */
  11659. minBy<TObject extends {}, T>(
  11660. whereValue?: TObject
  11661. ): T;
  11662. }
  11663. // _.round
  11664. interface LoDashStatic {
  11665. /**
  11666. * Calculates n rounded to precision.
  11667. *
  11668. * @param n The number to round.
  11669. * @param precision The precision to round to.
  11670. * @return Returns the rounded number.
  11671. */
  11672. round(
  11673. n: number,
  11674. precision?: number
  11675. ): number;
  11676. }
  11677. interface LoDashImplicitWrapper<T> {
  11678. /**
  11679. * @see _.round
  11680. */
  11681. round(precision?: number): number;
  11682. }
  11683. interface LoDashExplicitWrapper<T> {
  11684. /**
  11685. * @see _.round
  11686. */
  11687. round(precision?: number): LoDashExplicitWrapper<number>;
  11688. }
  11689. // _.sum
  11690. interface LoDashStatic {
  11691. /**
  11692. * Computes the sum of the values in `array`.
  11693. *
  11694. * @static
  11695. * @memberOf _
  11696. * @category Math
  11697. * @param {Array} array The array to iterate over.
  11698. * @returns {number} Returns the sum.
  11699. * @example
  11700. *
  11701. * _.sum([4, 2, 8, 6]);
  11702. * // => 20
  11703. */
  11704. sum<T>(collection: List<T>): number;
  11705. /**
  11706. * @see _.sum
  11707. */
  11708. sum(collection: List<number> | Dictionary<number>): number;
  11709. }
  11710. interface LoDashImplicitArrayWrapper<T> {
  11711. /**
  11712. * @see _.sum
  11713. */
  11714. sum(): number;
  11715. }
  11716. interface LoDashImplicitObjectWrapper<T> {
  11717. /**
  11718. * @see _.sum
  11719. */
  11720. sum<TValue>(): number;
  11721. /**
  11722. * @see _.sum
  11723. */
  11724. sum(): number;
  11725. }
  11726. interface LoDashExplicitArrayWrapper<T> {
  11727. /**
  11728. * @see _.sum
  11729. */
  11730. sum(): LoDashExplicitWrapper<number>;
  11731. }
  11732. interface LoDashExplicitObjectWrapper<T> {
  11733. /**
  11734. * @see _.sum
  11735. */
  11736. sum<TValue>(): LoDashExplicitWrapper<number>;
  11737. /**
  11738. * @see _.sum
  11739. */
  11740. sum(): LoDashExplicitWrapper<number>;
  11741. }
  11742. // _.sumBy
  11743. interface LoDashStatic {
  11744. /**
  11745. * This method is like `_.sum` except that it accepts `iteratee` which is
  11746. * invoked for each element in `array` to generate the value to be summed.
  11747. * The iteratee is invoked with one argument: (value).
  11748. *
  11749. * @static
  11750. * @memberOf _
  11751. * @category Math
  11752. * @param {Array} array The array to iterate over.
  11753. * @param {Function|Object|string} [iteratee=_.identity] The iteratee invoked per element.
  11754. * @returns {number} Returns the sum.
  11755. * @example
  11756. *
  11757. * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];
  11758. *
  11759. * _.sumBy(objects, function(o) { return o.n; });
  11760. * // => 20
  11761. *
  11762. * // using the `_.property` iteratee shorthand
  11763. * _.sumBy(objects, 'n');
  11764. * // => 20
  11765. */
  11766. sumBy<T>(
  11767. collection: List<T>,
  11768. iteratee: ListIterator<T, number>
  11769. ): number;
  11770. /**
  11771. * @see _.sumBy
  11772. */
  11773. sumBy<T>(
  11774. collection: List<T>,
  11775. iteratee: string
  11776. ): number;
  11777. /**
  11778. * @see _.sumBy
  11779. */
  11780. sumBy<T>(
  11781. collection: Dictionary<T>,
  11782. iteratee: DictionaryIterator<T, number>
  11783. ): number;
  11784. /**
  11785. * @see _.sumBy
  11786. */
  11787. sumBy<T>(
  11788. collection: List<number> | Dictionary<number>,
  11789. iteratee: string
  11790. ): number;
  11791. /**
  11792. * @see _.sumBy
  11793. */
  11794. sumBy<T>(collection: List<T> | Dictionary<T>): number;
  11795. /**
  11796. * @see _.sumBy
  11797. */
  11798. sumBy(collection: List<number> | Dictionary<number>): number;
  11799. }
  11800. interface LoDashImplicitArrayWrapper<T> {
  11801. /**
  11802. * @see _.sumBy
  11803. */
  11804. sumBy(
  11805. iteratee: ListIterator<T, number>
  11806. ): number;
  11807. /**
  11808. * @see _.sumBy
  11809. */
  11810. sumBy(iteratee: string): number;
  11811. /**
  11812. * @see _.sumBy
  11813. */
  11814. sumBy(): number;
  11815. }
  11816. interface LoDashImplicitObjectWrapper<T> {
  11817. /**
  11818. * @see _.sumBy
  11819. */
  11820. sumBy<TValue>(
  11821. iteratee: ListIterator<TValue, number> | DictionaryIterator<TValue, number>
  11822. ): number;
  11823. /**
  11824. * @see _.sumBy
  11825. */
  11826. sumBy(iteratee: string): number;
  11827. /**
  11828. * @see _.sumBy
  11829. */
  11830. sumBy(): number;
  11831. }
  11832. interface LoDashExplicitArrayWrapper<T> {
  11833. /**
  11834. * @see _.sumBy
  11835. */
  11836. sumBy(
  11837. iteratee: ListIterator<T, number>
  11838. ): LoDashExplicitWrapper<number>;
  11839. /**
  11840. * @see _.sumBy
  11841. */
  11842. sumBy(iteratee: string): LoDashExplicitWrapper<number>;
  11843. /**
  11844. * @see _.sumBy
  11845. */
  11846. sumBy(): LoDashExplicitWrapper<number>;
  11847. }
  11848. interface LoDashExplicitObjectWrapper<T> {
  11849. /**
  11850. * @see _.sumBy
  11851. */
  11852. sumBy<TValue>(
  11853. iteratee: ListIterator<TValue, number> | DictionaryIterator<TValue, number>
  11854. ): LoDashExplicitWrapper<number>;
  11855. /**
  11856. * @see _.sumBy
  11857. */
  11858. sumBy(iteratee: string): LoDashExplicitWrapper<number>;
  11859. /**
  11860. * @see _.sumBy
  11861. */
  11862. sumBy(): LoDashExplicitWrapper<number>;
  11863. }
  11864. /**********
  11865. * Number *
  11866. *********/
  11867. // _.subtract
  11868. interface LoDashStatic {
  11869. /**
  11870. * Subtract two numbers.
  11871. *
  11872. * @static
  11873. * @memberOf _
  11874. * @category Math
  11875. * @param {number} minuend The first number in a subtraction.
  11876. * @param {number} subtrahend The second number in a subtraction.
  11877. * @returns {number} Returns the difference.
  11878. * @example
  11879. *
  11880. * _.subtract(6, 4);
  11881. * // => 2
  11882. */
  11883. subtract(
  11884. minuend: number,
  11885. subtrahend: number
  11886. ): number;
  11887. }
  11888. interface LoDashImplicitWrapper<T> {
  11889. /**
  11890. * @see _.subtract
  11891. */
  11892. subtract(
  11893. subtrahend: number
  11894. ): number;
  11895. }
  11896. interface LoDashExplicitWrapper<T> {
  11897. /**
  11898. * @see _.subtract
  11899. */
  11900. subtract(
  11901. subtrahend: number
  11902. ): LoDashExplicitWrapper<number>;
  11903. }
  11904. // _.clamp
  11905. interface LoDashStatic {
  11906. /**
  11907. * Clamps `number` within the inclusive `lower` and `upper` bounds.
  11908. *
  11909. * @static
  11910. * @memberOf _
  11911. * @category Number
  11912. * @param {number} number The number to clamp.
  11913. * @param {number} [lower] The lower bound.
  11914. * @param {number} upper The upper bound.
  11915. * @returns {number} Returns the clamped number.
  11916. * @example
  11917. *
  11918. * _.clamp(-10, -5, 5);
  11919. * // => -5
  11920. *
  11921. * _.clamp(10, -5, 5);
  11922. * // => 5
  11923. */
  11924. clamp(
  11925. number: number,
  11926. lower: number,
  11927. upper: number
  11928. ): number;
  11929. }
  11930. interface LoDashImplicitWrapper<T> {
  11931. /**
  11932. * @see _.clamp
  11933. */
  11934. clamp(
  11935. lower: number,
  11936. upper: number
  11937. ): number;
  11938. }
  11939. interface LoDashExplicitWrapper<T> {
  11940. /**
  11941. * @see _.clamp
  11942. */
  11943. clamp(
  11944. lower: number,
  11945. upper: number
  11946. ): LoDashExplicitWrapper<number>;
  11947. }
  11948. // _.inRange
  11949. interface LoDashStatic {
  11950. /**
  11951. * Checks if n is between start and up to but not including, end. If end is not specified its set to start
  11952. * with start then set to 0.
  11953. *
  11954. * @param n The number to check.
  11955. * @param start The start of the range.
  11956. * @param end The end of the range.
  11957. * @return Returns true if n is in the range, else false.
  11958. */
  11959. inRange(
  11960. n: number,
  11961. start: number,
  11962. end: number
  11963. ): boolean;
  11964. /**
  11965. * @see _.inRange
  11966. */
  11967. inRange(
  11968. n: number,
  11969. end: number
  11970. ): boolean;
  11971. }
  11972. interface LoDashImplicitWrapper<T> {
  11973. /**
  11974. * @see _.inRange
  11975. */
  11976. inRange(
  11977. start: number,
  11978. end: number
  11979. ): boolean;
  11980. /**
  11981. * @see _.inRange
  11982. */
  11983. inRange(end: number): boolean;
  11984. }
  11985. interface LoDashExplicitWrapper<T> {
  11986. /**
  11987. * @see _.inRange
  11988. */
  11989. inRange(
  11990. start: number,
  11991. end: number
  11992. ): LoDashExplicitWrapper<boolean>;
  11993. /**
  11994. * @see _.inRange
  11995. */
  11996. inRange(end: number): LoDashExplicitWrapper<boolean>;
  11997. }
  11998. // _.random
  11999. interface LoDashStatic {
  12000. /**
  12001. * Produces a random number between min and max (inclusive). If only one argument is provided a number between
  12002. * 0 and the given number is returned. If floating is true, or either min or max are floats, a floating-point
  12003. * number is returned instead of an integer.
  12004. *
  12005. * @param min The minimum possible value.
  12006. * @param max The maximum possible value.
  12007. * @param floating Specify returning a floating-point number.
  12008. * @return Returns the random number.
  12009. */
  12010. random(
  12011. min?: number,
  12012. max?: number,
  12013. floating?: boolean
  12014. ): number;
  12015. /**
  12016. * @see _.random
  12017. */
  12018. random(
  12019. min?: number,
  12020. floating?: boolean
  12021. ): number;
  12022. /**
  12023. * @see _.random
  12024. */
  12025. random(floating?: boolean): number;
  12026. }
  12027. interface LoDashImplicitWrapper<T> {
  12028. /**
  12029. * @see _.random
  12030. */
  12031. random(
  12032. max?: number,
  12033. floating?: boolean
  12034. ): number;
  12035. /**
  12036. * @see _.random
  12037. */
  12038. random(floating?: boolean): number;
  12039. }
  12040. interface LoDashExplicitWrapper<T> {
  12041. /**
  12042. * @see _.random
  12043. */
  12044. random(
  12045. max?: number,
  12046. floating?: boolean
  12047. ): LoDashExplicitWrapper<number>;
  12048. /**
  12049. * @see _.random
  12050. */
  12051. random(floating?: boolean): LoDashExplicitWrapper<number>;
  12052. }
  12053. /**********
  12054. * Object *
  12055. *********/
  12056. // _.assign
  12057. interface LoDashStatic {
  12058. /**
  12059. * Assigns own enumerable properties of source objects to the destination
  12060. * object. Source objects are applied from left to right. Subsequent sources
  12061. * overwrite property assignments of previous sources.
  12062. *
  12063. * **Note:** This method mutates `object` and is loosely based on
  12064. * [`Object.assign`](https://mdn.io/Object/assign).
  12065. *
  12066. * @static
  12067. * @memberOf _
  12068. * @category Object
  12069. * @param {Object} object The destination object.
  12070. * @param {...Object} [sources] The source objects.
  12071. * @returns {Object} Returns `object`.
  12072. * @example
  12073. *
  12074. * function Foo() {
  12075. * this.c = 3;
  12076. * }
  12077. *
  12078. * function Bar() {
  12079. * this.e = 5;
  12080. * }
  12081. *
  12082. * Foo.prototype.d = 4;
  12083. * Bar.prototype.f = 6;
  12084. *
  12085. * _.assign({ 'a': 1 }, new Foo, new Bar);
  12086. * // => { 'a': 1, 'c': 3, 'e': 5 }
  12087. */
  12088. assign<TObject extends {}, TSource extends {}, TResult extends {}>(
  12089. object: TObject,
  12090. source: TSource
  12091. ): TResult;
  12092. /**
  12093. * @see assign
  12094. */
  12095. assign<TObject extends {}, TSource1 extends {}, TSource2 extends {}, TResult extends {}>(
  12096. object: TObject,
  12097. source1: TSource1,
  12098. source2: TSource2
  12099. ): TResult;
  12100. /**
  12101. * @see assign
  12102. */
  12103. assign<TObject extends {}, TSource1 extends {}, TSource2 extends {}, TSource3 extends {}, TResult extends {}>(
  12104. object: TObject,
  12105. source1: TSource1,
  12106. source2: TSource2,
  12107. source3: TSource3
  12108. ): TResult;
  12109. /**
  12110. * @see assign
  12111. */
  12112. assign<TObject extends {}, TSource1 extends {}, TSource2 extends {}, TSource3 extends {}, TSource4 extends {},
  12113. TResult extends {}>
  12114. (
  12115. object: TObject,
  12116. source1: TSource1,
  12117. source2: TSource2,
  12118. source3: TSource3,
  12119. source4: TSource4
  12120. ): TResult;
  12121. /**
  12122. * @see _.assign
  12123. */
  12124. assign<TObject extends {}>(object: TObject): TObject;
  12125. /**
  12126. * @see _.assign
  12127. */
  12128. assign<TObject extends {}, TResult extends {}>(
  12129. object: TObject, ...otherArgs: any[]
  12130. ): TResult;
  12131. }
  12132. interface LoDashImplicitObjectWrapper<T> {
  12133. /**
  12134. * @see _.assign
  12135. */
  12136. assign<TSource extends {}, TResult extends {}>(
  12137. source: TSource
  12138. ): LoDashImplicitObjectWrapper<TResult>;
  12139. /**
  12140. * @see assign
  12141. */
  12142. assign<TSource1 extends {}, TSource2 extends {}, TResult extends {}>(
  12143. source1: TSource1,
  12144. source2: TSource2
  12145. ): LoDashImplicitObjectWrapper<TResult>;
  12146. /**
  12147. * @see assign
  12148. */
  12149. assign<TSource1 extends {}, TSource2 extends {}, TSource3 extends {}, TResult extends {}>(
  12150. source1: TSource1,
  12151. source2: TSource2,
  12152. source3: TSource3
  12153. ): LoDashImplicitObjectWrapper<TResult>;
  12154. /**
  12155. * @see assign
  12156. */
  12157. assign<TSource1 extends {}, TSource2 extends {}, TSource3 extends {}, TSource4 extends {}, TResult extends {}>(
  12158. source1: TSource1,
  12159. source2: TSource2,
  12160. source3: TSource3,
  12161. source4: TSource4
  12162. ): LoDashImplicitObjectWrapper<TResult>;
  12163. /**
  12164. * @see _.assign
  12165. */
  12166. assign(): LoDashImplicitObjectWrapper<T>;
  12167. /**
  12168. * @see _.assign
  12169. */
  12170. assign<TResult extends {}>(...otherArgs: any[]): LoDashImplicitObjectWrapper<TResult>;
  12171. }
  12172. interface LoDashExplicitObjectWrapper<T> {
  12173. /**
  12174. * @see _.assign
  12175. */
  12176. assign<TSource extends {}, TResult extends {}>(
  12177. source: TSource
  12178. ): LoDashExplicitObjectWrapper<TResult>;
  12179. /**
  12180. * @see assign
  12181. */
  12182. assign<TSource1 extends {}, TSource2 extends {}, TResult extends {}>(
  12183. source1: TSource1,
  12184. source2: TSource2
  12185. ): LoDashExplicitObjectWrapper<TResult>;
  12186. /**
  12187. * @see assign
  12188. */
  12189. assign<TSource1 extends {}, TSource2 extends {}, TSource3 extends {}, TResult extends {}>(
  12190. source1: TSource1,
  12191. source2: TSource2,
  12192. source3: TSource3
  12193. ): LoDashExplicitObjectWrapper<TResult>;
  12194. /**
  12195. * @see assign
  12196. */
  12197. assign<TSource1 extends {}, TSource2 extends {}, TSource3 extends {}, TSource4 extends {}, TResult extends {}>(
  12198. source1: TSource1,
  12199. source2: TSource2,
  12200. source3: TSource3,
  12201. source4: TSource4
  12202. ): LoDashExplicitObjectWrapper<TResult>;
  12203. /**
  12204. * @see _.assign
  12205. */
  12206. assign(): LoDashExplicitObjectWrapper<T>;
  12207. /**
  12208. * @see _.assign
  12209. */
  12210. assign<TResult extends {}>(...otherArgs: any[]): LoDashExplicitObjectWrapper<TResult>;
  12211. }
  12212. // _.assignWith
  12213. interface AssignCustomizer {
  12214. (objectValue: any, sourceValue: any, key?: string, object?: {}, source?: {}): any;
  12215. }
  12216. interface LoDashStatic {
  12217. /**
  12218. * This method is like `_.assign` except that it accepts `customizer` which
  12219. * is invoked to produce the assigned values. If `customizer` returns `undefined`
  12220. * assignment is handled by the method instead. The `customizer` is invoked
  12221. * with five arguments: (objValue, srcValue, key, object, source).
  12222. *
  12223. * **Note:** This method mutates `object`.
  12224. *
  12225. * @static
  12226. * @memberOf _
  12227. * @category Object
  12228. * @param {Object} object The destination object.
  12229. * @param {...Object} sources The source objects.
  12230. * @param {Function} [customizer] The function to customize assigned values.
  12231. * @returns {Object} Returns `object`.
  12232. * @example
  12233. *
  12234. * function customizer(objValue, srcValue) {
  12235. * return _.isUndefined(objValue) ? srcValue : objValue;
  12236. * }
  12237. *
  12238. * var defaults = _.partialRight(_.assignWith, customizer);
  12239. *
  12240. * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
  12241. * // => { 'a': 1, 'b': 2 }
  12242. */
  12243. assignWith<TObject extends {}, TSource extends {}, TResult extends {}>(
  12244. object: TObject,
  12245. source: TSource,
  12246. customizer: AssignCustomizer
  12247. ): TResult;
  12248. /**
  12249. * @see assignWith
  12250. */
  12251. assignWith<TObject extends {}, TSource1 extends {}, TSource2 extends {}, TResult extends {}>(
  12252. object: TObject,
  12253. source1: TSource1,
  12254. source2: TSource2,
  12255. customizer: AssignCustomizer
  12256. ): TResult;
  12257. /**
  12258. * @see assignWith
  12259. */
  12260. assignWith<TObject extends {}, TSource1 extends {}, TSource2 extends {}, TSource3 extends {}, TResult extends {}>(
  12261. object: TObject,
  12262. source1: TSource1,
  12263. source2: TSource2,
  12264. source3: TSource3,
  12265. customizer: AssignCustomizer
  12266. ): TResult;
  12267. /**
  12268. * @see assignWith
  12269. */
  12270. assignWith<TObject extends {}, TSource1 extends {}, TSource2 extends {}, TSource3 extends {}, TSource4 extends {},
  12271. TResult extends {}>
  12272. (
  12273. object: TObject,
  12274. source1: TSource1,
  12275. source2: TSource2,
  12276. source3: TSource3,
  12277. source4: TSource4,
  12278. customizer: AssignCustomizer
  12279. ): TResult;
  12280. /**
  12281. * @see _.assignWith
  12282. */
  12283. assignWith<TObject extends {}>(object: TObject): TObject;
  12284. /**
  12285. * @see _.assignWith
  12286. */
  12287. assignWith<TObject extends {}, TResult extends {}>(
  12288. object: TObject, ...otherArgs: any[]
  12289. ): TResult;
  12290. }
  12291. interface LoDashImplicitObjectWrapper<T> {
  12292. /**
  12293. * @see _.assignWith
  12294. */
  12295. assignWith<TSource extends {}, TResult extends {}>(
  12296. source: TSource,
  12297. customizer: AssignCustomizer
  12298. ): LoDashImplicitObjectWrapper<TResult>;
  12299. /**
  12300. * @see assignWith
  12301. */
  12302. assignWith<TSource1 extends {}, TSource2 extends {}, TResult extends {}>(
  12303. source1: TSource1,
  12304. source2: TSource2,
  12305. customizer: AssignCustomizer
  12306. ): LoDashImplicitObjectWrapper<TResult>;
  12307. /**
  12308. * @see assignWith
  12309. */
  12310. assignWith<TSource1 extends {}, TSource2 extends {}, TSource3 extends {}, TResult extends {}>(
  12311. source1: TSource1,
  12312. source2: TSource2,
  12313. source3: TSource3,
  12314. customizer: AssignCustomizer
  12315. ): LoDashImplicitObjectWrapper<TResult>;
  12316. /**
  12317. * @see assignWith
  12318. */
  12319. assignWith<TSource1 extends {}, TSource2 extends {}, TSource3 extends {}, TSource4 extends {}, TResult extends {}>(
  12320. source1: TSource1,
  12321. source2: TSource2,
  12322. source3: TSource3,
  12323. source4: TSource4,
  12324. customizer: AssignCustomizer
  12325. ): LoDashImplicitObjectWrapper<TResult>;
  12326. /**
  12327. * @see _.assignWith
  12328. */
  12329. assignWith(): LoDashImplicitObjectWrapper<T>;
  12330. /**
  12331. * @see _.assignWith
  12332. */
  12333. assignWith<TResult extends {}>(...otherArgs: any[]): LoDashImplicitObjectWrapper<TResult>;
  12334. }
  12335. interface LoDashExplicitObjectWrapper<T> {
  12336. /**
  12337. * @see _.assignWith
  12338. */
  12339. assignWith<TSource extends {}, TResult extends {}>(
  12340. source: TSource,
  12341. customizer: AssignCustomizer
  12342. ): LoDashExplicitObjectWrapper<TResult>;
  12343. /**
  12344. * @see assignWith
  12345. */
  12346. assignWith<TSource1 extends {}, TSource2 extends {}, TResult extends {}>(
  12347. source1: TSource1,
  12348. source2: TSource2,
  12349. customizer: AssignCustomizer
  12350. ): LoDashExplicitObjectWrapper<TResult>;
  12351. /**
  12352. * @see assignWith
  12353. */
  12354. assignWith<TSource1 extends {}, TSource2 extends {}, TSource3 extends {}, TResult extends {}>(
  12355. source1: TSource1,
  12356. source2: TSource2,
  12357. source3: TSource3,
  12358. customizer: AssignCustomizer
  12359. ): LoDashExplicitObjectWrapper<TResult>;
  12360. /**
  12361. * @see assignWith
  12362. */
  12363. assignWith<TSource1 extends {}, TSource2 extends {}, TSource3 extends {}, TSource4 extends {}, TResult extends {}>(
  12364. source1: TSource1,
  12365. source2: TSource2,
  12366. source3: TSource3,
  12367. source4: TSource4,
  12368. customizer: AssignCustomizer
  12369. ): LoDashExplicitObjectWrapper<TResult>;
  12370. /**
  12371. * @see _.assignWith
  12372. */
  12373. assignWith(): LoDashExplicitObjectWrapper<T>;
  12374. /**
  12375. * @see _.assignWith
  12376. */
  12377. assignWith<TResult extends {}>(...otherArgs: any[]): LoDashExplicitObjectWrapper<TResult>;
  12378. }
  12379. // _.assignIn
  12380. interface LoDashStatic {
  12381. /**
  12382. * This method is like `_.assign` except that it iterates over own and
  12383. * inherited source properties.
  12384. *
  12385. * **Note:** This method mutates `object`.
  12386. *
  12387. * @static
  12388. * @memberOf _
  12389. * @alias extend
  12390. * @category Object
  12391. * @param {Object} object The destination object.
  12392. * @param {...Object} [sources] The source objects.
  12393. * @returns {Object} Returns `object`.
  12394. * @example
  12395. *
  12396. * function Foo() {
  12397. * this.b = 2;
  12398. * }
  12399. *
  12400. * function Bar() {
  12401. * this.d = 4;
  12402. * }
  12403. *
  12404. * Foo.prototype.c = 3;
  12405. * Bar.prototype.e = 5;
  12406. *
  12407. * _.assignIn({ 'a': 1 }, new Foo, new Bar);
  12408. * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4, 'e': 5 }
  12409. */
  12410. assignIn<TObject extends {}, TSource extends {}, TResult extends {}>(
  12411. object: TObject,
  12412. source: TSource
  12413. ): TResult;
  12414. /**
  12415. * @see assignIn
  12416. */
  12417. assignIn<TObject extends {}, TSource1 extends {}, TSource2 extends {}, TResult extends {}>(
  12418. object: TObject,
  12419. source1: TSource1,
  12420. source2: TSource2
  12421. ): TResult;
  12422. /**
  12423. * @see assignIn
  12424. */
  12425. assignIn<TObject extends {}, TSource1 extends {}, TSource2 extends {}, TSource3 extends {}, TResult extends {}>(
  12426. object: TObject,
  12427. source1: TSource1,
  12428. source2: TSource2,
  12429. source3: TSource3
  12430. ): TResult;
  12431. /**
  12432. * @see assignIn
  12433. */
  12434. assignIn<TObject extends {}, TSource1 extends {}, TSource2 extends {}, TSource3 extends {}, TSource4 extends {},
  12435. TResult extends {}>
  12436. (
  12437. object: TObject,
  12438. source1: TSource1,
  12439. source2: TSource2,
  12440. source3: TSource3,
  12441. source4: TSource4
  12442. ): TResult;
  12443. /**
  12444. * @see _.assignIn
  12445. */
  12446. assignIn<TObject extends {}>(object: TObject): TObject;
  12447. /**
  12448. * @see _.assignIn
  12449. */
  12450. assignIn<TObject extends {}, TResult extends {}>(
  12451. object: TObject, ...otherArgs: any[]
  12452. ): TResult;
  12453. }
  12454. interface LoDashImplicitObjectWrapper<T> {
  12455. /**
  12456. * @see _.assignIn
  12457. */
  12458. assignIn<TSource extends {}, TResult extends {}>(
  12459. source: TSource
  12460. ): LoDashImplicitObjectWrapper<TResult>;
  12461. /**
  12462. * @see assignIn
  12463. */
  12464. assignIn<TSource1 extends {}, TSource2 extends {}, TResult extends {}>(
  12465. source1: TSource1,
  12466. source2: TSource2
  12467. ): LoDashImplicitObjectWrapper<TResult>;
  12468. /**
  12469. * @see assignIn
  12470. */
  12471. assignIn<TSource1 extends {}, TSource2 extends {}, TSource3 extends {}, TResult extends {}>(
  12472. source1: TSource1,
  12473. source2: TSource2,
  12474. source3: TSource3
  12475. ): LoDashImplicitObjectWrapper<TResult>;
  12476. /**
  12477. * @see assignIn
  12478. */
  12479. assignIn<TSource1 extends {}, TSource2 extends {}, TSource3 extends {}, TSource4 extends {}, TResult extends {}>(
  12480. source1: TSource1,
  12481. source2: TSource2,
  12482. source3: TSource3,
  12483. source4: TSource4
  12484. ): LoDashImplicitObjectWrapper<TResult>;
  12485. /**
  12486. * @see _.assignIn
  12487. */
  12488. assignIn(): LoDashImplicitObjectWrapper<T>;
  12489. /**
  12490. * @see _.assignIn
  12491. */
  12492. assignIn<TResult extends {}>(...otherArgs: any[]): LoDashImplicitObjectWrapper<TResult>;
  12493. }
  12494. interface LoDashExplicitObjectWrapper<T> {
  12495. /**
  12496. * @see _.assignIn
  12497. */
  12498. assignIn<TSource extends {}, TResult extends {}>(
  12499. source: TSource
  12500. ): LoDashExplicitObjectWrapper<TResult>;
  12501. /**
  12502. * @see assignIn
  12503. */
  12504. assignIn<TSource1 extends {}, TSource2 extends {}, TResult extends {}>(
  12505. source1: TSource1,
  12506. source2: TSource2
  12507. ): LoDashExplicitObjectWrapper<TResult>;
  12508. /**
  12509. * @see assignIn
  12510. */
  12511. assignIn<TSource1 extends {}, TSource2 extends {}, TSource3 extends {}, TResult extends {}>(
  12512. source1: TSource1,
  12513. source2: TSource2,
  12514. source3: TSource3
  12515. ): LoDashExplicitObjectWrapper<TResult>;
  12516. /**
  12517. * @see assignIn
  12518. */
  12519. assignIn<TSource1 extends {}, TSource2 extends {}, TSource3 extends {}, TSource4 extends {}, TResult extends {}>(
  12520. source1: TSource1,
  12521. source2: TSource2,
  12522. source3: TSource3,
  12523. source4: TSource4
  12524. ): LoDashExplicitObjectWrapper<TResult>;
  12525. /**
  12526. * @see _.assignIn
  12527. */
  12528. assignIn(): LoDashExplicitObjectWrapper<T>;
  12529. /**
  12530. * @see _.assignIn
  12531. */
  12532. assignIn<TResult extends {}>(...otherArgs: any[]): LoDashExplicitObjectWrapper<TResult>;
  12533. }
  12534. // _.assignInWith
  12535. interface AssignCustomizer {
  12536. (objectValue: any, sourceValue: any, key?: string, object?: {}, source?: {}): any;
  12537. }
  12538. interface LoDashStatic {
  12539. /**
  12540. * This method is like `_.assignIn` except that it accepts `customizer` which
  12541. * is invoked to produce the assigned values. If `customizer` returns `undefined`
  12542. * assignment is handled by the method instead. The `customizer` is invoked
  12543. * with five arguments: (objValue, srcValue, key, object, source).
  12544. *
  12545. * **Note:** This method mutates `object`.
  12546. *
  12547. * @static
  12548. * @memberOf _
  12549. * @alias extendWith
  12550. * @category Object
  12551. * @param {Object} object The destination object.
  12552. * @param {...Object} sources The source objects.
  12553. * @param {Function} [customizer] The function to customize assigned values.
  12554. * @returns {Object} Returns `object`.
  12555. * @example
  12556. *
  12557. * function customizer(objValue, srcValue) {
  12558. * return _.isUndefined(objValue) ? srcValue : objValue;
  12559. * }
  12560. *
  12561. * var defaults = _.partialRight(_.assignInWith, customizer);
  12562. *
  12563. * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
  12564. * // => { 'a': 1, 'b': 2 }
  12565. */
  12566. assignInWith<TObject extends {}, TSource extends {}, TResult extends {}>(
  12567. object: TObject,
  12568. source: TSource,
  12569. customizer: AssignCustomizer
  12570. ): TResult;
  12571. /**
  12572. * @see assignInWith
  12573. */
  12574. assignInWith<TObject extends {}, TSource1 extends {}, TSource2 extends {}, TResult extends {}>(
  12575. object: TObject,
  12576. source1: TSource1,
  12577. source2: TSource2,
  12578. customizer: AssignCustomizer
  12579. ): TResult;
  12580. /**
  12581. * @see assignInWith
  12582. */
  12583. assignInWith<TObject extends {}, TSource1 extends {}, TSource2 extends {}, TSource3 extends {}, TResult extends {}>(
  12584. object: TObject,
  12585. source1: TSource1,
  12586. source2: TSource2,
  12587. source3: TSource3,
  12588. customizer: AssignCustomizer
  12589. ): TResult;
  12590. /**
  12591. * @see assignInWith
  12592. */
  12593. assignInWith<TObject extends {}, TSource1 extends {}, TSource2 extends {}, TSource3 extends {}, TSource4 extends {},
  12594. TResult extends {}>
  12595. (
  12596. object: TObject,
  12597. source1: TSource1,
  12598. source2: TSource2,
  12599. source3: TSource3,
  12600. source4: TSource4,
  12601. customizer: AssignCustomizer
  12602. ): TResult;
  12603. /**
  12604. * @see _.assignInWith
  12605. */
  12606. assignInWith<TObject extends {}>(object: TObject): TObject;
  12607. /**
  12608. * @see _.assignInWith
  12609. */
  12610. assignInWith<TObject extends {}, TResult extends {}>(
  12611. object: TObject, ...otherArgs: any[]
  12612. ): TResult;
  12613. }
  12614. interface LoDashImplicitObjectWrapper<T> {
  12615. /**
  12616. * @see _.assignInWith
  12617. */
  12618. assignInWith<TSource extends {}, TResult extends {}>(
  12619. source: TSource,
  12620. customizer: AssignCustomizer
  12621. ): LoDashImplicitObjectWrapper<TResult>;
  12622. /**
  12623. * @see assignInWith
  12624. */
  12625. assignInWith<TSource1 extends {}, TSource2 extends {}, TResult extends {}>(
  12626. source1: TSource1,
  12627. source2: TSource2,
  12628. customizer: AssignCustomizer
  12629. ): LoDashImplicitObjectWrapper<TResult>;
  12630. /**
  12631. * @see assignInWith
  12632. */
  12633. assignInWith<TSource1 extends {}, TSource2 extends {}, TSource3 extends {}, TResult extends {}>(
  12634. source1: TSource1,
  12635. source2: TSource2,
  12636. source3: TSource3,
  12637. customizer: AssignCustomizer
  12638. ): LoDashImplicitObjectWrapper<TResult>;
  12639. /**
  12640. * @see assignInWith
  12641. */
  12642. assignInWith<TSource1 extends {}, TSource2 extends {}, TSource3 extends {}, TSource4 extends {}, TResult extends {}>(
  12643. source1: TSource1,
  12644. source2: TSource2,
  12645. source3: TSource3,
  12646. source4: TSource4,
  12647. customizer: AssignCustomizer
  12648. ): LoDashImplicitObjectWrapper<TResult>;
  12649. /**
  12650. * @see _.assignInWith
  12651. */
  12652. assignInWith(): LoDashImplicitObjectWrapper<T>;
  12653. /**
  12654. * @see _.assignInWith
  12655. */
  12656. assignInWith<TResult extends {}>(...otherArgs: any[]): LoDashImplicitObjectWrapper<TResult>;
  12657. }
  12658. interface LoDashExplicitObjectWrapper<T> {
  12659. /**
  12660. * @see _.assignInWith
  12661. */
  12662. assignInWith<TSource extends {}, TResult extends {}>(
  12663. source: TSource,
  12664. customizer: AssignCustomizer
  12665. ): LoDashExplicitObjectWrapper<TResult>;
  12666. /**
  12667. * @see assignInWith
  12668. */
  12669. assignInWith<TSource1 extends {}, TSource2 extends {}, TResult extends {}>(
  12670. source1: TSource1,
  12671. source2: TSource2,
  12672. customizer: AssignCustomizer
  12673. ): LoDashExplicitObjectWrapper<TResult>;
  12674. /**
  12675. * @see assignInWith
  12676. */
  12677. assignInWith<TSource1 extends {}, TSource2 extends {}, TSource3 extends {}, TResult extends {}>(
  12678. source1: TSource1,
  12679. source2: TSource2,
  12680. source3: TSource3,
  12681. customizer: AssignCustomizer
  12682. ): LoDashExplicitObjectWrapper<TResult>;
  12683. /**
  12684. * @see assignInWith
  12685. */
  12686. assignInWith<TSource1 extends {}, TSource2 extends {}, TSource3 extends {}, TSource4 extends {}, TResult extends {}>(
  12687. source1: TSource1,
  12688. source2: TSource2,
  12689. source3: TSource3,
  12690. source4: TSource4,
  12691. customizer: AssignCustomizer
  12692. ): LoDashExplicitObjectWrapper<TResult>;
  12693. /**
  12694. * @see _.assignInWith
  12695. */
  12696. assignInWith(): LoDashExplicitObjectWrapper<T>;
  12697. /**
  12698. * @see _.assignInWith
  12699. */
  12700. assignInWith<TResult extends {}>(...otherArgs: any[]): LoDashExplicitObjectWrapper<TResult>;
  12701. }
  12702. // _.create
  12703. interface LoDashStatic {
  12704. /**
  12705. * Creates an object that inherits from the given prototype object. If a properties object is provided its own
  12706. * enumerable properties are assigned to the created object.
  12707. *
  12708. * @param prototype The object to inherit from.
  12709. * @param properties The properties to assign to the object.
  12710. * @return Returns the new object.
  12711. */
  12712. create<T extends Object, U extends Object>(
  12713. prototype: T,
  12714. properties?: U
  12715. ): T & U;
  12716. }
  12717. interface LoDashImplicitObjectWrapper<T> {
  12718. /**
  12719. * @see _.create
  12720. */
  12721. create<U extends Object>(properties?: U): LoDashImplicitObjectWrapper<T & U>;
  12722. }
  12723. interface LoDashExplicitObjectWrapper<T> {
  12724. /**
  12725. * @see _.create
  12726. */
  12727. create<U extends Object>(properties?: U): LoDashExplicitObjectWrapper<T & U>;
  12728. }
  12729. // _.defaults
  12730. interface LoDashStatic {
  12731. /**
  12732. * Assigns own enumerable properties of source object(s) to the destination object for all destination
  12733. * properties that resolve to undefined. Once a property is set, additional values of the same property are
  12734. * ignored.
  12735. *
  12736. * Note: This method mutates object.
  12737. *
  12738. * @param object The destination object.
  12739. * @param sources The source objects.
  12740. * @return The destination object.
  12741. */
  12742. defaults<Obj extends {}, TResult extends {}>(
  12743. object: Obj,
  12744. ...sources: {}[]
  12745. ): TResult;
  12746. /**
  12747. * @see _.defaults
  12748. */
  12749. defaults<Obj extends {}, S1 extends {}, TResult extends {}>(
  12750. object: Obj,
  12751. source1: S1,
  12752. ...sources: {}[]
  12753. ): TResult;
  12754. /**
  12755. * @see _.defaults
  12756. */
  12757. defaults<Obj extends {}, S1 extends {}, S2 extends {}, TResult extends {}>(
  12758. object: Obj,
  12759. source1: S1,
  12760. source2: S2,
  12761. ...sources: {}[]
  12762. ): TResult;
  12763. /**
  12764. * @see _.defaults
  12765. */
  12766. defaults<Obj extends {}, S1 extends {}, S2 extends {}, S3 extends {}, TResult extends {}>(
  12767. object: Obj,
  12768. source1: S1,
  12769. source2: S2,
  12770. source3: S3,
  12771. ...sources: {}[]
  12772. ): TResult;
  12773. /**
  12774. * @see _.defaults
  12775. */
  12776. defaults<Obj extends {}, S1 extends {}, S2 extends {}, S3 extends {}, S4 extends {}, TResult extends {}>(
  12777. object: Obj,
  12778. source1: S1,
  12779. source2: S2,
  12780. source3: S3,
  12781. source4: S4,
  12782. ...sources: {}[]
  12783. ): TResult;
  12784. /**
  12785. * @see _.defaults
  12786. */
  12787. defaults<TResult extends {}>(
  12788. object: {},
  12789. ...sources: {}[]
  12790. ): TResult;
  12791. }
  12792. interface LoDashImplicitObjectWrapper<T> {
  12793. /**
  12794. * @see _.defaults
  12795. */
  12796. defaults<S1 extends {}, TResult extends {}>(
  12797. source1: S1,
  12798. ...sources: {}[]
  12799. ): LoDashImplicitObjectWrapper<TResult>;
  12800. /**
  12801. * @see _.defaults
  12802. */
  12803. defaults<S1 extends {}, S2 extends {}, TResult extends {}>(
  12804. source1: S1,
  12805. source2: S2,
  12806. ...sources: {}[]
  12807. ): LoDashImplicitObjectWrapper<TResult>;
  12808. /**
  12809. * @see _.defaults
  12810. */
  12811. defaults<S1 extends {}, S2 extends {}, S3 extends {}, TResult extends {}>(
  12812. source1: S1,
  12813. source2: S2,
  12814. source3: S3,
  12815. ...sources: {}[]
  12816. ): LoDashImplicitObjectWrapper<TResult>;
  12817. /**
  12818. * @see _.defaults
  12819. */
  12820. defaults<S1 extends {}, S2 extends {}, S3 extends {}, S4 extends {}, TResult extends {}>(
  12821. source1: S1,
  12822. source2: S2,
  12823. source3: S3,
  12824. source4: S4,
  12825. ...sources: {}[]
  12826. ): LoDashImplicitObjectWrapper<TResult>;
  12827. /**
  12828. * @see _.defaults
  12829. */
  12830. defaults(): LoDashImplicitObjectWrapper<T>;
  12831. /**
  12832. * @see _.defaults
  12833. */
  12834. defaults<TResult>(...sources: {}[]): LoDashImplicitObjectWrapper<TResult>;
  12835. }
  12836. interface LoDashExplicitObjectWrapper<T> {
  12837. /**
  12838. * @see _.defaults
  12839. */
  12840. defaults<S1 extends {}, TResult extends {}>(
  12841. source1: S1,
  12842. ...sources: {}[]
  12843. ): LoDashExplicitObjectWrapper<TResult>;
  12844. /**
  12845. * @see _.defaults
  12846. */
  12847. defaults<S1 extends {}, S2 extends {}, TResult extends {}>(
  12848. source1: S1,
  12849. source2: S2,
  12850. ...sources: {}[]
  12851. ): LoDashExplicitObjectWrapper<TResult>;
  12852. /**
  12853. * @see _.defaults
  12854. */
  12855. defaults<S1 extends {}, S2 extends {}, S3 extends {}, TResult extends {}>(
  12856. source1: S1,
  12857. source2: S2,
  12858. source3: S3,
  12859. ...sources: {}[]
  12860. ): LoDashExplicitObjectWrapper<TResult>;
  12861. /**
  12862. * @see _.defaults
  12863. */
  12864. defaults<S1 extends {}, S2 extends {}, S3 extends {}, S4 extends {}, TResult extends {}>(
  12865. source1: S1,
  12866. source2: S2,
  12867. source3: S3,
  12868. source4: S4,
  12869. ...sources: {}[]
  12870. ): LoDashExplicitObjectWrapper<TResult>;
  12871. /**
  12872. * @see _.defaults
  12873. */
  12874. defaults(): LoDashExplicitObjectWrapper<T>;
  12875. /**
  12876. * @see _.defaults
  12877. */
  12878. defaults<TResult>(...sources: {}[]): LoDashExplicitObjectWrapper<TResult>;
  12879. }
  12880. // _.defaultsDeep
  12881. interface LoDashStatic {
  12882. /**
  12883. * This method is like _.defaults except that it recursively assigns default properties.
  12884. * @param object The destination object.
  12885. * @param sources The source objects.
  12886. * @return Returns object.
  12887. */
  12888. defaultsDeep<T, TResult>(
  12889. object: T,
  12890. ...sources: any[]): TResult;
  12891. }
  12892. interface LoDashImplicitObjectWrapper<T> {
  12893. /**
  12894. * @see _.defaultsDeep
  12895. */
  12896. defaultsDeep<TResult>(...sources: any[]): LoDashImplicitObjectWrapper<TResult>;
  12897. }
  12898. // _.extend
  12899. interface LoDashStatic {
  12900. /**
  12901. * @see assign
  12902. */
  12903. extend<TObject extends {}, TSource extends {}, TResult extends {}>(
  12904. object: TObject,
  12905. source: TSource,
  12906. customizer?: AssignCustomizer,
  12907. thisArg?: any
  12908. ): TResult;
  12909. /**
  12910. * @see assign
  12911. */
  12912. extend<TObject extends {}, TSource1 extends {}, TSource2 extends {}, TResult extends {}>(
  12913. object: TObject,
  12914. source1: TSource1,
  12915. source2: TSource2,
  12916. customizer?: AssignCustomizer,
  12917. thisArg?: any
  12918. ): TResult;
  12919. /**
  12920. * @see assign
  12921. */
  12922. extend<TObject extends {}, TSource1 extends {}, TSource2 extends {}, TSource3 extends {}, TResult extends {}>(
  12923. object: TObject,
  12924. source1: TSource1,
  12925. source2: TSource2,
  12926. source3: TSource3,
  12927. customizer?: AssignCustomizer,
  12928. thisArg?: any
  12929. ): TResult;
  12930. /**
  12931. * @see assign
  12932. */
  12933. extend<TObject extends {}, TSource1 extends {}, TSource2 extends {}, TSource3 extends {}, TSource4 extends {},
  12934. TResult extends {}>
  12935. (
  12936. object: TObject,
  12937. source1: TSource1,
  12938. source2: TSource2,
  12939. source3: TSource3,
  12940. source4: TSource4,
  12941. customizer?: AssignCustomizer,
  12942. thisArg?: any
  12943. ): TResult;
  12944. /**
  12945. * @see _.assign
  12946. */
  12947. extend<TObject extends {}>(object: TObject): TObject;
  12948. /**
  12949. * @see _.assign
  12950. */
  12951. extend<TObject extends {}, TResult extends {}>(
  12952. object: TObject, ...otherArgs: any[]
  12953. ): TResult;
  12954. }
  12955. interface LoDashImplicitObjectWrapper<T> {
  12956. /**
  12957. * @see _.assign
  12958. */
  12959. extend<TSource extends {}, TResult extends {}>(
  12960. source: TSource,
  12961. customizer?: AssignCustomizer,
  12962. thisArg?: any
  12963. ): LoDashImplicitObjectWrapper<TResult>;
  12964. /**
  12965. * @see assign
  12966. */
  12967. extend<TSource1 extends {}, TSource2 extends {}, TResult extends {}>(
  12968. source1: TSource1,
  12969. source2: TSource2,
  12970. customizer?: AssignCustomizer,
  12971. thisArg?: any
  12972. ): LoDashImplicitObjectWrapper<TResult>;
  12973. /**
  12974. * @see assign
  12975. */
  12976. extend<TSource1 extends {}, TSource2 extends {}, TSource3 extends {}, TResult extends {}>(
  12977. source1: TSource1,
  12978. source2: TSource2,
  12979. source3: TSource3,
  12980. customizer?: AssignCustomizer,
  12981. thisArg?: any
  12982. ): LoDashImplicitObjectWrapper<TResult>;
  12983. /**
  12984. * @see assign
  12985. */
  12986. extend<TSource1 extends {}, TSource2 extends {}, TSource3 extends {}, TSource4 extends {}, TResult extends {}>(
  12987. source1: TSource1,
  12988. source2: TSource2,
  12989. source3: TSource3,
  12990. source4: TSource4,
  12991. customizer?: AssignCustomizer,
  12992. thisArg?: any
  12993. ): LoDashImplicitObjectWrapper<TResult>;
  12994. /**
  12995. * @see _.assign
  12996. */
  12997. extend(): LoDashImplicitObjectWrapper<T>;
  12998. /**
  12999. * @see _.assign
  13000. */
  13001. extend<TResult extends {}>(...otherArgs: any[]): LoDashImplicitObjectWrapper<TResult>;
  13002. }
  13003. interface LoDashExplicitObjectWrapper<T> {
  13004. /**
  13005. * @see _.assign
  13006. */
  13007. extend<TSource extends {}, TResult extends {}>(
  13008. source: TSource,
  13009. customizer?: AssignCustomizer,
  13010. thisArg?: any
  13011. ): LoDashExplicitObjectWrapper<TResult>;
  13012. /**
  13013. * @see assign
  13014. */
  13015. extend<TSource1 extends {}, TSource2 extends {}, TResult extends {}>(
  13016. source1: TSource1,
  13017. source2: TSource2,
  13018. customizer?: AssignCustomizer,
  13019. thisArg?: any
  13020. ): LoDashExplicitObjectWrapper<TResult>;
  13021. /**
  13022. * @see assign
  13023. */
  13024. extend<TSource1 extends {}, TSource2 extends {}, TSource3 extends {}, TResult extends {}>(
  13025. source1: TSource1,
  13026. source2: TSource2,
  13027. source3: TSource3,
  13028. customizer?: AssignCustomizer,
  13029. thisArg?: any
  13030. ): LoDashExplicitObjectWrapper<TResult>;
  13031. /**
  13032. * @see assign
  13033. */
  13034. extend<TSource1 extends {}, TSource2 extends {}, TSource3 extends {}, TSource4 extends {}, TResult extends {}>(
  13035. source1: TSource1,
  13036. source2: TSource2,
  13037. source3: TSource3,
  13038. source4: TSource4,
  13039. customizer?: AssignCustomizer,
  13040. thisArg?: any
  13041. ): LoDashExplicitObjectWrapper<TResult>;
  13042. /**
  13043. * @see _.assign
  13044. */
  13045. extend(): LoDashExplicitObjectWrapper<T>;
  13046. /**
  13047. * @see _.assign
  13048. */
  13049. extend<TResult extends {}>(...otherArgs: any[]): LoDashExplicitObjectWrapper<TResult>;
  13050. }
  13051. // _.findKey
  13052. interface LoDashStatic {
  13053. /**
  13054. * This method is like _.find except that it returns the key of the first element predicate returns truthy for
  13055. * instead of the element itself.
  13056. *
  13057. * If a property name is provided for predicate the created _.property style callback returns the property
  13058. * value of the given element.
  13059. *
  13060. * If a value is also provided for thisArg the created _.matchesProperty style callback returns true for
  13061. * elements that have a matching property value, else false.
  13062. *
  13063. * If an object is provided for predicate the created _.matches style callback returns true for elements that
  13064. * have the properties of the given object, else false.
  13065. *
  13066. * @param object The object to search.
  13067. * @param predicate The function invoked per iteration.
  13068. * @param thisArg The this binding of predicate.
  13069. * @return Returns the key of the matched element, else undefined.
  13070. */
  13071. findKey<TValues, TObject>(
  13072. object: TObject,
  13073. predicate?: DictionaryIterator<TValues, boolean>,
  13074. thisArg?: any
  13075. ): string;
  13076. /**
  13077. * @see _.findKey
  13078. */
  13079. findKey<TObject>(
  13080. object: TObject,
  13081. predicate?: ObjectIterator<any, boolean>,
  13082. thisArg?: any
  13083. ): string;
  13084. /**
  13085. * @see _.findKey
  13086. */
  13087. findKey<TObject>(
  13088. object: TObject,
  13089. predicate?: string,
  13090. thisArg?: any
  13091. ): string;
  13092. /**
  13093. * @see _.findKey
  13094. */
  13095. findKey<TWhere extends Dictionary<any>, TObject>(
  13096. object: TObject,
  13097. predicate?: TWhere
  13098. ): string;
  13099. }
  13100. interface LoDashImplicitObjectWrapper<T> {
  13101. /**
  13102. * @see _.findKey
  13103. */
  13104. findKey<TValues>(
  13105. predicate?: DictionaryIterator<TValues, boolean>,
  13106. thisArg?: any
  13107. ): string;
  13108. /**
  13109. * @see _.findKey
  13110. */
  13111. findKey(
  13112. predicate?: ObjectIterator<any, boolean>,
  13113. thisArg?: any
  13114. ): string;
  13115. /**
  13116. * @see _.findKey
  13117. */
  13118. findKey(
  13119. predicate?: string,
  13120. thisArg?: any
  13121. ): string;
  13122. /**
  13123. * @see _.findKey
  13124. */
  13125. findKey<TWhere extends Dictionary<any>>(
  13126. predicate?: TWhere
  13127. ): string;
  13128. }
  13129. interface LoDashExplicitObjectWrapper<T> {
  13130. /**
  13131. * @see _.findKey
  13132. */
  13133. findKey<TValues>(
  13134. predicate?: DictionaryIterator<TValues, boolean>,
  13135. thisArg?: any
  13136. ): LoDashExplicitWrapper<string>;
  13137. /**
  13138. * @see _.findKey
  13139. */
  13140. findKey(
  13141. predicate?: ObjectIterator<any, boolean>,
  13142. thisArg?: any
  13143. ): LoDashExplicitWrapper<string>;
  13144. /**
  13145. * @see _.findKey
  13146. */
  13147. findKey(
  13148. predicate?: string,
  13149. thisArg?: any
  13150. ): LoDashExplicitWrapper<string>;
  13151. /**
  13152. * @see _.findKey
  13153. */
  13154. findKey<TWhere extends Dictionary<any>>(
  13155. predicate?: TWhere
  13156. ): LoDashExplicitWrapper<string>;
  13157. }
  13158. // _.findLastKey
  13159. interface LoDashStatic {
  13160. /**
  13161. * This method is like _.findKey except that it iterates over elements of a collection in the opposite order.
  13162. *
  13163. * If a property name is provided for predicate the created _.property style callback returns the property
  13164. * value of the given element.
  13165. *
  13166. * If a value is also provided for thisArg the created _.matchesProperty style callback returns true for
  13167. * elements that have a matching property value, else false.
  13168. *
  13169. * If an object is provided for predicate the created _.matches style callback returns true for elements that
  13170. * have the properties of the given object, else false.
  13171. *
  13172. * @param object The object to search.
  13173. * @param predicate The function invoked per iteration.
  13174. * @param thisArg The this binding of predicate.
  13175. * @return Returns the key of the matched element, else undefined.
  13176. */
  13177. findLastKey<TValues, TObject>(
  13178. object: TObject,
  13179. predicate?: DictionaryIterator<TValues, boolean>,
  13180. thisArg?: any
  13181. ): string;
  13182. /**
  13183. * @see _.findLastKey
  13184. */
  13185. findLastKey<TObject>(
  13186. object: TObject,
  13187. predicate?: ObjectIterator<any, boolean>,
  13188. thisArg?: any
  13189. ): string;
  13190. /**
  13191. * @see _.findLastKey
  13192. */
  13193. findLastKey<TObject>(
  13194. object: TObject,
  13195. predicate?: string,
  13196. thisArg?: any
  13197. ): string;
  13198. /**
  13199. * @see _.findLastKey
  13200. */
  13201. findLastKey<TWhere extends Dictionary<any>, TObject>(
  13202. object: TObject,
  13203. predicate?: TWhere
  13204. ): string;
  13205. }
  13206. interface LoDashImplicitObjectWrapper<T> {
  13207. /**
  13208. * @see _.findLastKey
  13209. */
  13210. findLastKey<TValues>(
  13211. predicate?: DictionaryIterator<TValues, boolean>,
  13212. thisArg?: any
  13213. ): string;
  13214. /**
  13215. * @see _.findLastKey
  13216. */
  13217. findLastKey(
  13218. predicate?: ObjectIterator<any, boolean>,
  13219. thisArg?: any
  13220. ): string;
  13221. /**
  13222. * @see _.findLastKey
  13223. */
  13224. findLastKey(
  13225. predicate?: string,
  13226. thisArg?: any
  13227. ): string;
  13228. /**
  13229. * @see _.findLastKey
  13230. */
  13231. findLastKey<TWhere extends Dictionary<any>>(
  13232. predicate?: TWhere
  13233. ): string;
  13234. }
  13235. interface LoDashExplicitObjectWrapper<T> {
  13236. /**
  13237. * @see _.findLastKey
  13238. */
  13239. findLastKey<TValues>(
  13240. predicate?: DictionaryIterator<TValues, boolean>,
  13241. thisArg?: any
  13242. ): LoDashExplicitWrapper<string>;
  13243. /**
  13244. * @see _.findLastKey
  13245. */
  13246. findLastKey(
  13247. predicate?: ObjectIterator<any, boolean>,
  13248. thisArg?: any
  13249. ): LoDashExplicitWrapper<string>;
  13250. /**
  13251. * @see _.findLastKey
  13252. */
  13253. findLastKey(
  13254. predicate?: string,
  13255. thisArg?: any
  13256. ): LoDashExplicitWrapper<string>;
  13257. /**
  13258. * @see _.findLastKey
  13259. */
  13260. findLastKey<TWhere extends Dictionary<any>>(
  13261. predicate?: TWhere
  13262. ): LoDashExplicitWrapper<string>;
  13263. }
  13264. // _.forIn
  13265. interface LoDashStatic {
  13266. /**
  13267. * Iterates over own and inherited enumerable properties of an object invoking iteratee for each property. The
  13268. * iteratee is bound to thisArg and invoked with three arguments: (value, key, object). Iteratee functions may
  13269. * exit iteration early by explicitly returning false.
  13270. *
  13271. * @param object The object to iterate over.
  13272. * @param iteratee The function invoked per iteration.
  13273. * @param thisArg The this binding of iteratee.
  13274. * @return Returns object.
  13275. */
  13276. forIn<T>(
  13277. object: Dictionary<T>,
  13278. iteratee?: DictionaryIterator<T, any>,
  13279. thisArg?: any
  13280. ): Dictionary<T>;
  13281. /**
  13282. * @see _.forIn
  13283. */
  13284. forIn<T extends {}>(
  13285. object: T,
  13286. iteratee?: ObjectIterator<any, any>,
  13287. thisArg?: any
  13288. ): T;
  13289. }
  13290. interface LoDashImplicitObjectWrapper<T> {
  13291. /**
  13292. * @see _.forIn
  13293. */
  13294. forIn<TValue>(
  13295. iteratee?: DictionaryIterator<TValue, any>,
  13296. thisArg?: any
  13297. ): _.LoDashImplicitObjectWrapper<T>;
  13298. }
  13299. interface LoDashExplicitObjectWrapper<T> {
  13300. /**
  13301. * @see _.forIn
  13302. */
  13303. forIn<TValue>(
  13304. iteratee?: DictionaryIterator<TValue, any>,
  13305. thisArg?: any
  13306. ): _.LoDashExplicitObjectWrapper<T>;
  13307. }
  13308. // _.forInRight
  13309. interface LoDashStatic {
  13310. /**
  13311. * This method is like _.forIn except that it iterates over properties of object in the opposite order.
  13312. *
  13313. * @param object The object to iterate over.
  13314. * @param iteratee The function invoked per iteration.
  13315. * @param thisArg The this binding of iteratee.
  13316. * @return Returns object.
  13317. */
  13318. forInRight<T>(
  13319. object: Dictionary<T>,
  13320. iteratee?: DictionaryIterator<T, any>,
  13321. thisArg?: any
  13322. ): Dictionary<T>;
  13323. /**
  13324. * @see _.forInRight
  13325. */
  13326. forInRight<T extends {}>(
  13327. object: T,
  13328. iteratee?: ObjectIterator<any, any>,
  13329. thisArg?: any
  13330. ): T;
  13331. }
  13332. interface LoDashImplicitObjectWrapper<T> {
  13333. /**
  13334. * @see _.forInRight
  13335. */
  13336. forInRight<TValue>(
  13337. iteratee?: DictionaryIterator<TValue, any>,
  13338. thisArg?: any
  13339. ): _.LoDashImplicitObjectWrapper<T>;
  13340. }
  13341. interface LoDashExplicitObjectWrapper<T> {
  13342. /**
  13343. * @see _.forInRight
  13344. */
  13345. forInRight<TValue>(
  13346. iteratee?: DictionaryIterator<TValue, any>,
  13347. thisArg?: any
  13348. ): _.LoDashExplicitObjectWrapper<T>;
  13349. }
  13350. // _.forOwn
  13351. interface LoDashStatic {
  13352. /**
  13353. * Iterates over own enumerable properties of an object invoking iteratee for each property. The iteratee is
  13354. * bound to thisArg and invoked with three arguments: (value, key, object). Iteratee functions may exit
  13355. * iteration early by explicitly returning false.
  13356. *
  13357. * @param object The object to iterate over.
  13358. * @param iteratee The function invoked per iteration.
  13359. * @param thisArg The this binding of iteratee.
  13360. * @return Returns object.
  13361. */
  13362. forOwn<T>(
  13363. object: Dictionary<T>,
  13364. iteratee?: DictionaryIterator<T, any>,
  13365. thisArg?: any
  13366. ): Dictionary<T>;
  13367. /**
  13368. * @see _.forOwn
  13369. */
  13370. forOwn<T extends {}>(
  13371. object: T,
  13372. iteratee?: ObjectIterator<any, any>,
  13373. thisArg?: any
  13374. ): T;
  13375. }
  13376. interface LoDashImplicitObjectWrapper<T> {
  13377. /**
  13378. * @see _.forOwn
  13379. */
  13380. forOwn<TValue>(
  13381. iteratee?: DictionaryIterator<TValue, any>,
  13382. thisArg?: any
  13383. ): _.LoDashImplicitObjectWrapper<T>;
  13384. }
  13385. interface LoDashExplicitObjectWrapper<T> {
  13386. /**
  13387. * @see _.forOwn
  13388. */
  13389. forOwn<TValue>(
  13390. iteratee?: DictionaryIterator<TValue, any>,
  13391. thisArg?: any
  13392. ): _.LoDashExplicitObjectWrapper<T>;
  13393. }
  13394. // _.forOwnRight
  13395. interface LoDashStatic {
  13396. /**
  13397. * This method is like _.forOwn except that it iterates over properties of object in the opposite order.
  13398. *
  13399. * @param object The object to iterate over.
  13400. * @param iteratee The function invoked per iteration.
  13401. * @param thisArg The this binding of iteratee.
  13402. * @return Returns object.
  13403. */
  13404. forOwnRight<T>(
  13405. object: Dictionary<T>,
  13406. iteratee?: DictionaryIterator<T, any>,
  13407. thisArg?: any
  13408. ): Dictionary<T>;
  13409. /**
  13410. * @see _.forOwnRight
  13411. */
  13412. forOwnRight<T extends {}>(
  13413. object: T,
  13414. iteratee?: ObjectIterator<any, any>,
  13415. thisArg?: any
  13416. ): T;
  13417. }
  13418. interface LoDashImplicitObjectWrapper<T> {
  13419. /**
  13420. * @see _.forOwnRight
  13421. */
  13422. forOwnRight<TValue>(
  13423. iteratee?: DictionaryIterator<TValue, any>,
  13424. thisArg?: any
  13425. ): _.LoDashImplicitObjectWrapper<T>;
  13426. }
  13427. interface LoDashExplicitObjectWrapper<T> {
  13428. /**
  13429. * @see _.forOwnRight
  13430. */
  13431. forOwnRight<TValue>(
  13432. iteratee?: DictionaryIterator<TValue, any>,
  13433. thisArg?: any
  13434. ): _.LoDashExplicitObjectWrapper<T>;
  13435. }
  13436. // _.functions
  13437. interface LoDashStatic {
  13438. /**
  13439. * Creates an array of function property names from own enumerable properties
  13440. * of `object`.
  13441. *
  13442. * @static
  13443. * @memberOf _
  13444. * @category Object
  13445. * @param {Object} object The object to inspect.
  13446. * @returns {Array} Returns the new array of property names.
  13447. * @example
  13448. *
  13449. * function Foo() {
  13450. * this.a = _.constant('a');
  13451. * this.b = _.constant('b');
  13452. * }
  13453. *
  13454. * Foo.prototype.c = _.constant('c');
  13455. *
  13456. * _.functions(new Foo);
  13457. * // => ['a', 'b']
  13458. */
  13459. functions<T extends {}>(object: any): string[];
  13460. }
  13461. interface LoDashImplicitObjectWrapper<T> {
  13462. /**
  13463. * @see _.functions
  13464. */
  13465. functions(): _.LoDashImplicitArrayWrapper<string>;
  13466. }
  13467. interface LoDashExplicitObjectWrapper<T> {
  13468. /**
  13469. * @see _.functions
  13470. */
  13471. functions(): _.LoDashExplicitArrayWrapper<string>;
  13472. }
  13473. // _.functionsIn
  13474. interface LoDashStatic {
  13475. /**
  13476. * Creates an array of function property names from own and inherited
  13477. * enumerable properties of `object`.
  13478. *
  13479. * @static
  13480. * @memberOf _
  13481. * @category Object
  13482. * @param {Object} object The object to inspect.
  13483. * @returns {Array} Returns the new array of property names.
  13484. * @example
  13485. *
  13486. * function Foo() {
  13487. * this.a = _.constant('a');
  13488. * this.b = _.constant('b');
  13489. * }
  13490. *
  13491. * Foo.prototype.c = _.constant('c');
  13492. *
  13493. * _.functionsIn(new Foo);
  13494. * // => ['a', 'b', 'c']
  13495. */
  13496. functionsIn<T extends {}>(object: any): string[];
  13497. }
  13498. interface LoDashImplicitObjectWrapper<T> {
  13499. /**
  13500. * @see _.functionsIn
  13501. */
  13502. functionsIn(): _.LoDashImplicitArrayWrapper<string>;
  13503. }
  13504. interface LoDashExplicitObjectWrapper<T> {
  13505. /**
  13506. * @see _.functionsIn
  13507. */
  13508. functionsIn(): _.LoDashExplicitArrayWrapper<string>;
  13509. }
  13510. // _.get
  13511. interface LoDashStatic {
  13512. /**
  13513. * Gets the property value at path of object. If the resolved
  13514. * value is undefined the defaultValue is used in its place.
  13515. * @param object The object to query.
  13516. * @param path The path of the property to get.
  13517. * @param defaultValue The value returned if the resolved value is undefined.
  13518. * @return Returns the resolved value.
  13519. */
  13520. get<TResult>(object: Object,
  13521. path: string | number | boolean | Array<string | number | boolean>,
  13522. defaultValue?: TResult
  13523. ): TResult;
  13524. }
  13525. interface LoDashImplicitObjectWrapper<T> {
  13526. /**
  13527. * @see _.get
  13528. */
  13529. get<TResult>(path: string | number | boolean | Array<string | number | boolean>,
  13530. defaultValue?: TResult
  13531. ): TResult;
  13532. }
  13533. // _.has
  13534. interface LoDashStatic {
  13535. /**
  13536. * Checks if `path` is a direct property of `object`.
  13537. *
  13538. * @static
  13539. * @memberOf _
  13540. * @category Object
  13541. * @param {Object} object The object to query.
  13542. * @param {Array|string} path The path to check.
  13543. * @returns {boolean} Returns `true` if `path` exists, else `false`.
  13544. * @example
  13545. *
  13546. * var object = { 'a': { 'b': { 'c': 3 } } };
  13547. * var other = _.create({ 'a': _.create({ 'b': _.create({ 'c': 3 }) }) });
  13548. *
  13549. * _.has(object, 'a');
  13550. * // => true
  13551. *
  13552. * _.has(object, 'a.b.c');
  13553. * // => true
  13554. *
  13555. * _.has(object, ['a', 'b', 'c']);
  13556. * // => true
  13557. *
  13558. * _.has(other, 'a');
  13559. * // => false
  13560. */
  13561. has<T extends {}>(
  13562. object: T,
  13563. path: StringRepresentable | StringRepresentable[]
  13564. ): boolean;
  13565. }
  13566. interface LoDashImplicitObjectWrapper<T> {
  13567. /**
  13568. * @see _.has
  13569. */
  13570. has(path: StringRepresentable | StringRepresentable[]): boolean;
  13571. }
  13572. interface LoDashExplicitObjectWrapper<T> {
  13573. /**
  13574. * @see _.has
  13575. */
  13576. has(path: StringRepresentable | StringRepresentable[]): LoDashExplicitWrapper<boolean>;
  13577. }
  13578. // _.hasIn
  13579. interface LoDashStatic {
  13580. /**
  13581. * Checks if `path` is a direct or inherited property of `object`.
  13582. *
  13583. * @static
  13584. * @memberOf _
  13585. * @category Object
  13586. * @param {Object} object The object to query.
  13587. * @param {Array|string} path The path to check.
  13588. * @returns {boolean} Returns `true` if `path` exists, else `false`.
  13589. * @example
  13590. *
  13591. * var object = _.create({ 'a': _.create({ 'b': _.create({ 'c': 3 }) }) });
  13592. *
  13593. * _.hasIn(object, 'a');
  13594. * // => true
  13595. *
  13596. * _.hasIn(object, 'a.b.c');
  13597. * // => true
  13598. *
  13599. * _.hasIn(object, ['a', 'b', 'c']);
  13600. * // => true
  13601. *
  13602. * _.hasIn(object, 'b');
  13603. * // => false
  13604. */
  13605. hasIn<T extends {}>(
  13606. object: T,
  13607. path: StringRepresentable | StringRepresentable[]
  13608. ): boolean;
  13609. }
  13610. interface LoDashImplicitObjectWrapper<T> {
  13611. /**
  13612. * @see _.hasIn
  13613. */
  13614. hasIn(path: StringRepresentable | StringRepresentable[]): boolean;
  13615. }
  13616. interface LoDashExplicitObjectWrapper<T> {
  13617. /**
  13618. * @see _.hasIn
  13619. */
  13620. hasIn(path: StringRepresentable | StringRepresentable[]): LoDashExplicitWrapper<boolean>;
  13621. }
  13622. // _.invert
  13623. interface LoDashStatic {
  13624. /**
  13625. * Creates an object composed of the inverted keys and values of object. If object contains duplicate values,
  13626. * subsequent values overwrite property assignments of previous values unless multiValue is true.
  13627. *
  13628. * @param object The object to invert.
  13629. * @param multiValue Allow multiple values per key.
  13630. * @return Returns the new inverted object.
  13631. */
  13632. invert<T extends {}, TResult extends {}>(
  13633. object: T,
  13634. multiValue?: boolean
  13635. ): TResult;
  13636. /**
  13637. * @see _.invert
  13638. */
  13639. invert<TResult extends {}>(
  13640. object: Object,
  13641. multiValue?: boolean
  13642. ): TResult;
  13643. }
  13644. interface LoDashImplicitObjectWrapper<T> {
  13645. /**
  13646. * @see _.invert
  13647. */
  13648. invert<TResult extends {}>(multiValue?: boolean): LoDashImplicitObjectWrapper<TResult>;
  13649. }
  13650. interface LoDashExplicitObjectWrapper<T> {
  13651. /**
  13652. * @see _.invert
  13653. */
  13654. invert<TResult extends {}>(multiValue?: boolean): LoDashExplicitObjectWrapper<TResult>;
  13655. }
  13656. // _.inverBy
  13657. interface InvertByIterator<T> {
  13658. (value: T): any;
  13659. }
  13660. interface LoDashStatic {
  13661. /**
  13662. * This method is like _.invert except that the inverted object is generated from the results of running each
  13663. * element of object through iteratee. The corresponding inverted value of each inverted key is an array of
  13664. * keys responsible for generating the inverted value. The iteratee is invoked with one argument: (value).
  13665. *
  13666. * @param object The object to invert.
  13667. * @param interatee The iteratee invoked per element.
  13668. * @return Returns the new inverted object.
  13669. */
  13670. invertBy(
  13671. object: Object,
  13672. interatee?: InvertByIterator<any> | string
  13673. ): Dictionary<string[]>;
  13674. /**
  13675. * @see _.invertBy
  13676. */
  13677. invertBy<T>(
  13678. object: _.Dictionary<T> | _.NumericDictionary<T>,
  13679. interatee?: InvertByIterator<T> | string
  13680. ): Dictionary<string[]>;
  13681. /**
  13682. * @see _.invertBy
  13683. */
  13684. invertBy<W>(
  13685. object: Object,
  13686. interatee?: W
  13687. ): Dictionary<string[]>;
  13688. /**
  13689. * @see _.invertBy
  13690. */
  13691. invertBy<T, W>(
  13692. object: _.Dictionary<T>,
  13693. interatee?: W
  13694. ): Dictionary<string[]>;
  13695. }
  13696. interface LoDashImplicitWrapper<T> {
  13697. /**
  13698. * @see _.invertBy
  13699. */
  13700. invertBy(
  13701. interatee?: InvertByIterator<any>
  13702. ): LoDashImplicitObjectWrapper<Dictionary<string[]>>;
  13703. }
  13704. interface LoDashImplicitArrayWrapper<T> {
  13705. /**
  13706. * @see _.invertBy
  13707. */
  13708. invertBy(
  13709. interatee?: InvertByIterator<T> | string
  13710. ): LoDashImplicitObjectWrapper<Dictionary<string[]>>;
  13711. /**
  13712. * @see _.invertBy
  13713. */
  13714. invertBy<W>(
  13715. interatee?: W
  13716. ): LoDashImplicitObjectWrapper<Dictionary<string[]>>;
  13717. }
  13718. interface LoDashImplicitObjectWrapper<T> {
  13719. /**
  13720. * @see _.invertBy
  13721. */
  13722. invertBy(
  13723. interatee?: InvertByIterator<any> | string
  13724. ): LoDashImplicitObjectWrapper<Dictionary<string[]>>;
  13725. /**
  13726. * @see _.invertBy
  13727. */
  13728. invertBy<W>(
  13729. interatee?: W
  13730. ): LoDashImplicitObjectWrapper<Dictionary<string[]>>;
  13731. }
  13732. interface LoDashExplicitWrapper<T> {
  13733. /**
  13734. * @see _.invertBy
  13735. */
  13736. invertBy(
  13737. interatee?: InvertByIterator<any>
  13738. ): LoDashExplicitObjectWrapper<Dictionary<string[]>>;
  13739. }
  13740. interface LoDashExplicitArrayWrapper<T> {
  13741. /**
  13742. * @see _.invertBy
  13743. */
  13744. invertBy(
  13745. interatee?: InvertByIterator<T> | string
  13746. ): LoDashExplicitObjectWrapper<Dictionary<string[]>>;
  13747. /**
  13748. * @see _.invertBy
  13749. */
  13750. invertBy<W>(
  13751. interatee?: W
  13752. ): LoDashExplicitObjectWrapper<Dictionary<string[]>>;
  13753. }
  13754. interface LoDashExplicitObjectWrapper<T> {
  13755. /**
  13756. * @see _.invertBy
  13757. */
  13758. invertBy(
  13759. interatee?: InvertByIterator<any> | string
  13760. ): LoDashExplicitObjectWrapper<Dictionary<string[]>>;
  13761. /**
  13762. * @see _.invertBy
  13763. */
  13764. invertBy<W>(
  13765. interatee?: W
  13766. ): LoDashExplicitObjectWrapper<Dictionary<string[]>>;
  13767. }
  13768. // _.keys
  13769. interface LoDashStatic {
  13770. /**
  13771. * Creates an array of the own enumerable property names of object.
  13772. *
  13773. * Note: Non-object values are coerced to objects. See the ES spec for more details.
  13774. *
  13775. * @param object The object to query.
  13776. * @return Returns the array of property names.
  13777. */
  13778. keys(object?: any): string[];
  13779. }
  13780. interface LoDashImplicitObjectWrapper<T> {
  13781. /**
  13782. * @see _.keys
  13783. */
  13784. keys(): LoDashImplicitArrayWrapper<string>;
  13785. }
  13786. interface LoDashExplicitObjectWrapper<T> {
  13787. /**
  13788. * @see _.keys
  13789. */
  13790. keys(): LoDashExplicitArrayWrapper<string>;
  13791. }
  13792. // _.keysIn
  13793. interface LoDashStatic {
  13794. /**
  13795. * Creates an array of the own and inherited enumerable property names of object.
  13796. *
  13797. * Note: Non-object values are coerced to objects.
  13798. *
  13799. * @param object The object to query.
  13800. * @return An array of property names.
  13801. */
  13802. keysIn(object?: any): string[];
  13803. }
  13804. interface LoDashImplicitObjectWrapper<T> {
  13805. /**
  13806. * @see _.keysIn
  13807. */
  13808. keysIn(): LoDashImplicitArrayWrapper<string>;
  13809. }
  13810. interface LoDashExplicitObjectWrapper<T> {
  13811. /**
  13812. * @see _.keysIn
  13813. */
  13814. keysIn(): LoDashExplicitArrayWrapper<string>;
  13815. }
  13816. // _.mapKeys
  13817. interface LoDashStatic {
  13818. /**
  13819. * The opposite of _.mapValues; this method creates an object with the same values as object and keys generated
  13820. * by running each own enumerable property of object through iteratee.
  13821. *
  13822. * @param object The object to iterate over.
  13823. * @param iteratee The function invoked per iteration.
  13824. * @param thisArg The this binding of iteratee.
  13825. * @return Returns the new mapped object.
  13826. */
  13827. mapKeys<T, TKey>(
  13828. object: List<T>,
  13829. iteratee?: ListIterator<T, TKey>,
  13830. thisArg?: any
  13831. ): Dictionary<T>;
  13832. /**
  13833. * @see _.mapKeys
  13834. */
  13835. mapKeys<T, TKey>(
  13836. object: Dictionary<T>,
  13837. iteratee?: DictionaryIterator<T, TKey>,
  13838. thisArg?: any
  13839. ): Dictionary<T>;
  13840. /**
  13841. * @see _.mapKeys
  13842. */
  13843. mapKeys<T, TObject extends {}>(
  13844. object: List<T> | Dictionary<T>,
  13845. iteratee?: TObject
  13846. ): Dictionary<T>;
  13847. /**
  13848. * @see _.mapKeys
  13849. */
  13850. mapKeys<T>(
  13851. object: List<T> | Dictionary<T>,
  13852. iteratee?: string,
  13853. thisArg?: any
  13854. ): Dictionary<T>;
  13855. }
  13856. interface LoDashImplicitArrayWrapper<T> {
  13857. /**
  13858. * @see _.mapKeys
  13859. */
  13860. mapKeys<TKey>(
  13861. iteratee?: ListIterator<T, TKey>,
  13862. thisArg?: any
  13863. ): LoDashImplicitObjectWrapper<Dictionary<T>>;
  13864. /**
  13865. * @see _.mapKeys
  13866. */
  13867. mapKeys<TObject extends {}>(
  13868. iteratee?: TObject
  13869. ): LoDashImplicitObjectWrapper<Dictionary<T>>;
  13870. /**
  13871. * @see _.mapKeys
  13872. */
  13873. mapKeys(
  13874. iteratee?: string,
  13875. thisArg?: any
  13876. ): LoDashImplicitObjectWrapper<Dictionary<T>>;
  13877. }
  13878. interface LoDashImplicitObjectWrapper<T> {
  13879. /**
  13880. * @see _.mapKeys
  13881. */
  13882. mapKeys<TResult, TKey>(
  13883. iteratee?: ListIterator<TResult, TKey> | DictionaryIterator<TResult, TKey>,
  13884. thisArg?: any
  13885. ): LoDashImplicitObjectWrapper<Dictionary<TResult>>;
  13886. /**
  13887. * @see _.mapKeys
  13888. */
  13889. mapKeys<TResult, TObject extends {}>(
  13890. iteratee?: TObject
  13891. ): LoDashImplicitObjectWrapper<Dictionary<TResult>>;
  13892. /**
  13893. * @see _.mapKeys
  13894. */
  13895. mapKeys<TResult>(
  13896. iteratee?: string,
  13897. thisArg?: any
  13898. ): LoDashImplicitObjectWrapper<Dictionary<TResult>>;
  13899. }
  13900. interface LoDashExplicitArrayWrapper<T> {
  13901. /**
  13902. * @see _.mapKeys
  13903. */
  13904. mapKeys<TKey>(
  13905. iteratee?: ListIterator<T, TKey>,
  13906. thisArg?: any
  13907. ): LoDashExplicitObjectWrapper<Dictionary<T>>;
  13908. /**
  13909. * @see _.mapKeys
  13910. */
  13911. mapKeys<TObject extends {}>(
  13912. iteratee?: TObject
  13913. ): LoDashExplicitObjectWrapper<Dictionary<T>>;
  13914. /**
  13915. * @see _.mapKeys
  13916. */
  13917. mapKeys(
  13918. iteratee?: string,
  13919. thisArg?: any
  13920. ): LoDashExplicitObjectWrapper<Dictionary<T>>;
  13921. }
  13922. interface LoDashExplicitObjectWrapper<T> {
  13923. /**
  13924. * @see _.mapKeys
  13925. */
  13926. mapKeys<TResult, TKey>(
  13927. iteratee?: ListIterator<TResult, TKey> | DictionaryIterator<TResult, TKey>,
  13928. thisArg?: any
  13929. ): LoDashExplicitObjectWrapper<Dictionary<TResult>>;
  13930. /**
  13931. * @see _.mapKeys
  13932. */
  13933. mapKeys<TResult, TObject extends {}>(
  13934. iteratee?: TObject
  13935. ): LoDashExplicitObjectWrapper<Dictionary<TResult>>;
  13936. /**
  13937. * @see _.mapKeys
  13938. */
  13939. mapKeys<TResult>(
  13940. iteratee?: string,
  13941. thisArg?: any
  13942. ): LoDashExplicitObjectWrapper<Dictionary<TResult>>;
  13943. }
  13944. // _.mapValues
  13945. interface LoDashStatic {
  13946. /**
  13947. * Creates an object with the same keys as object and values generated by running each own
  13948. * enumerable property of object through iteratee. The iteratee function is bound to thisArg
  13949. * and invoked with three arguments: (value, key, object).
  13950. *
  13951. * If a property name is provided iteratee the created "_.property" style callback returns
  13952. * the property value of the given element.
  13953. *
  13954. * If a value is also provided for thisArg the creted "_.matchesProperty" style callback returns
  13955. * true for elements that have a matching property value, else false;.
  13956. *
  13957. * If an object is provided for iteratee the created "_.matches" style callback returns true
  13958. * for elements that have the properties of the given object, else false.
  13959. *
  13960. * @param {Object} object The object to iterate over.
  13961. * @param {Function|Object|string} [iteratee=_.identity] The function invoked per iteration.
  13962. * @param {Object} [thisArg] The `this` binding of `iteratee`.
  13963. * @return {Object} Returns the new mapped object.
  13964. */
  13965. mapValues<T, TResult>(obj: Dictionary<T>, callback: ObjectIterator<T, TResult>, thisArg?: any): Dictionary<TResult>;
  13966. mapValues<T>(obj: Dictionary<T>, where: Dictionary<T>): Dictionary<boolean>;
  13967. mapValues<T, TMapped>(obj: T, pluck: string): TMapped;
  13968. mapValues<T>(obj: T, callback: ObjectIterator<any, any>, thisArg?: any): T;
  13969. }
  13970. interface LoDashImplicitObjectWrapper<T> {
  13971. /**
  13972. * @see _.mapValues
  13973. * TValue is the type of the property values of T.
  13974. * TResult is the type output by the ObjectIterator function
  13975. */
  13976. mapValues<TValue, TResult>(callback: ObjectIterator<TValue, TResult>, thisArg?: any): LoDashImplicitObjectWrapper<Dictionary<TResult>>;
  13977. /**
  13978. * @see _.mapValues
  13979. * TResult is the type of the property specified by pluck.
  13980. * T should be a Dictionary<Dictionary<TResult>>
  13981. */
  13982. mapValues<TResult>(pluck: string): LoDashImplicitObjectWrapper<Dictionary<TResult>>;
  13983. /**
  13984. * @see _.mapValues
  13985. * TResult is the type of the properties on the object specified by pluck.
  13986. * T should be a Dictionary<Dictionary<Dictionary<TResult>>>
  13987. */
  13988. mapValues<TResult>(pluck: string, where: Dictionary<TResult>): LoDashImplicitArrayWrapper<Dictionary<boolean>>;
  13989. /**
  13990. * @see _.mapValues
  13991. * TResult is the type of the properties of each object in the values of T
  13992. * T should be a Dictionary<Dictionary<TResult>>
  13993. */
  13994. mapValues<TResult>(where: Dictionary<TResult>): LoDashImplicitArrayWrapper<boolean>;
  13995. }
  13996. // _.merge
  13997. interface LoDashStatic {
  13998. /**
  13999. * Recursively merges own and inherited enumerable properties of source
  14000. * objects into the destination object, skipping source properties that resolve
  14001. * to `undefined`. Array and plain object properties are merged recursively.
  14002. * Other objects and value types are overridden by assignment. Source objects
  14003. * are applied from left to right. Subsequent sources overwrite property
  14004. * assignments of previous sources.
  14005. *
  14006. * **Note:** This method mutates `object`.
  14007. *
  14008. * @static
  14009. * @memberOf _
  14010. * @category Object
  14011. * @param {Object} object The destination object.
  14012. * @param {...Object} [sources] The source objects.
  14013. * @returns {Object} Returns `object`.
  14014. * @example
  14015. *
  14016. * var users = {
  14017. * 'data': [{ 'user': 'barney' }, { 'user': 'fred' }]
  14018. * };
  14019. *
  14020. * var ages = {
  14021. * 'data': [{ 'age': 36 }, { 'age': 40 }]
  14022. * };
  14023. *
  14024. * _.merge(users, ages);
  14025. * // => { 'data': [{ 'user': 'barney', 'age': 36 }, { 'user': 'fred', 'age': 40 }] }
  14026. */
  14027. merge<TObject, TSource>(
  14028. object: TObject,
  14029. source: TSource
  14030. ): TObject & TSource;
  14031. /**
  14032. * @see _.merge
  14033. */
  14034. merge<TObject, TSource1, TSource2>(
  14035. object: TObject,
  14036. source1: TSource1,
  14037. source2: TSource2
  14038. ): TObject & TSource1 & TSource2;
  14039. /**
  14040. * @see _.merge
  14041. */
  14042. merge<TObject, TSource1, TSource2, TSource3>(
  14043. object: TObject,
  14044. source1: TSource1,
  14045. source2: TSource2,
  14046. source3: TSource3
  14047. ): TObject & TSource1 & TSource2 & TSource3;
  14048. /**
  14049. * @see _.merge
  14050. */
  14051. merge<TObject, TSource1, TSource2, TSource3, TSource4>(
  14052. object: TObject,
  14053. source1: TSource1,
  14054. source2: TSource2,
  14055. source3: TSource3,
  14056. source4: TSource4
  14057. ): TObject & TSource1 & TSource2 & TSource3 & TSource4;
  14058. /**
  14059. * @see _.merge
  14060. */
  14061. merge<TResult>(
  14062. object: any,
  14063. ...otherArgs: any[]
  14064. ): TResult;
  14065. }
  14066. interface LoDashImplicitObjectWrapper<T> {
  14067. /**
  14068. * @see _.merge
  14069. */
  14070. merge<TSource>(
  14071. source: TSource
  14072. ): LoDashImplicitObjectWrapper<T & TSource>;
  14073. /**
  14074. * @see _.merge
  14075. */
  14076. merge<TSource1, TSource2>(
  14077. source1: TSource1,
  14078. source2: TSource2
  14079. ): LoDashImplicitObjectWrapper<T & TSource1 & TSource2>;
  14080. /**
  14081. * @see _.merge
  14082. */
  14083. merge<TSource1, TSource2, TSource3>(
  14084. source1: TSource1,
  14085. source2: TSource2,
  14086. source3: TSource3
  14087. ): LoDashImplicitObjectWrapper<T & TSource1 & TSource2 & TSource3>;
  14088. /**
  14089. * @see _.merge
  14090. */
  14091. merge<TSource1, TSource2, TSource3, TSource4>(
  14092. source1: TSource1,
  14093. source2: TSource2,
  14094. source3: TSource3,
  14095. source4: TSource4
  14096. ): LoDashImplicitObjectWrapper<T & TSource1 & TSource2 & TSource3 & TSource4>;
  14097. /**
  14098. * @see _.merge
  14099. */
  14100. merge<TResult>(
  14101. ...otherArgs: any[]
  14102. ): LoDashImplicitObjectWrapper<TResult>;
  14103. }
  14104. interface LoDashExplicitObjectWrapper<T> {
  14105. /**
  14106. * @see _.merge
  14107. */
  14108. merge<TSource>(
  14109. source: TSource
  14110. ): LoDashExplicitObjectWrapper<T & TSource>;
  14111. /**
  14112. * @see _.merge
  14113. */
  14114. merge<TSource1, TSource2>(
  14115. source1: TSource1,
  14116. source2: TSource2
  14117. ): LoDashExplicitObjectWrapper<T & TSource1 & TSource2>;
  14118. /**
  14119. * @see _.merge
  14120. */
  14121. merge<TSource1, TSource2, TSource3>(
  14122. source1: TSource1,
  14123. source2: TSource2,
  14124. source3: TSource3
  14125. ): LoDashExplicitObjectWrapper<T & TSource1 & TSource2 & TSource3>;
  14126. /**
  14127. * @see _.merge
  14128. */
  14129. merge<TSource1, TSource2, TSource3, TSource4>(
  14130. ): LoDashExplicitObjectWrapper<T & TSource1 & TSource2 & TSource3 & TSource4>;
  14131. /**
  14132. * @see _.merge
  14133. */
  14134. merge<TResult>(
  14135. ...otherArgs: any[]
  14136. ): LoDashExplicitObjectWrapper<TResult>;
  14137. }
  14138. // _.mergeWith
  14139. interface MergeWithCustomizer {
  14140. (value: any, srcValue: any, key?: string, object?: Object, source?: Object): any;
  14141. }
  14142. interface LoDashStatic {
  14143. /**
  14144. * This method is like `_.merge` except that it accepts `customizer` which
  14145. * is invoked to produce the merged values of the destination and source
  14146. * properties. If `customizer` returns `undefined` merging is handled by the
  14147. * method instead. The `customizer` is invoked with seven arguments:
  14148. * (objValue, srcValue, key, object, source, stack).
  14149. *
  14150. * @static
  14151. * @memberOf _
  14152. * @category Object
  14153. * @param {Object} object The destination object.
  14154. * @param {...Object} sources The source objects.
  14155. * @param {Function} customizer The function to customize assigned values.
  14156. * @returns {Object} Returns `object`.
  14157. * @example
  14158. *
  14159. * function customizer(objValue, srcValue) {
  14160. * if (_.isArray(objValue)) {
  14161. * return objValue.concat(srcValue);
  14162. * }
  14163. * }
  14164. *
  14165. * var object = {
  14166. * 'fruits': ['apple'],
  14167. * 'vegetables': ['beet']
  14168. * };
  14169. *
  14170. * var other = {
  14171. * 'fruits': ['banana'],
  14172. * 'vegetables': ['carrot']
  14173. * };
  14174. *
  14175. * _.merge(object, other, customizer);
  14176. * // => { 'fruits': ['apple', 'banana'], 'vegetables': ['beet', 'carrot'] }
  14177. */
  14178. mergeWith<TObject, TSource>(
  14179. object: TObject,
  14180. source: TSource,
  14181. customizer: MergeWithCustomizer
  14182. ): TObject & TSource;
  14183. /**
  14184. * @see _.mergeWith
  14185. */
  14186. mergeWith<TObject, TSource1, TSource2>(
  14187. object: TObject,
  14188. source1: TSource1,
  14189. source2: TSource2,
  14190. customizer: MergeWithCustomizer
  14191. ): TObject & TSource1 & TSource2;
  14192. /**
  14193. * @see _.mergeWith
  14194. */
  14195. mergeWith<TObject, TSource1, TSource2, TSource3>(
  14196. object: TObject,
  14197. source1: TSource1,
  14198. source2: TSource2,
  14199. source3: TSource3,
  14200. customizer: MergeWithCustomizer
  14201. ): TObject & TSource1 & TSource2 & TSource3;
  14202. /**
  14203. * @see _.mergeWith
  14204. */
  14205. mergeWith<TObject, TSource1, TSource2, TSource3, TSource4>(
  14206. object: TObject,
  14207. source1: TSource1,
  14208. source2: TSource2,
  14209. source3: TSource3,
  14210. source4: TSource4,
  14211. customizer: MergeWithCustomizer
  14212. ): TObject & TSource1 & TSource2 & TSource3 & TSource4;
  14213. /**
  14214. * @see _.mergeWith
  14215. */
  14216. mergeWith<TResult>(
  14217. object: any,
  14218. ...otherArgs: any[]
  14219. ): TResult;
  14220. }
  14221. interface LoDashImplicitObjectWrapper<T> {
  14222. /**
  14223. * @see _.mergeWith
  14224. */
  14225. mergeWith<TSource>(
  14226. source: TSource,
  14227. customizer: MergeWithCustomizer
  14228. ): LoDashImplicitObjectWrapper<T & TSource>;
  14229. /**
  14230. * @see _.mergeWith
  14231. */
  14232. mergeWith<TSource1, TSource2>(
  14233. source1: TSource1,
  14234. source2: TSource2,
  14235. customizer: MergeWithCustomizer
  14236. ): LoDashImplicitObjectWrapper<T & TSource1 & TSource2>;
  14237. /**
  14238. * @see _.mergeWith
  14239. */
  14240. mergeWith<TSource1, TSource2, TSource3>(
  14241. source1: TSource1,
  14242. source2: TSource2,
  14243. source3: TSource3,
  14244. customizer: MergeWithCustomizer
  14245. ): LoDashImplicitObjectWrapper<T & TSource1 & TSource2 & TSource3>;
  14246. /**
  14247. * @see _.mergeWith
  14248. */
  14249. mergeWith<TSource1, TSource2, TSource3, TSource4>(
  14250. source1: TSource1,
  14251. source2: TSource2,
  14252. source3: TSource3,
  14253. source4: TSource4,
  14254. customizer: MergeWithCustomizer
  14255. ): LoDashImplicitObjectWrapper<T & TSource1 & TSource2 & TSource3 & TSource4>;
  14256. /**
  14257. * @see _.mergeWith
  14258. */
  14259. mergeWith<TResult>(
  14260. ...otherArgs: any[]
  14261. ): LoDashImplicitObjectWrapper<TResult>;
  14262. }
  14263. // _.omit
  14264. interface LoDashStatic {
  14265. /**
  14266. * The opposite of `_.pick`; this method creates an object composed of the
  14267. * own and inherited enumerable properties of `object` that are not omitted.
  14268. *
  14269. * @static
  14270. * @memberOf _
  14271. * @category Object
  14272. * @param {Object} object The source object.
  14273. * @param {...(string|string[])} [props] The property names to omit, specified
  14274. * individually or in arrays..
  14275. * @returns {Object} Returns the new object.
  14276. * @example
  14277. *
  14278. * var object = { 'a': 1, 'b': '2', 'c': 3 };
  14279. *
  14280. * _.omit(object, ['a', 'c']);
  14281. * // => { 'b': '2' }
  14282. */
  14283. omit<TResult extends {}, T extends {}>(
  14284. object: T,
  14285. ...predicate: (StringRepresentable | StringRepresentable[])[]
  14286. ): TResult;
  14287. }
  14288. interface LoDashImplicitObjectWrapper<T> {
  14289. /**
  14290. * @see _.omit
  14291. */
  14292. omit<TResult extends {}>(
  14293. ...predicate: (StringRepresentable | StringRepresentable[])[]
  14294. ): LoDashImplicitObjectWrapper<TResult>;
  14295. }
  14296. interface LoDashExplicitObjectWrapper<T> {
  14297. /**
  14298. * @see _.omit
  14299. */
  14300. omit<TResult extends {}>(
  14301. ...predicate: (StringRepresentable | StringRepresentable[])[]
  14302. ): LoDashExplicitObjectWrapper<TResult>;
  14303. }
  14304. // _.omitBy
  14305. interface LoDashStatic {
  14306. /**
  14307. * The opposite of `_.pickBy`; this method creates an object composed of the
  14308. * own and inherited enumerable properties of `object` that `predicate`
  14309. * doesn't return truthy for.
  14310. *
  14311. * @static
  14312. * @memberOf _
  14313. * @category Object
  14314. * @param {Object} object The source object.
  14315. * @param {Function|Object|string} [predicate=_.identity] The function invoked per property.
  14316. * @returns {Object} Returns the new object.
  14317. * @example
  14318. *
  14319. * var object = { 'a': 1, 'b': '2', 'c': 3 };
  14320. *
  14321. * _.omitBy(object, _.isNumber);
  14322. * // => { 'b': '2' }
  14323. */
  14324. omitBy<TResult extends {}, T extends {}>(
  14325. object: T,
  14326. predicate: ObjectIterator<any, boolean>
  14327. ): TResult;
  14328. }
  14329. interface LoDashImplicitObjectWrapper<T> {
  14330. /**
  14331. * @see _.omitBy
  14332. */
  14333. omitBy<TResult extends {}>(
  14334. predicate: ObjectIterator<any, boolean>
  14335. ): LoDashImplicitObjectWrapper<TResult>;
  14336. }
  14337. interface LoDashExplicitObjectWrapper<T> {
  14338. /**
  14339. * @see _.omitBy
  14340. */
  14341. omitBy<TResult extends {}>(
  14342. predicate: ObjectIterator<any, boolean>
  14343. ): LoDashExplicitObjectWrapper<TResult>;
  14344. }
  14345. // _.pick
  14346. interface LoDashStatic {
  14347. /**
  14348. * Creates an object composed of the picked `object` properties.
  14349. *
  14350. * @static
  14351. * @memberOf _
  14352. * @category Object
  14353. * @param {Object} object The source object.
  14354. * @param {...(string|string[])} [props] The property names to pick, specified
  14355. * individually or in arrays.
  14356. * @returns {Object} Returns the new object.
  14357. * @example
  14358. *
  14359. * var object = { 'a': 1, 'b': '2', 'c': 3 };
  14360. *
  14361. * _.pick(object, ['a', 'c']);
  14362. * // => { 'a': 1, 'c': 3 }
  14363. */
  14364. pick<TResult extends {}, T extends {}>(
  14365. object: T,
  14366. ...predicate: (StringRepresentable | StringRepresentable[])[]
  14367. ): TResult;
  14368. }
  14369. interface LoDashImplicitObjectWrapper<T> {
  14370. /**
  14371. * @see _.pick
  14372. */
  14373. pick<TResult extends {}>(
  14374. ...predicate: (StringRepresentable | StringRepresentable[])[]
  14375. ): LoDashImplicitObjectWrapper<TResult>;
  14376. }
  14377. interface LoDashExplicitObjectWrapper<T> {
  14378. /**
  14379. * @see _.pick
  14380. */
  14381. pick<TResult extends {}>(
  14382. ...predicate: (StringRepresentable | StringRepresentable[])[]
  14383. ): LoDashExplicitObjectWrapper<TResult>;
  14384. }
  14385. // _.pickBy
  14386. interface LoDashStatic {
  14387. /**
  14388. * Creates an object composed of the `object` properties `predicate` returns
  14389. * truthy for. The predicate is invoked with one argument: (value).
  14390. *
  14391. * @static
  14392. * @memberOf _
  14393. * @category Object
  14394. * @param {Object} object The source object.
  14395. * @param {Function|Object|string} [predicate=_.identity] The function invoked per property.
  14396. * @returns {Object} Returns the new object.
  14397. * @example
  14398. *
  14399. * var object = { 'a': 1, 'b': '2', 'c': 3 };
  14400. *
  14401. * _.pickBy(object, _.isNumber);
  14402. * // => { 'a': 1, 'c': 3 }
  14403. */
  14404. pickBy<TResult extends {}, T extends {}>(
  14405. object: T,
  14406. predicate: ObjectIterator<any, boolean>
  14407. ): TResult;
  14408. }
  14409. interface LoDashImplicitObjectWrapper<T> {
  14410. /**
  14411. * @see _.pickBy
  14412. */
  14413. pickBy<TResult extends {}>(
  14414. predicate: ObjectIterator<any, boolean>
  14415. ): LoDashImplicitObjectWrapper<TResult>;
  14416. }
  14417. interface LoDashExplicitObjectWrapper<T> {
  14418. /**
  14419. * @see _.pickBy
  14420. */
  14421. pickBy<TResult extends {}>(
  14422. predicate: ObjectIterator<any, boolean>
  14423. ): LoDashExplicitObjectWrapper<TResult>;
  14424. }
  14425. // _.result
  14426. interface LoDashStatic {
  14427. /**
  14428. * This method is like _.get except that if the resolved value is a function its invoked with the this binding
  14429. * of its parent object and its result is returned.
  14430. *
  14431. * @param object The object to query.
  14432. * @param path The path of the property to resolve.
  14433. * @param defaultValue The value returned if the resolved value is undefined.
  14434. * @return Returns the resolved value.
  14435. */
  14436. result<TObject, TResult>(
  14437. object: TObject,
  14438. path: number | string | boolean | Array<number | string | boolean>,
  14439. defaultValue?: TResult
  14440. ): TResult;
  14441. }
  14442. interface LoDashImplicitWrapperBase<T, TWrapper> {
  14443. /**
  14444. * @see _.result
  14445. */
  14446. result<TResult>(
  14447. path: number | string | boolean | Array<number | string | boolean>,
  14448. defaultValue?: TResult
  14449. ): TResult;
  14450. }
  14451. // _.set
  14452. interface LoDashStatic {
  14453. /**
  14454. * Sets the value at path of object. If a portion of path doesnt exist its created. Arrays are created for
  14455. * missing index properties while objects are created for all other missing properties. Use _.setWith to
  14456. * customize path creation.
  14457. *
  14458. * @param object The object to modify.
  14459. * @param path The path of the property to set.
  14460. * @param value The value to set.
  14461. * @return Returns object.
  14462. */
  14463. set<TResult>(
  14464. object: Object,
  14465. path: StringRepresentable | StringRepresentable[],
  14466. value: any
  14467. ): TResult;
  14468. /**
  14469. * @see _.set
  14470. */
  14471. set<V, TResult>(
  14472. object: Object,
  14473. path: StringRepresentable | StringRepresentable[],
  14474. value: V
  14475. ): TResult;
  14476. /**
  14477. * @see _.set
  14478. */
  14479. set<O, V, TResult>(
  14480. object: O,
  14481. path: StringRepresentable | StringRepresentable[],
  14482. value: V
  14483. ): TResult;
  14484. }
  14485. interface LoDashImplicitObjectWrapper<T> {
  14486. /**
  14487. * @see _.set
  14488. */
  14489. set<TResult>(
  14490. path: StringRepresentable | StringRepresentable[],
  14491. value: any
  14492. ): LoDashImplicitObjectWrapper<TResult>;
  14493. /**
  14494. * @see _.set
  14495. */
  14496. set<V, TResult>(
  14497. path: StringRepresentable | StringRepresentable[],
  14498. value: V
  14499. ): LoDashImplicitObjectWrapper<TResult>;
  14500. }
  14501. interface LoDashExplicitObjectWrapper<T> {
  14502. /**
  14503. * @see _.set
  14504. */
  14505. set<TResult>(
  14506. path: StringRepresentable | StringRepresentable[],
  14507. value: any
  14508. ): LoDashExplicitObjectWrapper<TResult>;
  14509. /**
  14510. * @see _.set
  14511. */
  14512. set<V, TResult>(
  14513. path: StringRepresentable | StringRepresentable[],
  14514. value: V
  14515. ): LoDashExplicitObjectWrapper<TResult>;
  14516. }
  14517. // _.setWith
  14518. interface SetWithCustomizer<T> {
  14519. (nsValue: any, key: string, nsObject: T): any;
  14520. }
  14521. interface LoDashStatic {
  14522. /**
  14523. * This method is like _.set except that it accepts customizer which is invoked to produce the objects of
  14524. * path. If customizer returns undefined path creation is handled by the method instead. The customizer is
  14525. * invoked with three arguments: (nsValue, key, nsObject).
  14526. *
  14527. * @param object The object to modify.
  14528. * @param path The path of the property to set.
  14529. * @param value The value to set.
  14530. * @parem customizer The function to customize assigned values.
  14531. * @return Returns object.
  14532. */
  14533. setWith<TResult>(
  14534. object: Object,
  14535. path: StringRepresentable | StringRepresentable[],
  14536. value: any,
  14537. customizer?: SetWithCustomizer<Object>
  14538. ): TResult;
  14539. /**
  14540. * @see _.setWith
  14541. */
  14542. setWith<V, TResult>(
  14543. object: Object,
  14544. path: StringRepresentable | StringRepresentable[],
  14545. value: V,
  14546. customizer?: SetWithCustomizer<Object>
  14547. ): TResult;
  14548. /**
  14549. * @see _.setWith
  14550. */
  14551. setWith<O, V, TResult>(
  14552. object: O,
  14553. path: StringRepresentable | StringRepresentable[],
  14554. value: V,
  14555. customizer?: SetWithCustomizer<O>
  14556. ): TResult;
  14557. }
  14558. interface LoDashImplicitObjectWrapper<T> {
  14559. /**
  14560. * @see _.setWith
  14561. */
  14562. setWith<TResult>(
  14563. path: StringRepresentable | StringRepresentable[],
  14564. value: any,
  14565. customizer?: SetWithCustomizer<T>
  14566. ): LoDashImplicitObjectWrapper<TResult>;
  14567. /**
  14568. * @see _.setWith
  14569. */
  14570. setWith<V, TResult>(
  14571. path: StringRepresentable | StringRepresentable[],
  14572. value: V,
  14573. customizer?: SetWithCustomizer<T>
  14574. ): LoDashImplicitObjectWrapper<TResult>;
  14575. }
  14576. interface LoDashExplicitObjectWrapper<T> {
  14577. /**
  14578. * @see _.setWith
  14579. */
  14580. setWith<TResult>(
  14581. path: StringRepresentable | StringRepresentable[],
  14582. value: any,
  14583. customizer?: SetWithCustomizer<T>
  14584. ): LoDashExplicitObjectWrapper<TResult>;
  14585. /**
  14586. * @see _.setWith
  14587. */
  14588. setWith<V, TResult>(
  14589. path: StringRepresentable | StringRepresentable[],
  14590. value: V,
  14591. customizer?: SetWithCustomizer<T>
  14592. ): LoDashExplicitObjectWrapper<TResult>;
  14593. }
  14594. // _.toPairs
  14595. interface LoDashStatic {
  14596. /**
  14597. * Creates an array of own enumerable key-value pairs for object.
  14598. *
  14599. * @param object The object to query.
  14600. * @return Returns the new array of key-value pairs.
  14601. */
  14602. toPairs<T extends {}>(object?: T): any[][];
  14603. toPairs<T extends {}, TResult>(object?: T): TResult[][];
  14604. }
  14605. interface LoDashImplicitObjectWrapper<T> {
  14606. /**
  14607. * @see _.toPairs
  14608. */
  14609. toPairs<TResult>(): LoDashImplicitArrayWrapper<TResult[]>;
  14610. }
  14611. interface LoDashExplicitObjectWrapper<T> {
  14612. /**
  14613. * @see _.toPairs
  14614. */
  14615. toPairs<TResult>(): LoDashExplicitArrayWrapper<TResult[]>;
  14616. }
  14617. // _.toPairsIn
  14618. interface LoDashStatic {
  14619. /**
  14620. * Creates an array of own and inherited enumerable key-value pairs for object.
  14621. *
  14622. * @param object The object to query.
  14623. * @return Returns the new array of key-value pairs.
  14624. */
  14625. toPairsIn<T extends {}>(object?: T): any[][];
  14626. toPairsIn<T extends {}, TResult>(object?: T): TResult[][];
  14627. }
  14628. interface LoDashImplicitObjectWrapper<T> {
  14629. /**
  14630. * @see _.toPairsIn
  14631. */
  14632. toPairsIn<TResult>(): LoDashImplicitArrayWrapper<TResult[]>;
  14633. }
  14634. interface LoDashExplicitObjectWrapper<T> {
  14635. /**
  14636. * @see _.toPairsIn
  14637. */
  14638. toPairsIn<TResult>(): LoDashExplicitArrayWrapper<TResult[]>;
  14639. }
  14640. // _.transform
  14641. interface LoDashStatic {
  14642. /**
  14643. * An alternative to _.reduce; this method transforms object to a new accumulator object which is the result of
  14644. * running each of its own enumerable properties through iteratee, with each invocation potentially mutating
  14645. * the accumulator object. The iteratee is bound to thisArg and invoked with four arguments: (accumulator,
  14646. * value, key, object). Iteratee functions may exit iteration early by explicitly returning false.
  14647. *
  14648. * @param object The object to iterate over.
  14649. * @param iteratee The function invoked per iteration.
  14650. * @param accumulator The custom accumulator value.
  14651. * @param thisArg The this binding of iteratee.
  14652. * @return Returns the accumulated value.
  14653. */
  14654. transform<T, TResult>(
  14655. object: T[],
  14656. iteratee?: MemoVoidArrayIterator<T, TResult[]>,
  14657. accumulator?: TResult[],
  14658. thisArg?: any
  14659. ): TResult[];
  14660. /**
  14661. * @see _.transform
  14662. */
  14663. transform<T, TResult>(
  14664. object: T[],
  14665. iteratee?: MemoVoidArrayIterator<T, Dictionary<TResult>>,
  14666. accumulator?: Dictionary<TResult>,
  14667. thisArg?: any
  14668. ): Dictionary<TResult>;
  14669. /**
  14670. * @see _.transform
  14671. */
  14672. transform<T, TResult>(
  14673. object: Dictionary<T>,
  14674. iteratee?: MemoVoidDictionaryIterator<T, Dictionary<TResult>>,
  14675. accumulator?: Dictionary<TResult>,
  14676. thisArg?: any
  14677. ): Dictionary<TResult>;
  14678. /**
  14679. * @see _.transform
  14680. */
  14681. transform<T, TResult>(
  14682. object: Dictionary<T>,
  14683. iteratee?: MemoVoidDictionaryIterator<T, TResult[]>,
  14684. accumulator?: TResult[],
  14685. thisArg?: any
  14686. ): TResult[];
  14687. }
  14688. interface LoDashImplicitArrayWrapper<T> {
  14689. /**
  14690. * @see _.transform
  14691. */
  14692. transform<TResult>(
  14693. iteratee?: MemoVoidArrayIterator<T, TResult[]>,
  14694. accumulator?: TResult[],
  14695. thisArg?: any
  14696. ): LoDashImplicitArrayWrapper<TResult>;
  14697. /**
  14698. * @see _.transform
  14699. */
  14700. transform<TResult>(
  14701. iteratee?: MemoVoidArrayIterator<T, Dictionary<TResult>>,
  14702. accumulator?: Dictionary<TResult>,
  14703. thisArg?: any
  14704. ): LoDashImplicitObjectWrapper<Dictionary<TResult>>;
  14705. }
  14706. interface LoDashImplicitObjectWrapper<T> {
  14707. /**
  14708. * @see _.transform
  14709. */
  14710. transform<T, TResult>(
  14711. iteratee?: MemoVoidDictionaryIterator<T, Dictionary<TResult>>,
  14712. accumulator?: Dictionary<TResult>,
  14713. thisArg?: any
  14714. ): LoDashImplicitObjectWrapper<Dictionary<TResult>>;
  14715. /**
  14716. * @see _.transform
  14717. */
  14718. transform<T, TResult>(
  14719. iteratee?: MemoVoidDictionaryIterator<T, TResult[]>,
  14720. accumulator?: TResult[],
  14721. thisArg?: any
  14722. ): LoDashImplicitArrayWrapper<TResult>;
  14723. }
  14724. // _.unset
  14725. interface LoDashStatic {
  14726. /**
  14727. * Removes the property at path of object.
  14728. *
  14729. * Note: This method mutates object.
  14730. *
  14731. * @param object The object to modify.
  14732. * @param path The path of the property to unset.
  14733. * @return Returns true if the property is deleted, else false.
  14734. */
  14735. unset<T>(
  14736. object: T,
  14737. path: StringRepresentable | StringRepresentable[]
  14738. ): boolean;
  14739. }
  14740. interface LoDashImplicitObjectWrapper<T> {
  14741. /**
  14742. * @see _.unset
  14743. */
  14744. unset(path: StringRepresentable | StringRepresentable[]): LoDashImplicitWrapper<boolean>;
  14745. }
  14746. interface LoDashExplicitObjectWrapper<T> {
  14747. /**
  14748. * @see _.unset
  14749. */
  14750. unset(path: StringRepresentable | StringRepresentable[]): LoDashExplicitWrapper<boolean>;
  14751. }
  14752. // _.values
  14753. interface LoDashStatic {
  14754. /**
  14755. * Creates an array of the own enumerable property values of object.
  14756. *
  14757. * @param object The object to query.
  14758. * @return Returns an array of property values.
  14759. */
  14760. values<T>(object?: any): T[];
  14761. }
  14762. interface LoDashImplicitObjectWrapper<T> {
  14763. /**
  14764. * @see _.values
  14765. */
  14766. values<T>(): LoDashImplicitArrayWrapper<T>;
  14767. }
  14768. interface LoDashExplicitObjectWrapper<T> {
  14769. /**
  14770. * @see _.values
  14771. */
  14772. values<T>(): LoDashExplicitArrayWrapper<T>;
  14773. }
  14774. // _.valuesIn
  14775. interface LoDashStatic {
  14776. /**
  14777. * Creates an array of the own and inherited enumerable property values of object.
  14778. *
  14779. * @param object The object to query.
  14780. * @return Returns the array of property values.
  14781. */
  14782. valuesIn<T>(object?: any): T[];
  14783. }
  14784. interface LoDashImplicitObjectWrapper<T> {
  14785. /**
  14786. * @see _.valuesIn
  14787. */
  14788. valuesIn<T>(): LoDashImplicitArrayWrapper<T>;
  14789. }
  14790. interface LoDashExplicitObjectWrapper<T> {
  14791. /**
  14792. * @see _.valuesIn
  14793. */
  14794. valuesIn<T>(): LoDashExplicitArrayWrapper<T>;
  14795. }
  14796. /**********
  14797. * String *
  14798. *********/
  14799. // _.camelCase
  14800. interface LoDashStatic {
  14801. /**
  14802. * Converts string to camel case.
  14803. *
  14804. * @param string The string to convert.
  14805. * @return Returns the camel cased string.
  14806. */
  14807. camelCase(string?: string): string;
  14808. }
  14809. interface LoDashImplicitWrapper<T> {
  14810. /**
  14811. * @see _.camelCase
  14812. */
  14813. camelCase(): string;
  14814. }
  14815. interface LoDashExplicitWrapper<T> {
  14816. /**
  14817. * @see _.camelCase
  14818. */
  14819. camelCase(): LoDashExplicitWrapper<string>;
  14820. }
  14821. // _.capitalize
  14822. interface LoDashStatic {
  14823. /**
  14824. * Converts the first character of string to upper case and the remaining to lower case.
  14825. *
  14826. * @param string The string to capitalize.
  14827. * @return Returns the capitalized string.
  14828. */
  14829. capitalize(string?: string): string;
  14830. }
  14831. interface LoDashImplicitWrapper<T> {
  14832. /**
  14833. * @see _.capitalize
  14834. */
  14835. capitalize(): string;
  14836. }
  14837. interface LoDashExplicitWrapper<T> {
  14838. /**
  14839. * @see _.capitalize
  14840. */
  14841. capitalize(): LoDashExplicitWrapper<string>;
  14842. }
  14843. // _.deburr
  14844. interface LoDashStatic {
  14845. /**
  14846. * Deburrs string by converting latin-1 supplementary letters to basic latin letters and removing combining
  14847. * diacritical marks.
  14848. *
  14849. * @param string The string to deburr.
  14850. * @return Returns the deburred string.
  14851. */
  14852. deburr(string?: string): string;
  14853. }
  14854. interface LoDashImplicitWrapper<T> {
  14855. /**
  14856. * @see _.deburr
  14857. */
  14858. deburr(): string;
  14859. }
  14860. interface LoDashExplicitWrapper<T> {
  14861. /**
  14862. * @see _.deburr
  14863. */
  14864. deburr(): LoDashExplicitWrapper<string>;
  14865. }
  14866. // _.endsWith
  14867. interface LoDashStatic {
  14868. /**
  14869. * Checks if string ends with the given target string.
  14870. *
  14871. * @param string The string to search.
  14872. * @param target The string to search for.
  14873. * @param position The position to search from.
  14874. * @return Returns true if string ends with target, else false.
  14875. */
  14876. endsWith(
  14877. string?: string,
  14878. target?: string,
  14879. position?: number
  14880. ): boolean;
  14881. }
  14882. interface LoDashImplicitWrapper<T> {
  14883. /**
  14884. * @see _.endsWith
  14885. */
  14886. endsWith(
  14887. target?: string,
  14888. position?: number
  14889. ): boolean;
  14890. }
  14891. interface LoDashExplicitWrapper<T> {
  14892. /**
  14893. * @see _.endsWith
  14894. */
  14895. endsWith(
  14896. target?: string,
  14897. position?: number
  14898. ): LoDashExplicitWrapper<boolean>;
  14899. }
  14900. // _.escape
  14901. interface LoDashStatic {
  14902. /**
  14903. * Converts the characters "&", "<", ">", '"', "'", and "`" in string to their corresponding HTML entities.
  14904. *
  14905. * Note: No other characters are escaped. To escape additional characters use a third-party library like he.
  14906. *
  14907. * hough the ">" character is escaped for symmetry, characters like ">" and "/" dont need escaping in HTML
  14908. * and have no special meaning unless they're part of a tag or unquoted attribute value. See Mathias Bynenss
  14909. * article (under "semi-related fun fact") for more details.
  14910. *
  14911. * Backticks are escaped because in IE < 9, they can break out of attribute values or HTML comments. See #59,
  14912. * #102, #108, and #133 of the HTML5 Security Cheatsheet for more details.
  14913. *
  14914. * When working with HTML you should always quote attribute values to reduce XSS vectors.
  14915. *
  14916. * @param string The string to escape.
  14917. * @return Returns the escaped string.
  14918. */
  14919. escape(string?: string): string;
  14920. }
  14921. interface LoDashImplicitWrapper<T> {
  14922. /**
  14923. * @see _.escape
  14924. */
  14925. escape(): string;
  14926. }
  14927. interface LoDashExplicitWrapper<T> {
  14928. /**
  14929. * @see _.escape
  14930. */
  14931. escape(): LoDashExplicitWrapper<string>;
  14932. }
  14933. // _.escapeRegExp
  14934. interface LoDashStatic {
  14935. /**
  14936. * Escapes the RegExp special characters "^", "$", "\", ".", "*", "+", "?", "(", ")", "[", "]",
  14937. * "{", "}", and "|" in string.
  14938. *
  14939. * @param string The string to escape.
  14940. * @return Returns the escaped string.
  14941. */
  14942. escapeRegExp(string?: string): string;
  14943. }
  14944. interface LoDashImplicitWrapper<T> {
  14945. /**
  14946. * @see _.escapeRegExp
  14947. */
  14948. escapeRegExp(): string;
  14949. }
  14950. interface LoDashExplicitWrapper<T> {
  14951. /**
  14952. * @see _.escapeRegExp
  14953. */
  14954. escapeRegExp(): LoDashExplicitWrapper<string>;
  14955. }
  14956. // _.kebabCase
  14957. interface LoDashStatic {
  14958. /**
  14959. * Converts string to kebab case.
  14960. *
  14961. * @param string The string to convert.
  14962. * @return Returns the kebab cased string.
  14963. */
  14964. kebabCase(string?: string): string;
  14965. }
  14966. interface LoDashImplicitWrapper<T> {
  14967. /**
  14968. * @see _.kebabCase
  14969. */
  14970. kebabCase(): string;
  14971. }
  14972. interface LoDashExplicitWrapper<T> {
  14973. /**
  14974. * @see _.kebabCase
  14975. */
  14976. kebabCase(): LoDashExplicitWrapper<string>;
  14977. }
  14978. // _.lowerCase
  14979. interface LoDashStatic {
  14980. /**
  14981. * Converts `string`, as space separated words, to lower case.
  14982. *
  14983. * @param string The string to convert.
  14984. * @return Returns the lower cased string.
  14985. */
  14986. lowerCase(string?: string): string;
  14987. }
  14988. interface LoDashImplicitWrapper<T> {
  14989. /**
  14990. * @see _.lowerCase
  14991. */
  14992. lowerCase(): string;
  14993. }
  14994. interface LoDashExplicitWrapper<T> {
  14995. /**
  14996. * @see _.lowerCase
  14997. */
  14998. lowerCase(): LoDashExplicitWrapper<string>;
  14999. }
  15000. // _.lowerFirst
  15001. interface LoDashStatic {
  15002. /**
  15003. * Converts the first character of `string` to lower case.
  15004. *
  15005. * @param string The string to convert.
  15006. * @return Returns the converted string.
  15007. */
  15008. lowerFirst(string?: string): string;
  15009. }
  15010. interface LoDashImplicitWrapper<T> {
  15011. /**
  15012. * @see _.lowerFirst
  15013. */
  15014. lowerFirst(): string;
  15015. }
  15016. interface LoDashExplicitWrapper<T> {
  15017. /**
  15018. * @see _.lowerFirst
  15019. */
  15020. lowerFirst(): LoDashExplicitWrapper<string>;
  15021. }
  15022. // _.pad
  15023. interface LoDashStatic {
  15024. /**
  15025. * Pads string on the left and right sides if its shorter than length. Padding characters are truncated if
  15026. * they cant be evenly divided by length.
  15027. *
  15028. * @param string The string to pad.
  15029. * @param length The padding length.
  15030. * @param chars The string used as padding.
  15031. * @return Returns the padded string.
  15032. */
  15033. pad(
  15034. string?: string,
  15035. length?: number,
  15036. chars?: string
  15037. ): string;
  15038. }
  15039. interface LoDashImplicitWrapper<T> {
  15040. /**
  15041. * @see _.pad
  15042. */
  15043. pad(
  15044. length?: number,
  15045. chars?: string
  15046. ): string;
  15047. }
  15048. interface LoDashExplicitWrapper<T> {
  15049. /**
  15050. * @see _.pad
  15051. */
  15052. pad(
  15053. length?: number,
  15054. chars?: string
  15055. ): LoDashExplicitWrapper<string>;
  15056. }
  15057. // _.padEnd
  15058. interface LoDashStatic {
  15059. /**
  15060. * Pads string on the right side if its shorter than length. Padding characters are truncated if they exceed
  15061. * length.
  15062. *
  15063. * @param string The string to pad.
  15064. * @param length The padding length.
  15065. * @param chars The string used as padding.
  15066. * @return Returns the padded string.
  15067. */
  15068. padEnd(
  15069. string?: string,
  15070. length?: number,
  15071. chars?: string
  15072. ): string;
  15073. }
  15074. interface LoDashImplicitWrapper<T> {
  15075. /**
  15076. * @see _.padEnd
  15077. */
  15078. padEnd(
  15079. length?: number,
  15080. chars?: string
  15081. ): string;
  15082. }
  15083. interface LoDashExplicitWrapper<T> {
  15084. /**
  15085. * @see _.padEnd
  15086. */
  15087. padEnd(
  15088. length?: number,
  15089. chars?: string
  15090. ): LoDashExplicitWrapper<string>;
  15091. }
  15092. // _.padStart
  15093. interface LoDashStatic {
  15094. /**
  15095. * Pads string on the left side if its shorter than length. Padding characters are truncated if they exceed
  15096. * length.
  15097. *
  15098. * @param string The string to pad.
  15099. * @param length The padding length.
  15100. * @param chars The string used as padding.
  15101. * @return Returns the padded string.
  15102. */
  15103. padStart(
  15104. string?: string,
  15105. length?: number,
  15106. chars?: string
  15107. ): string;
  15108. }
  15109. interface LoDashImplicitWrapper<T> {
  15110. /**
  15111. * @see _.padStart
  15112. */
  15113. padStart(
  15114. length?: number,
  15115. chars?: string
  15116. ): string;
  15117. }
  15118. interface LoDashExplicitWrapper<T> {
  15119. /**
  15120. * @see _.padStart
  15121. */
  15122. padStart(
  15123. length?: number,
  15124. chars?: string
  15125. ): LoDashExplicitWrapper<string>;
  15126. }
  15127. // _.parseInt
  15128. interface LoDashStatic {
  15129. /**
  15130. * Converts string to an integer of the specified radix. If radix is undefined or 0, a radix of 10 is used
  15131. * unless value is a hexadecimal, in which case a radix of 16 is used.
  15132. *
  15133. * Note: This method aligns with the ES5 implementation of parseInt.
  15134. *
  15135. * @param string The string to convert.
  15136. * @param radix The radix to interpret value by.
  15137. * @return Returns the converted integer.
  15138. */
  15139. parseInt(
  15140. string: string,
  15141. radix?: number
  15142. ): number;
  15143. }
  15144. interface LoDashImplicitWrapper<T> {
  15145. /**
  15146. * @see _.parseInt
  15147. */
  15148. parseInt(radix?: number): number;
  15149. }
  15150. interface LoDashExplicitWrapper<T> {
  15151. /**
  15152. * @see _.parseInt
  15153. */
  15154. parseInt(radix?: number): LoDashExplicitWrapper<number>;
  15155. }
  15156. // _.repeat
  15157. interface LoDashStatic {
  15158. /**
  15159. * Repeats the given string n times.
  15160. *
  15161. * @param string The string to repeat.
  15162. * @param n The number of times to repeat the string.
  15163. * @return Returns the repeated string.
  15164. */
  15165. repeat(
  15166. string?: string,
  15167. n?: number
  15168. ): string;
  15169. }
  15170. interface LoDashImplicitWrapper<T> {
  15171. /**
  15172. * @see _.repeat
  15173. */
  15174. repeat(n?: number): string;
  15175. }
  15176. interface LoDashExplicitWrapper<T> {
  15177. /**
  15178. * @see _.repeat
  15179. */
  15180. repeat(n?: number): LoDashExplicitWrapper<string>;
  15181. }
  15182. // _.replace
  15183. interface LoDashStatic {
  15184. /**
  15185. * Replaces matches for pattern in string with replacement.
  15186. *
  15187. * Note: This method is based on String#replace.
  15188. *
  15189. * @param string
  15190. * @param pattern
  15191. * @param replacement
  15192. * @return Returns the modified string.
  15193. */
  15194. replace(
  15195. string: string,
  15196. pattern: RegExp | string,
  15197. replacement: Function | string
  15198. ): string;
  15199. /**
  15200. * @see _.replace
  15201. */
  15202. replace(
  15203. pattern?: RegExp | string,
  15204. replacement?: Function | string
  15205. ): string;
  15206. }
  15207. interface LoDashImplicitWrapper<T> {
  15208. /**
  15209. * @see _.replace
  15210. */
  15211. replace(
  15212. pattern?: RegExp | string,
  15213. replacement?: Function | string
  15214. ): string;
  15215. /**
  15216. * @see _.replace
  15217. */
  15218. replace(
  15219. replacement?: Function | string
  15220. ): string;
  15221. }
  15222. interface LoDashImplicitObjectWrapper<T> {
  15223. /**
  15224. * @see _.replace
  15225. */
  15226. replace(
  15227. pattern?: RegExp | string,
  15228. replacement?: Function | string
  15229. ): string;
  15230. /**
  15231. * @see _.replace
  15232. */
  15233. replace(
  15234. replacement?: Function | string
  15235. ): string;
  15236. }
  15237. interface LoDashExplicitWrapper<T> {
  15238. /**
  15239. * @see _.replace
  15240. */
  15241. replace(
  15242. pattern?: RegExp | string,
  15243. replacement?: Function | string
  15244. ): LoDashExplicitWrapper<string>;
  15245. /**
  15246. * @see _.replace
  15247. */
  15248. replace(
  15249. replacement?: Function | string
  15250. ): LoDashExplicitWrapper<string>;
  15251. }
  15252. interface LoDashExplicitObjectWrapper<T> {
  15253. /**
  15254. * @see _.replace
  15255. */
  15256. replace(
  15257. pattern?: RegExp | string,
  15258. replacement?: Function | string
  15259. ): LoDashExplicitWrapper<string>;
  15260. /**
  15261. * @see _.replace
  15262. */
  15263. replace(
  15264. replacement?: Function | string
  15265. ): LoDashExplicitWrapper<string>;
  15266. }
  15267. // _.snakeCase
  15268. interface LoDashStatic {
  15269. /**
  15270. * Converts string to snake case.
  15271. *
  15272. * @param string The string to convert.
  15273. * @return Returns the snake cased string.
  15274. */
  15275. snakeCase(string?: string): string;
  15276. }
  15277. interface LoDashImplicitWrapper<T> {
  15278. /**
  15279. * @see _.snakeCase
  15280. */
  15281. snakeCase(): string;
  15282. }
  15283. interface LoDashExplicitWrapper<T> {
  15284. /**
  15285. * @see _.snakeCase
  15286. */
  15287. snakeCase(): LoDashExplicitWrapper<string>;
  15288. }
  15289. // _.split
  15290. interface LoDashStatic {
  15291. /**
  15292. * Splits string by separator.
  15293. *
  15294. * Note: This method is based on String#split.
  15295. *
  15296. * @param string
  15297. * @param separator
  15298. * @param limit
  15299. * @return Returns the new array of string segments.
  15300. */
  15301. split(
  15302. string: string,
  15303. separator?: RegExp | string,
  15304. limit?: number
  15305. ): string[];
  15306. }
  15307. interface LoDashImplicitWrapper<T> {
  15308. /**
  15309. * @see _.split
  15310. */
  15311. split(
  15312. separator?: RegExp | string,
  15313. limit?: number
  15314. ): LoDashImplicitArrayWrapper<string>;
  15315. }
  15316. interface LoDashExplicitWrapper<T> {
  15317. /**
  15318. * @see _.split
  15319. */
  15320. split(
  15321. separator?: RegExp | string,
  15322. limit?: number
  15323. ): LoDashExplicitArrayWrapper<string>;
  15324. }
  15325. // _.startCase
  15326. interface LoDashStatic {
  15327. /**
  15328. * Converts string to start case.
  15329. *
  15330. * @param string The string to convert.
  15331. * @return Returns the start cased string.
  15332. */
  15333. startCase(string?: string): string;
  15334. }
  15335. interface LoDashImplicitWrapper<T> {
  15336. /**
  15337. * @see _.startCase
  15338. */
  15339. startCase(): string;
  15340. }
  15341. interface LoDashExplicitWrapper<T> {
  15342. /**
  15343. * @see _.startCase
  15344. */
  15345. startCase(): LoDashExplicitWrapper<string>;
  15346. }
  15347. // _.startsWith
  15348. interface LoDashStatic {
  15349. /**
  15350. * Checks if string starts with the given target string.
  15351. *
  15352. * @param string The string to search.
  15353. * @param target The string to search for.
  15354. * @param position The position to search from.
  15355. * @return Returns true if string starts with target, else false.
  15356. */
  15357. startsWith(
  15358. string?: string,
  15359. target?: string,
  15360. position?: number
  15361. ): boolean;
  15362. }
  15363. interface LoDashImplicitWrapper<T> {
  15364. /**
  15365. * @see _.startsWith
  15366. */
  15367. startsWith(
  15368. target?: string,
  15369. position?: number
  15370. ): boolean;
  15371. }
  15372. interface LoDashExplicitWrapper<T> {
  15373. /**
  15374. * @see _.startsWith
  15375. */
  15376. startsWith(
  15377. target?: string,
  15378. position?: number
  15379. ): LoDashExplicitWrapper<boolean>;
  15380. }
  15381. // _.template
  15382. interface TemplateOptions extends TemplateSettings {
  15383. /**
  15384. * The sourceURL of the template's compiled source.
  15385. */
  15386. sourceURL?: string;
  15387. }
  15388. interface TemplateExecutor {
  15389. (data?: Object): string;
  15390. source: string;
  15391. }
  15392. interface LoDashStatic {
  15393. /**
  15394. * Creates a compiled template function that can interpolate data properties in "interpolate" delimiters,
  15395. * HTML-escape interpolated data properties in "escape" delimiters, and execute JavaScript in "evaluate"
  15396. * delimiters. Data properties may be accessed as free variables in the template. If a setting object is
  15397. * provided it takes precedence over _.templateSettings values.
  15398. *
  15399. * Note: In the development build _.template utilizes
  15400. * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl) for easier
  15401. * debugging.
  15402. *
  15403. * For more information on precompiling templates see
  15404. * [lodash's custom builds documentation](https://lodash.com/custom-builds).
  15405. *
  15406. * For more information on Chrome extension sandboxes see
  15407. * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval).
  15408. *
  15409. * @param string The template string.
  15410. * @param options The options object.
  15411. * @param options.escape The HTML "escape" delimiter.
  15412. * @param options.evaluate The "evaluate" delimiter.
  15413. * @param options.imports An object to import into the template as free variables.
  15414. * @param options.interpolate The "interpolate" delimiter.
  15415. * @param options.sourceURL The sourceURL of the template's compiled source.
  15416. * @param options.variable The data object variable name.
  15417. * @return Returns the compiled template function.
  15418. */
  15419. template(
  15420. string: string,
  15421. options?: TemplateOptions
  15422. ): TemplateExecutor;
  15423. }
  15424. interface LoDashImplicitWrapper<T> {
  15425. /**
  15426. * @see _.template
  15427. */
  15428. template(options?: TemplateOptions): TemplateExecutor;
  15429. }
  15430. interface LoDashExplicitWrapper<T> {
  15431. /**
  15432. * @see _.template
  15433. */
  15434. template(options?: TemplateOptions): LoDashExplicitObjectWrapper<TemplateExecutor>;
  15435. }
  15436. // _.toLower
  15437. interface LoDashStatic {
  15438. /**
  15439. * Converts `string`, as a whole, to lower case.
  15440. *
  15441. * @param string The string to convert.
  15442. * @return Returns the lower cased string.
  15443. */
  15444. toLower(string?: string): string;
  15445. }
  15446. interface LoDashImplicitWrapper<T> {
  15447. /**
  15448. * @see _.toLower
  15449. */
  15450. toLower(): string;
  15451. }
  15452. interface LoDashExplicitWrapper<T> {
  15453. /**
  15454. * @see _.toLower
  15455. */
  15456. toLower(): LoDashExplicitWrapper<string>;
  15457. }
  15458. // _.toUpper
  15459. interface LoDashStatic {
  15460. /**
  15461. * Converts `string`, as a whole, to upper case.
  15462. *
  15463. * @param string The string to convert.
  15464. * @return Returns the upper cased string.
  15465. */
  15466. toUpper(string?: string): string;
  15467. }
  15468. interface LoDashImplicitWrapper<T> {
  15469. /**
  15470. * @see _.toUpper
  15471. */
  15472. toUpper(): string;
  15473. }
  15474. interface LoDashExplicitWrapper<T> {
  15475. /**
  15476. * @see _.toUpper
  15477. */
  15478. toUpper(): LoDashExplicitWrapper<string>;
  15479. }
  15480. // _.trim
  15481. interface LoDashStatic {
  15482. /**
  15483. * Removes leading and trailing whitespace or specified characters from string.
  15484. *
  15485. * @param string The string to trim.
  15486. * @param chars The characters to trim.
  15487. * @return Returns the trimmed string.
  15488. */
  15489. trim(
  15490. string?: string,
  15491. chars?: string
  15492. ): string;
  15493. }
  15494. interface LoDashImplicitWrapper<T> {
  15495. /**
  15496. * @see _.trim
  15497. */
  15498. trim(chars?: string): string;
  15499. }
  15500. interface LoDashExplicitWrapper<T> {
  15501. /**
  15502. * @see _.trim
  15503. */
  15504. trim(chars?: string): LoDashExplicitWrapper<string>;
  15505. }
  15506. // _.trimEnd
  15507. interface LoDashStatic {
  15508. /**
  15509. * Removes trailing whitespace or specified characters from string.
  15510. *
  15511. * @param string The string to trim.
  15512. * @param chars The characters to trim.
  15513. * @return Returns the trimmed string.
  15514. */
  15515. trimEnd(
  15516. string?: string,
  15517. chars?: string
  15518. ): string;
  15519. }
  15520. interface LoDashImplicitWrapper<T> {
  15521. /**
  15522. * @see _.trimEnd
  15523. */
  15524. trimEnd(chars?: string): string;
  15525. }
  15526. interface LoDashExplicitWrapper<T> {
  15527. /**
  15528. * @see _.trimEnd
  15529. */
  15530. trimEnd(chars?: string): LoDashExplicitWrapper<string>;
  15531. }
  15532. // _.trimStart
  15533. interface LoDashStatic {
  15534. /**
  15535. * Removes leading whitespace or specified characters from string.
  15536. *
  15537. * @param string The string to trim.
  15538. * @param chars The characters to trim.
  15539. * @return Returns the trimmed string.
  15540. */
  15541. trimStart(
  15542. string?: string,
  15543. chars?: string
  15544. ): string;
  15545. }
  15546. interface LoDashImplicitWrapper<T> {
  15547. /**
  15548. * @see _.trimStart
  15549. */
  15550. trimStart(chars?: string): string;
  15551. }
  15552. interface LoDashExplicitWrapper<T> {
  15553. /**
  15554. * @see _.trimStart
  15555. */
  15556. trimStart(chars?: string): LoDashExplicitWrapper<string>;
  15557. }
  15558. // _.truncate
  15559. interface TruncateOptions {
  15560. /** The maximum string length. */
  15561. length?: number;
  15562. /** The string to indicate text is omitted. */
  15563. omission?: string;
  15564. /** The separator pattern to truncate to. */
  15565. separator?: string | RegExp;
  15566. }
  15567. interface LoDashStatic {
  15568. /**
  15569. * Truncates string if its longer than the given maximum string length. The last characters of the truncated
  15570. * string are replaced with the omission string which defaults to "…".
  15571. *
  15572. * @param string The string to truncate.
  15573. * @param options The options object or maximum string length.
  15574. * @return Returns the truncated string.
  15575. */
  15576. truncate(
  15577. string?: string,
  15578. options?: TruncateOptions
  15579. ): string;
  15580. }
  15581. interface LoDashImplicitWrapper<T> {
  15582. /**
  15583. * @see _.truncate
  15584. */
  15585. truncate(options?: TruncateOptions): string;
  15586. }
  15587. interface LoDashExplicitWrapper<T> {
  15588. /**
  15589. * @see _.truncate
  15590. */
  15591. truncate(options?: TruncateOptions): LoDashExplicitWrapper<string>;
  15592. }
  15593. // _.unescape
  15594. interface LoDashStatic {
  15595. /**
  15596. * The inverse of _.escape; this method converts the HTML entities &amp;, &lt;, &gt;, &quot;, &#39;, and &#96;
  15597. * in string to their corresponding characters.
  15598. *
  15599. * Note: No other HTML entities are unescaped. To unescape additional HTML entities use a third-party library
  15600. * like he.
  15601. *
  15602. * @param string The string to unescape.
  15603. * @return Returns the unescaped string.
  15604. */
  15605. unescape(string?: string): string;
  15606. }
  15607. interface LoDashImplicitWrapper<T> {
  15608. /**
  15609. * @see _.unescape
  15610. */
  15611. unescape(): string;
  15612. }
  15613. interface LoDashExplicitWrapper<T> {
  15614. /**
  15615. * @see _.unescape
  15616. */
  15617. unescape(): LoDashExplicitWrapper<string>;
  15618. }
  15619. // _.upperCase
  15620. interface LoDashStatic {
  15621. /**
  15622. * Converts `string`, as space separated words, to upper case.
  15623. *
  15624. * @param string The string to convert.
  15625. * @return Returns the upper cased string.
  15626. */
  15627. upperCase(string?: string): string;
  15628. }
  15629. interface LoDashImplicitWrapper<T> {
  15630. /**
  15631. * @see _.upperCase
  15632. */
  15633. upperCase(): string;
  15634. }
  15635. interface LoDashExplicitWrapper<T> {
  15636. /**
  15637. * @see _.upperCase
  15638. */
  15639. upperCase(): LoDashExplicitWrapper<string>;
  15640. }
  15641. // _.upperFirst
  15642. interface LoDashStatic {
  15643. /**
  15644. * Converts the first character of `string` to upper case.
  15645. *
  15646. * @param string The string to convert.
  15647. * @return Returns the converted string.
  15648. */
  15649. upperFirst(string?: string): string;
  15650. }
  15651. interface LoDashImplicitWrapper<T> {
  15652. /**
  15653. * @see _.upperFirst
  15654. */
  15655. upperFirst(): string;
  15656. }
  15657. interface LoDashExplicitWrapper<T> {
  15658. /**
  15659. * @see _.upperFirst
  15660. */
  15661. upperFirst(): LoDashExplicitWrapper<string>;
  15662. }
  15663. // _.words
  15664. interface LoDashStatic {
  15665. /**
  15666. * Splits `string` into an array of its words.
  15667. *
  15668. * @param string The string to inspect.
  15669. * @param pattern The pattern to match words.
  15670. * @return Returns the words of `string`.
  15671. */
  15672. words(
  15673. string?: string,
  15674. pattern?: string | RegExp
  15675. ): string[];
  15676. }
  15677. interface LoDashImplicitWrapper<T> {
  15678. /**
  15679. * @see _.words
  15680. */
  15681. words(pattern?: string | RegExp): string[];
  15682. }
  15683. interface LoDashExplicitWrapper<T> {
  15684. /**
  15685. * @see _.words
  15686. */
  15687. words(pattern?: string | RegExp): LoDashExplicitArrayWrapper<string>;
  15688. }
  15689. /***********
  15690. * Utility *
  15691. **********/
  15692. // _.attempt
  15693. interface LoDashStatic {
  15694. /**
  15695. * Attempts to invoke func, returning either the result or the caught error object. Any additional arguments
  15696. * are provided to func when its invoked.
  15697. *
  15698. * @param func The function to attempt.
  15699. * @return Returns the func result or error object.
  15700. */
  15701. attempt<TResult>(func: (...args: any[]) => TResult, ...args: any[]): TResult | Error;
  15702. }
  15703. interface LoDashImplicitObjectWrapper<T> {
  15704. /**
  15705. * @see _.attempt
  15706. */
  15707. attempt<TResult>(...args: any[]): TResult | Error;
  15708. }
  15709. interface LoDashExplicitObjectWrapper<T> {
  15710. /**
  15711. * @see _.attempt
  15712. */
  15713. attempt<TResult>(...args: any[]): LoDashExplicitObjectWrapper<TResult | Error>;
  15714. }
  15715. // _.constant
  15716. interface LoDashStatic {
  15717. /**
  15718. * Creates a function that returns value.
  15719. *
  15720. * @param value The value to return from the new function.
  15721. * @return Returns the new function.
  15722. */
  15723. constant<T>(value: T): () => T;
  15724. }
  15725. interface LoDashImplicitWrapperBase<T, TWrapper> {
  15726. /**
  15727. * @see _.constant
  15728. */
  15729. constant<TResult>(): LoDashImplicitObjectWrapper<() => TResult>;
  15730. }
  15731. interface LoDashExplicitWrapperBase<T, TWrapper> {
  15732. /**
  15733. * @see _.constant
  15734. */
  15735. constant<TResult>(): LoDashExplicitObjectWrapper<() => TResult>;
  15736. }
  15737. // _.identity
  15738. interface LoDashStatic {
  15739. /**
  15740. * This method returns the first argument provided to it.
  15741. * @param value Any value.
  15742. * @return Returns value.
  15743. */
  15744. identity<T>(value?: T): T;
  15745. }
  15746. interface LoDashImplicitWrapper<T> {
  15747. /**
  15748. * @see _.identity
  15749. */
  15750. identity(): T;
  15751. }
  15752. interface LoDashImplicitArrayWrapper<T> {
  15753. /**
  15754. * @see _.identity
  15755. */
  15756. identity(): T[];
  15757. }
  15758. interface LoDashImplicitObjectWrapper<T> {
  15759. /**
  15760. * @see _.identity
  15761. */
  15762. identity(): T;
  15763. }
  15764. // _.iteratee
  15765. interface LoDashStatic {
  15766. /**
  15767. * Creates a function that invokes `func` with the arguments of the created
  15768. * function. If `func` is a property name the created callback returns the
  15769. * property value for a given element. If `func` is an object the created
  15770. * callback returns `true` for elements that contain the equivalent object properties, otherwise it returns `false`.
  15771. *
  15772. * @static
  15773. * @memberOf _
  15774. * @category Util
  15775. * @param {*} [func=_.identity] The value to convert to a callback.
  15776. * @returns {Function} Returns the callback.
  15777. * @example
  15778. *
  15779. * var users = [
  15780. * { 'user': 'barney', 'age': 36 },
  15781. * { 'user': 'fred', 'age': 40 }
  15782. * ];
  15783. *
  15784. * // create custom iteratee shorthands
  15785. * _.iteratee = _.wrap(_.iteratee, function(callback, func) {
  15786. * var p = /^(\S+)\s*([<>])\s*(\S+)$/.exec(func);
  15787. * return !p ? callback(func) : function(object) {
  15788. * return (p[2] == '>' ? object[p[1]] > p[3] : object[p[1]] < p[3]);
  15789. * };
  15790. * });
  15791. *
  15792. * _.filter(users, 'age > 36');
  15793. * // => [{ 'user': 'fred', 'age': 40 }]
  15794. */
  15795. iteratee<TResult>(
  15796. func: Function,
  15797. thisArg?: any
  15798. ): (...args: any[]) => TResult;
  15799. /**
  15800. * @see _.iteratee
  15801. */
  15802. iteratee<TResult>(
  15803. func: string,
  15804. thisArg?: any
  15805. ): (object: any) => TResult;
  15806. /**
  15807. * @see _.iteratee
  15808. */
  15809. iteratee(
  15810. func: Object,
  15811. thisArg?: any
  15812. ): (object: any) => boolean;
  15813. /**
  15814. * @see _.iteratee
  15815. */
  15816. iteratee<TResult>(): (value: TResult) => TResult;
  15817. }
  15818. interface LoDashImplicitWrapper<T> {
  15819. /**
  15820. * @see _.iteratee
  15821. */
  15822. iteratee<TResult>(thisArg?: any): LoDashImplicitObjectWrapper<(object: any) => TResult>;
  15823. }
  15824. interface LoDashImplicitObjectWrapper<T> {
  15825. /**
  15826. * @see _.iteratee
  15827. */
  15828. iteratee(thisArg?: any): LoDashImplicitObjectWrapper<(object: any) => boolean>;
  15829. /**
  15830. * @see _.iteratee
  15831. */
  15832. iteratee<TResult>(thisArg?: any): LoDashImplicitObjectWrapper<(...args: any[]) => TResult>;
  15833. }
  15834. interface LoDashExplicitWrapper<T> {
  15835. /**
  15836. * @see _.iteratee
  15837. */
  15838. iteratee<TResult>(thisArg?: any): LoDashExplicitObjectWrapper<(object: any) => TResult>;
  15839. }
  15840. interface LoDashExplicitObjectWrapper<T> {
  15841. /**
  15842. * @see _.iteratee
  15843. */
  15844. iteratee(thisArg?: any): LoDashExplicitObjectWrapper<(object: any) => boolean>;
  15845. /**
  15846. * @see _.iteratee
  15847. */
  15848. iteratee<TResult>(thisArg?: any): LoDashExplicitObjectWrapper<(...args: any[]) => TResult>;
  15849. }
  15850. // _.matches
  15851. interface LoDashStatic {
  15852. /**
  15853. * Creates a function that performs a deep comparison between a given object and source, returning true if the
  15854. * given object has equivalent property values, else false.
  15855. *
  15856. * Note: This method supports comparing arrays, booleans, Date objects, numbers, Object objects, regexes, and
  15857. * strings. Objects are compared by their own, not inherited, enumerable properties. For comparing a single own
  15858. * or inherited property value see _.matchesProperty.
  15859. *
  15860. * @param source The object of property values to match.
  15861. * @return Returns the new function.
  15862. */
  15863. matches<T>(source: T): (value: any) => boolean;
  15864. /**
  15865. * @see _.matches
  15866. */
  15867. matches<T, V>(source: T): (value: V) => boolean;
  15868. }
  15869. interface LoDashImplicitWrapperBase<T, TWrapper> {
  15870. /**
  15871. * @see _.matches
  15872. */
  15873. matches<V>(): LoDashImplicitObjectWrapper<(value: V) => boolean>;
  15874. }
  15875. interface LoDashExplicitWrapperBase<T, TWrapper> {
  15876. /**
  15877. * @see _.matches
  15878. */
  15879. matches<V>(): LoDashExplicitObjectWrapper<(value: V) => boolean>;
  15880. }
  15881. // _.matchesProperty
  15882. interface LoDashStatic {
  15883. /**
  15884. * Creates a function that compares the property value of path on a given object to value.
  15885. *
  15886. * Note: This method supports comparing arrays, booleans, Date objects, numbers, Object objects, regexes, and
  15887. * strings. Objects are compared by their own, not inherited, enumerable properties.
  15888. *
  15889. * @param path The path of the property to get.
  15890. * @param srcValue The value to match.
  15891. * @return Returns the new function.
  15892. */
  15893. matchesProperty<T>(
  15894. path: StringRepresentable | StringRepresentable[],
  15895. srcValue: T
  15896. ): (value: any) => boolean;
  15897. /**
  15898. * @see _.matchesProperty
  15899. */
  15900. matchesProperty<T, V>(
  15901. path: StringRepresentable | StringRepresentable[],
  15902. srcValue: T
  15903. ): (value: V) => boolean;
  15904. }
  15905. interface LoDashImplicitWrapperBase<T, TWrapper> {
  15906. /**
  15907. * @see _.matchesProperty
  15908. */
  15909. matchesProperty<SrcValue>(
  15910. srcValue: SrcValue
  15911. ): LoDashImplicitObjectWrapper<(value: any) => boolean>;
  15912. /**
  15913. * @see _.matchesProperty
  15914. */
  15915. matchesProperty<SrcValue, Value>(
  15916. srcValue: SrcValue
  15917. ): LoDashImplicitObjectWrapper<(value: Value) => boolean>;
  15918. }
  15919. interface LoDashExplicitWrapperBase<T, TWrapper> {
  15920. /**
  15921. * @see _.matchesProperty
  15922. */
  15923. matchesProperty<SrcValue>(
  15924. srcValue: SrcValue
  15925. ): LoDashExplicitObjectWrapper<(value: any) => boolean>;
  15926. /**
  15927. * @see _.matchesProperty
  15928. */
  15929. matchesProperty<SrcValue, Value>(
  15930. srcValue: SrcValue
  15931. ): LoDashExplicitObjectWrapper<(value: Value) => boolean>;
  15932. }
  15933. // _.method
  15934. interface LoDashStatic {
  15935. /**
  15936. * Creates a function that invokes the method at path on a given object. Any additional arguments are provided
  15937. * to the invoked method.
  15938. *
  15939. * @param path The path of the method to invoke.
  15940. * @param args The arguments to invoke the method with.
  15941. * @return Returns the new function.
  15942. */
  15943. method<TObject, TResult>(
  15944. path: string | StringRepresentable[],
  15945. ...args: any[]
  15946. ): (object: TObject) => TResult;
  15947. /**
  15948. * @see _.method
  15949. */
  15950. method<TResult>(
  15951. path: string | StringRepresentable[],
  15952. ...args: any[]
  15953. ): (object: any) => TResult;
  15954. }
  15955. interface LoDashImplicitWrapper<T> {
  15956. /**
  15957. * @see _.method
  15958. */
  15959. method<TObject, TResult>(...args: any[]): LoDashImplicitObjectWrapper<(object: TObject) => TResult>;
  15960. /**
  15961. * @see _.method
  15962. */
  15963. method<TResult>(...args: any[]): LoDashImplicitObjectWrapper<(object: any) => TResult>;
  15964. }
  15965. interface LoDashImplicitArrayWrapper<T> {
  15966. /**
  15967. * @see _.method
  15968. */
  15969. method<TObject, TResult>(...args: any[]): LoDashImplicitObjectWrapper<(object: TObject) => TResult>;
  15970. /**
  15971. * @see _.method
  15972. */
  15973. method<TResult>(...args: any[]): LoDashImplicitObjectWrapper<(object: any) => TResult>;
  15974. }
  15975. interface LoDashExplicitWrapper<T> {
  15976. /**
  15977. * @see _.method
  15978. */
  15979. method<TObject, TResult>(...args: any[]): LoDashExplicitObjectWrapper<(object: TObject) => TResult>;
  15980. /**
  15981. * @see _.method
  15982. */
  15983. method<TResult>(...args: any[]): LoDashExplicitObjectWrapper<(object: any) => TResult>;
  15984. }
  15985. interface LoDashExplicitArrayWrapper<T> {
  15986. /**
  15987. * @see _.method
  15988. */
  15989. method<TObject, TResult>(...args: any[]): LoDashExplicitObjectWrapper<(object: TObject) => TResult>;
  15990. /**
  15991. * @see _.method
  15992. */
  15993. method<TResult>(...args: any[]): LoDashExplicitObjectWrapper<(object: any) => TResult>;
  15994. }
  15995. // _.methodOf
  15996. interface LoDashStatic {
  15997. /**
  15998. * The opposite of _.method; this method creates a function that invokes the method at a given path on object.
  15999. * Any additional arguments are provided to the invoked method.
  16000. *
  16001. * @param object The object to query.
  16002. * @param args The arguments to invoke the method with.
  16003. * @return Returns the new function.
  16004. */
  16005. methodOf<TObject extends {}, TResult>(
  16006. object: TObject,
  16007. ...args: any[]
  16008. ): (path: StringRepresentable | StringRepresentable[]) => TResult;
  16009. /**
  16010. * @see _.methodOf
  16011. */
  16012. methodOf<TResult>(
  16013. object: {},
  16014. ...args: any[]
  16015. ): (path: StringRepresentable | StringRepresentable[]) => TResult;
  16016. }
  16017. interface LoDashImplicitObjectWrapper<T> {
  16018. /**
  16019. * @see _.methodOf
  16020. */
  16021. methodOf<TResult>(
  16022. ...args: any[]
  16023. ): LoDashImplicitObjectWrapper<(path: StringRepresentable | StringRepresentable[]) => TResult>;
  16024. }
  16025. interface LoDashExplicitObjectWrapper<T> {
  16026. /**
  16027. * @see _.methodOf
  16028. */
  16029. methodOf<TResult>(
  16030. ...args: any[]
  16031. ): LoDashExplicitObjectWrapper<(path: StringRepresentable | StringRepresentable[]) => TResult>;
  16032. }
  16033. // _.mixin
  16034. interface MixinOptions {
  16035. chain?: boolean;
  16036. }
  16037. interface LoDashStatic {
  16038. /**
  16039. * Adds all own enumerable function properties of a source object to the destination object. If object is a
  16040. * function then methods are added to its prototype as well.
  16041. *
  16042. * Note: Use _.runInContext to create a pristine lodash function to avoid conflicts caused by modifying
  16043. * the original.
  16044. *
  16045. * @param object The destination object.
  16046. * @param source The object of functions to add.
  16047. * @param options The options object.
  16048. * @param options.chain Specify whether the functions added are chainable.
  16049. * @return Returns object.
  16050. */
  16051. mixin<TResult, TObject>(
  16052. object: TObject,
  16053. source: Dictionary<Function>,
  16054. options?: MixinOptions
  16055. ): TResult;
  16056. /**
  16057. * @see _.mixin
  16058. */
  16059. mixin<TResult>(
  16060. source: Dictionary<Function>,
  16061. options?: MixinOptions
  16062. ): TResult;
  16063. }
  16064. interface LoDashImplicitObjectWrapper<T> {
  16065. /**
  16066. * @see _.mixin
  16067. */
  16068. mixin<TResult>(
  16069. source: Dictionary<Function>,
  16070. options?: MixinOptions
  16071. ): LoDashImplicitObjectWrapper<TResult>;
  16072. /**
  16073. * @see _.mixin
  16074. */
  16075. mixin<TResult>(
  16076. options?: MixinOptions
  16077. ): LoDashImplicitObjectWrapper<TResult>;
  16078. }
  16079. interface LoDashExplicitObjectWrapper<T> {
  16080. /**
  16081. * @see _.mixin
  16082. */
  16083. mixin<TResult>(
  16084. source: Dictionary<Function>,
  16085. options?: MixinOptions
  16086. ): LoDashExplicitObjectWrapper<TResult>;
  16087. /**
  16088. * @see _.mixin
  16089. */
  16090. mixin<TResult>(
  16091. options?: MixinOptions
  16092. ): LoDashExplicitObjectWrapper<TResult>;
  16093. }
  16094. // _.noConflict
  16095. interface LoDashStatic {
  16096. /**
  16097. * Reverts the _ variable to its previous value and returns a reference to the lodash function.
  16098. *
  16099. * @return Returns the lodash function.
  16100. */
  16101. noConflict(): typeof _;
  16102. }
  16103. interface LoDashImplicitWrapperBase<T, TWrapper> {
  16104. /**
  16105. * @see _.noConflict
  16106. */
  16107. noConflict(): typeof _;
  16108. }
  16109. // _.noop
  16110. interface LoDashStatic {
  16111. /**
  16112. * A no-operation function that returns undefined regardless of the arguments it receives.
  16113. *
  16114. * @return undefined
  16115. */
  16116. noop(...args: any[]): void;
  16117. }
  16118. interface LoDashImplicitWrapperBase<T, TWrapper> {
  16119. /**
  16120. * @see _.noop
  16121. */
  16122. noop(...args: any[]): void;
  16123. }
  16124. interface LoDashExplicitWrapperBase<T, TWrapper> {
  16125. /**
  16126. * @see _.noop
  16127. */
  16128. noop(...args: any[]): _.LoDashExplicitWrapper<void>;
  16129. }
  16130. // _.nthArg
  16131. interface LoDashStatic {
  16132. /**
  16133. * Creates a function that returns its nth argument.
  16134. *
  16135. * @param n The index of the argument to return.
  16136. * @return Returns the new function.
  16137. */
  16138. nthArg<TResult extends Function>(n?: number): TResult;
  16139. }
  16140. interface LoDashImplicitWrapper<T> {
  16141. /**
  16142. * @see _.nthArg
  16143. */
  16144. nthArg<TResult extends Function>(): LoDashImplicitObjectWrapper<TResult>;
  16145. }
  16146. interface LoDashExplicitWrapper<T> {
  16147. /**
  16148. * @see _.nthArg
  16149. */
  16150. nthArg<TResult extends Function>(): LoDashExplicitObjectWrapper<TResult>;
  16151. }
  16152. // _.over
  16153. interface LoDashStatic {
  16154. /**
  16155. * Creates a function that invokes iteratees with the arguments provided to the created function and returns
  16156. * their results.
  16157. *
  16158. * @param iteratees The iteratees to invoke.
  16159. * @return Returns the new function.
  16160. */
  16161. over<TResult>(...iteratees: (Function | Function[])[]): (...args: any[]) => TResult[];
  16162. }
  16163. interface LoDashImplicitArrayWrapper<T> {
  16164. /**
  16165. * @see _.over
  16166. */
  16167. over<TResult>(...iteratees: (Function | Function[])[]): LoDashImplicitObjectWrapper<(...args: any[]) => TResult[]>;
  16168. }
  16169. interface LoDashImplicitObjectWrapper<T> {
  16170. /**
  16171. * @see _.over
  16172. */
  16173. over<TResult>(...iteratees: (Function | Function[])[]): LoDashImplicitObjectWrapper<(...args: any[]) => TResult[]>;
  16174. }
  16175. interface LoDashExplicitArrayWrapper<T> {
  16176. /**
  16177. * @see _.over
  16178. */
  16179. over<TResult>(...iteratees: (Function | Function[])[]): LoDashExplicitObjectWrapper<(...args: any[]) => TResult[]>;
  16180. }
  16181. interface LoDashExplicitObjectWrapper<T> {
  16182. /**
  16183. * @see _.over
  16184. */
  16185. over<TResult>(...iteratees: (Function | Function[])[]): LoDashExplicitObjectWrapper<(...args: any[]) => TResult[]>;
  16186. }
  16187. // _.overEvery
  16188. interface LoDashStatic {
  16189. /**
  16190. * Creates a function that checks if all of the predicates return truthy when invoked with the arguments
  16191. * provided to the created function.
  16192. *
  16193. * @param predicates The predicates to check.
  16194. * @return Returns the new function.
  16195. */
  16196. overEvery(...predicates: (Function | Function[])[]): (...args: any[]) => boolean;
  16197. }
  16198. interface LoDashImplicitArrayWrapper<T> {
  16199. /**
  16200. * @see _.overEvery
  16201. */
  16202. overEvery(...predicates: (Function | Function[])[]): LoDashImplicitObjectWrapper<(...args: any[]) => boolean>;
  16203. }
  16204. interface LoDashImplicitObjectWrapper<T> {
  16205. /**
  16206. * @see _.overEvery
  16207. */
  16208. overEvery(...predicates: (Function | Function[])[]): LoDashImplicitObjectWrapper<(...args: any[]) => boolean>;
  16209. }
  16210. interface LoDashExplicitArrayWrapper<T> {
  16211. /**
  16212. * @see _.overEvery
  16213. */
  16214. overEvery(...predicates: (Function | Function[])[]): LoDashExplicitObjectWrapper<(...args: any[]) => boolean>;
  16215. }
  16216. interface LoDashExplicitObjectWrapper<T> {
  16217. /**
  16218. * @see _.overEvery
  16219. */
  16220. overEvery(...predicates: (Function | Function[])[]): LoDashExplicitObjectWrapper<(...args: any[]) => boolean>;
  16221. }
  16222. // _.overSome
  16223. interface LoDashStatic {
  16224. /**
  16225. * Creates a function that checks if any of the predicates return truthy when invoked with the arguments
  16226. * provided to the created function.
  16227. *
  16228. * @param predicates The predicates to check.
  16229. * @return Returns the new function.
  16230. */
  16231. overSome(...predicates: (Function | Function[])[]): (...args: any[]) => boolean;
  16232. }
  16233. interface LoDashImplicitArrayWrapper<T> {
  16234. /**
  16235. * @see _.overSome
  16236. */
  16237. overSome(...predicates: (Function | Function[])[]): LoDashImplicitObjectWrapper<(...args: any[]) => boolean>;
  16238. }
  16239. interface LoDashImplicitObjectWrapper<T> {
  16240. /**
  16241. * @see _.overSome
  16242. */
  16243. overSome(...predicates: (Function | Function[])[]): LoDashImplicitObjectWrapper<(...args: any[]) => boolean>;
  16244. }
  16245. interface LoDashExplicitArrayWrapper<T> {
  16246. /**
  16247. * @see _.overSome
  16248. */
  16249. overSome(...predicates: (Function | Function[])[]): LoDashExplicitObjectWrapper<(...args: any[]) => boolean>;
  16250. }
  16251. interface LoDashExplicitObjectWrapper<T> {
  16252. /**
  16253. * @see _.overSome
  16254. */
  16255. overSome(...predicates: (Function | Function[])[]): LoDashExplicitObjectWrapper<(...args: any[]) => boolean>;
  16256. }
  16257. // _.property
  16258. interface LoDashStatic {
  16259. /**
  16260. * Creates a function that returns the property value at path on a given object.
  16261. *
  16262. * @param path The path of the property to get.
  16263. * @return Returns the new function.
  16264. */
  16265. property<TObj, TResult>(path: StringRepresentable | StringRepresentable[]): (obj: TObj) => TResult;
  16266. }
  16267. interface LoDashImplicitWrapper<T> {
  16268. /**
  16269. * @see _.property
  16270. */
  16271. property<TObj, TResult>(): LoDashImplicitObjectWrapper<(obj: TObj) => TResult>;
  16272. }
  16273. interface LoDashImplicitArrayWrapper<T> {
  16274. /**
  16275. * @see _.property
  16276. */
  16277. property<TObj, TResult>(): LoDashImplicitObjectWrapper<(obj: TObj) => TResult>;
  16278. }
  16279. interface LoDashExplicitWrapper<T> {
  16280. /**
  16281. * @see _.property
  16282. */
  16283. property<TObj, TResult>(): LoDashExplicitObjectWrapper<(obj: TObj) => TResult>;
  16284. }
  16285. interface LoDashExplicitArrayWrapper<T> {
  16286. /**
  16287. * @see _.property
  16288. */
  16289. property<TObj, TResult>(): LoDashExplicitObjectWrapper<(obj: TObj) => TResult>;
  16290. }
  16291. // _.propertyOf
  16292. interface LoDashStatic {
  16293. /**
  16294. * The opposite of _.property; this method creates a function that returns the property value at a given path
  16295. * on object.
  16296. *
  16297. * @param object The object to query.
  16298. * @return Returns the new function.
  16299. */
  16300. propertyOf<T extends {}>(object: T): (path: string | string[]) => any;
  16301. }
  16302. interface LoDashImplicitObjectWrapper<T> {
  16303. /**
  16304. * @see _.propertyOf
  16305. */
  16306. propertyOf(): LoDashImplicitObjectWrapper<(path: string | string[]) => any>;
  16307. }
  16308. interface LoDashExplicitObjectWrapper<T> {
  16309. /**
  16310. * @see _.propertyOf
  16311. */
  16312. propertyOf(): LoDashExplicitObjectWrapper<(path: string | string[]) => any>;
  16313. }
  16314. // _.range
  16315. interface LoDashStatic {
  16316. /**
  16317. * Creates an array of numbers (positive and/or negative) progressing from start up to, but not including, end.
  16318. * If end is not specified its set to start with start then set to 0. If end is less than start a zero-length
  16319. * range is created unless a negative step is specified.
  16320. *
  16321. * @param start The start of the range.
  16322. * @param end The end of the range.
  16323. * @param step The value to increment or decrement by.
  16324. * @return Returns a new range array.
  16325. */
  16326. range(
  16327. start: number,
  16328. end: number,
  16329. step?: number
  16330. ): number[];
  16331. /**
  16332. * @see _.range
  16333. */
  16334. range(
  16335. end: number,
  16336. step?: number
  16337. ): number[];
  16338. }
  16339. interface LoDashImplicitWrapper<T> {
  16340. /**
  16341. * @see _.range
  16342. */
  16343. range(
  16344. end?: number,
  16345. step?: number
  16346. ): LoDashImplicitArrayWrapper<number>;
  16347. }
  16348. interface LoDashExplicitWrapper<T> {
  16349. /**
  16350. * @see _.range
  16351. */
  16352. range(
  16353. end?: number,
  16354. step?: number
  16355. ): LoDashExplicitArrayWrapper<number>;
  16356. }
  16357. // _.rangeRight
  16358. interface LoDashStatic {
  16359. /**
  16360. * This method is like `_.range` except that it populates values in
  16361. * descending order.
  16362. *
  16363. * @static
  16364. * @memberOf _
  16365. * @category Util
  16366. * @param {number} [start=0] The start of the range.
  16367. * @param {number} end The end of the range.
  16368. * @param {number} [step=1] The value to increment or decrement by.
  16369. * @returns {Array} Returns the new array of numbers.
  16370. * @example
  16371. *
  16372. * _.rangeRight(4);
  16373. * // => [3, 2, 1, 0]
  16374. *
  16375. * _.rangeRight(-4);
  16376. * // => [-3, -2, -1, 0]
  16377. *
  16378. * _.rangeRight(1, 5);
  16379. * // => [4, 3, 2, 1]
  16380. *
  16381. * _.rangeRight(0, 20, 5);
  16382. * // => [15, 10, 5, 0]
  16383. *
  16384. * _.rangeRight(0, -4, -1);
  16385. * // => [-3, -2, -1, 0]
  16386. *
  16387. * _.rangeRight(1, 4, 0);
  16388. * // => [1, 1, 1]
  16389. *
  16390. * _.rangeRight(0);
  16391. * // => []
  16392. */
  16393. rangeRight(
  16394. start: number,
  16395. end: number,
  16396. step?: number
  16397. ): number[];
  16398. /**
  16399. * @see _.rangeRight
  16400. */
  16401. rangeRight(
  16402. end: number,
  16403. step?: number
  16404. ): number[];
  16405. }
  16406. interface LoDashImplicitWrapper<T> {
  16407. /**
  16408. * @see _.rangeRight
  16409. */
  16410. rangeRight(
  16411. end?: number,
  16412. step?: number
  16413. ): LoDashImplicitArrayWrapper<number>;
  16414. }
  16415. interface LoDashExplicitWrapper<T> {
  16416. /**
  16417. * @see _.rangeRight
  16418. */
  16419. rangeRight(
  16420. end?: number,
  16421. step?: number
  16422. ): LoDashExplicitArrayWrapper<number>;
  16423. }
  16424. // _.runInContext
  16425. interface LoDashStatic {
  16426. /**
  16427. * Create a new pristine lodash function using the given context object.
  16428. *
  16429. * @param context The context object.
  16430. * @return Returns a new lodash function.
  16431. */
  16432. runInContext(context?: Object): typeof _;
  16433. }
  16434. interface LoDashImplicitObjectWrapper<T> {
  16435. /**
  16436. * @see _.runInContext
  16437. */
  16438. runInContext(): typeof _;
  16439. }
  16440. // _.times
  16441. interface LoDashStatic {
  16442. /**
  16443. * Invokes the iteratee function n times, returning an array of the results of each invocation. The iteratee
  16444. * is invoked with one argument; (index).
  16445. *
  16446. * @param n The number of times to invoke iteratee.
  16447. * @param iteratee The function invoked per iteration.
  16448. * @return Returns the array of results.
  16449. */
  16450. times<TResult>(
  16451. n: number,
  16452. iteratee: (num: number) => TResult
  16453. ): TResult[];
  16454. /**
  16455. * @see _.times
  16456. */
  16457. times(n: number): number[];
  16458. }
  16459. interface LoDashImplicitWrapper<T> {
  16460. /**
  16461. * @see _.times
  16462. */
  16463. times<TResult>(
  16464. iteratee: (num: number) => TResult
  16465. ): TResult[];
  16466. /**
  16467. * @see _.times
  16468. */
  16469. times(): number[];
  16470. }
  16471. interface LoDashExplicitWrapper<T> {
  16472. /**
  16473. * @see _.times
  16474. */
  16475. times<TResult>(
  16476. iteratee: (num: number) => TResult
  16477. ): LoDashExplicitArrayWrapper<TResult>;
  16478. /**
  16479. * @see _.times
  16480. */
  16481. times(): LoDashExplicitArrayWrapper<number>;
  16482. }
  16483. // _.toPath
  16484. interface LoDashStatic {
  16485. /**
  16486. * Converts `value` to a property path array.
  16487. *
  16488. * @static
  16489. * @memberOf _
  16490. * @category Util
  16491. * @param {*} value The value to convert.
  16492. * @returns {Array} Returns the new property path array.
  16493. * @example
  16494. *
  16495. * _.toPath('a.b.c');
  16496. * // => ['a', 'b', 'c']
  16497. *
  16498. * _.toPath('a[0].b.c');
  16499. * // => ['a', '0', 'b', 'c']
  16500. *
  16501. * var path = ['a', 'b', 'c'],
  16502. * newPath = _.toPath(path);
  16503. *
  16504. * console.log(newPath);
  16505. * // => ['a', 'b', 'c']
  16506. *
  16507. * console.log(path === newPath);
  16508. * // => false
  16509. */
  16510. toPath(value: any): string[];
  16511. }
  16512. interface LoDashImplicitWrapperBase<T, TWrapper> {
  16513. /**
  16514. * @see _.toPath
  16515. */
  16516. toPath(): LoDashImplicitWrapper<string[]>;
  16517. }
  16518. interface LoDashExplicitWrapperBase<T, TWrapper> {
  16519. /**
  16520. * @see _.toPath
  16521. */
  16522. toPath(): LoDashExplicitWrapper<string[]>;
  16523. }
  16524. // _.uniqueId
  16525. interface LoDashStatic {
  16526. /**
  16527. * Generates a unique ID. If prefix is provided the ID is appended to it.
  16528. *
  16529. * @param prefix The value to prefix the ID with.
  16530. * @return Returns the unique ID.
  16531. */
  16532. uniqueId(prefix?: string): string;
  16533. }
  16534. interface LoDashImplicitWrapper<T> {
  16535. /**
  16536. * @see _.uniqueId
  16537. */
  16538. uniqueId(): string;
  16539. }
  16540. interface LoDashExplicitWrapper<T> {
  16541. /**
  16542. * @see _.uniqueId
  16543. */
  16544. uniqueId(): LoDashExplicitWrapper<string>;
  16545. }
  16546. interface ListIterator<T, TResult> {
  16547. (value: T, index: number, collection: List<T>): TResult;
  16548. }
  16549. interface DictionaryIterator<T, TResult> {
  16550. (value: T, key?: string, collection?: Dictionary<T>): TResult;
  16551. }
  16552. interface NumericDictionaryIterator<T, TResult> {
  16553. (value: T, key?: number, collection?: Dictionary<T>): TResult;
  16554. }
  16555. interface ObjectIterator<T, TResult> {
  16556. (element: T, key?: string, collection?: any): TResult;
  16557. }
  16558. interface StringIterator<TResult> {
  16559. (char: string, index?: number, string?: string): TResult;
  16560. }
  16561. interface MemoVoidIterator<T, TResult> {
  16562. (prev: TResult, curr: T, indexOrKey?: any, list?: T[]): void;
  16563. }
  16564. interface MemoIterator<T, TResult> {
  16565. (prev: TResult, curr: T, indexOrKey?: any, list?: T[]): TResult;
  16566. }
  16567. interface MemoVoidArrayIterator<T, TResult> {
  16568. (acc: TResult, curr: T, index?: number, arr?: T[]): void;
  16569. }
  16570. interface MemoVoidDictionaryIterator<T, TResult> {
  16571. (acc: TResult, curr: T, key?: string, dict?: Dictionary<T>): void;
  16572. }
  16573. // interface Collection<T> {}
  16574. // Common interface between Arrays and jQuery objects
  16575. interface List<T> {
  16576. [index: number]: T;
  16577. length: number;
  16578. }
  16579. interface Dictionary<T> {
  16580. [index: string]: T;
  16581. }
  16582. interface NumericDictionary<T> {
  16583. [index: number]: T;
  16584. }
  16585. interface StringRepresentable {
  16586. toString(): string;
  16587. }
  16588. interface Cancelable {
  16589. cancel(): void;
  16590. }
  16591. }
  16592. export = _;
  16593. // Backward compatibility with --target es5
  16594. interface Map<K, V> { }
  16595. }