@modern-js/utils 2.12.1-alpha.3 → 2.13.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (492) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/dist/{cjs/alias.js → alias.js} +15 -4
  3. package/dist/{cjs/analyzeProject.js → analyzeProject.js} +25 -5
  4. package/dist/{cjs/babel.js → babel.js} +16 -9
  5. package/dist/{cjs/compatRequire.js → compatRequire.js} +17 -4
  6. package/dist/compiled.d.ts +43 -0
  7. package/dist/{types/debug.d.ts → debug.d.ts} +1 -1
  8. package/dist/{cjs/emptyDir.js → emptyDir.js} +24 -4
  9. package/dist/{cjs/getEntryOptions.js → getEntryOptions.js} +15 -1
  10. package/dist/{cjs/getPackageManager.js → getPackageManager.js} +41 -19
  11. package/dist/{cjs/getPort.js → getPort.js} +24 -4
  12. package/dist/{cjs/getServerConfig.js → getServerConfig.js} +22 -2
  13. package/dist/{types/logger.d.ts → logger.d.ts} +1 -1
  14. package/dist/{cjs/logger.js → logger.js} +16 -5
  15. package/dist/{cjs/monorepo.js → monorepo.js} +15 -4
  16. package/dist/nodeEnv.js +81 -0
  17. package/dist/{cjs/path.js → path.js} +1 -1
  18. package/dist/{cjs/pathSerializer.js → pathSerializer.js} +1 -1
  19. package/dist/{cjs/react.js → react.js} +15 -4
  20. package/dist/{cjs/runtimeExports.js → runtimeExports.js} +1 -1
  21. package/dist/{cjs/universal → universal}/nestedRoutes.js +19 -2
  22. package/dist/{cjs/version.js → version.js} +40 -7
  23. package/dist/{cjs/watch.js → watch.js} +29 -9
  24. package/package.json +23 -55
  25. package/dist/cjs/nodeEnv.js +0 -55
  26. package/dist/compiled/address/index.js +0 -1
  27. package/dist/compiled/address/lib/address.d.ts +0 -28
  28. package/dist/compiled/address/package.json +0 -1
  29. package/dist/compiled/ajv/codegen.js +0 -1
  30. package/dist/compiled/ajv/index.js +0 -9
  31. package/dist/compiled/ajv/license +0 -22
  32. package/dist/compiled/ajv/package.json +0 -1
  33. package/dist/compiled/ajv/types/ajv.d.ts +0 -16
  34. package/dist/compiled/ajv/types/compile/codegen/code.d.ts +0 -40
  35. package/dist/compiled/ajv/types/compile/codegen/index.d.ts +0 -79
  36. package/dist/compiled/ajv/types/compile/codegen/scope.d.ts +0 -79
  37. package/dist/compiled/ajv/types/compile/errors.d.ts +0 -13
  38. package/dist/compiled/ajv/types/compile/index.d.ts +0 -80
  39. package/dist/compiled/ajv/types/compile/ref_error.d.ts +0 -6
  40. package/dist/compiled/ajv/types/compile/resolve.d.ts +0 -12
  41. package/dist/compiled/ajv/types/compile/rules.d.ts +0 -28
  42. package/dist/compiled/ajv/types/compile/util.d.ts +0 -40
  43. package/dist/compiled/ajv/types/compile/validate/index.d.ts +0 -42
  44. package/dist/compiled/ajv/types/compile/validate/subschema.d.ts +0 -47
  45. package/dist/compiled/ajv/types/core.d.ts +0 -173
  46. package/dist/compiled/ajv/types/runtime/validation_error.d.ts +0 -7
  47. package/dist/compiled/ajv/types/types/index.d.ts +0 -183
  48. package/dist/compiled/ajv/types/types/json-schema.d.ts +0 -124
  49. package/dist/compiled/ajv/types/types/jtd-schema.d.ts +0 -169
  50. package/dist/compiled/ajv/types/vocabularies/errors.d.ts +0 -1
  51. package/dist/compiled/ajv/uri-js.d.ts +0 -59
  52. package/dist/compiled/ajv-keywords/index.d.ts +0 -1
  53. package/dist/compiled/ajv-keywords/index.js +0 -1
  54. package/dist/compiled/ajv-keywords/license +0 -21
  55. package/dist/compiled/ajv-keywords/package.json +0 -1
  56. package/dist/compiled/better-ajv-errors/index.d.ts +0 -1
  57. package/dist/compiled/better-ajv-errors/index.js +0 -1
  58. package/dist/compiled/better-ajv-errors/license +0 -13
  59. package/dist/compiled/better-ajv-errors/package.json +0 -1
  60. package/dist/compiled/browserslist/index.d.ts +0 -178
  61. package/dist/compiled/browserslist/index.js +0 -1
  62. package/dist/compiled/browserslist/license +0 -20
  63. package/dist/compiled/browserslist/package.json +0 -1
  64. package/dist/compiled/chalk/index.d.ts +0 -415
  65. package/dist/compiled/chalk/index.js +0 -1
  66. package/dist/compiled/chalk/license +0 -9
  67. package/dist/compiled/chalk/package.json +0 -1
  68. package/dist/compiled/chokidar/anymatch/index.d.ts +0 -19
  69. package/dist/compiled/chokidar/fsevents.node +0 -0
  70. package/dist/compiled/chokidar/index.js +0 -40
  71. package/dist/compiled/chokidar/license +0 -21
  72. package/dist/compiled/chokidar/package.json +0 -1
  73. package/dist/compiled/chokidar/types/index.d.ts +0 -188
  74. package/dist/compiled/commander/index.js +0 -1
  75. package/dist/compiled/commander/license +0 -22
  76. package/dist/compiled/commander/package.json +0 -1
  77. package/dist/compiled/commander/typings/index.d.ts +0 -890
  78. package/dist/compiled/debug/index.d.ts +0 -54
  79. package/dist/compiled/debug/index.js +0 -1
  80. package/dist/compiled/debug/license +0 -20
  81. package/dist/compiled/debug/ms/index.d.ts +0 -25
  82. package/dist/compiled/debug/package.json +0 -1
  83. package/dist/compiled/dotenv/index.js +0 -1
  84. package/dist/compiled/dotenv/license +0 -23
  85. package/dist/compiled/dotenv/package.json +0 -1
  86. package/dist/compiled/dotenv/types/index.d.ts +0 -59
  87. package/dist/compiled/dotenv-expand/index.d.ts +0 -15
  88. package/dist/compiled/dotenv-expand/index.js +0 -1
  89. package/dist/compiled/dotenv-expand/license +0 -24
  90. package/dist/compiled/dotenv-expand/package.json +0 -1
  91. package/dist/compiled/execa/index.d.ts +0 -564
  92. package/dist/compiled/execa/index.js +0 -1
  93. package/dist/compiled/execa/license +0 -9
  94. package/dist/compiled/execa/package.json +0 -1
  95. package/dist/compiled/fast-glob/@nodelib/fs.scandir/out/adapters/fs.d.ts +0 -20
  96. package/dist/compiled/fast-glob/@nodelib/fs.scandir/out/index.d.ts +0 -12
  97. package/dist/compiled/fast-glob/@nodelib/fs.scandir/out/providers/async.d.ts +0 -7
  98. package/dist/compiled/fast-glob/@nodelib/fs.scandir/out/settings.d.ts +0 -20
  99. package/dist/compiled/fast-glob/@nodelib/fs.scandir/out/types/index.d.ts +0 -20
  100. package/dist/compiled/fast-glob/@nodelib/fs.stat/out/adapters/fs.d.ts +0 -13
  101. package/dist/compiled/fast-glob/@nodelib/fs.stat/out/index.d.ts +0 -12
  102. package/dist/compiled/fast-glob/@nodelib/fs.stat/out/providers/async.d.ts +0 -4
  103. package/dist/compiled/fast-glob/@nodelib/fs.stat/out/settings.d.ts +0 -16
  104. package/dist/compiled/fast-glob/@nodelib/fs.stat/out/types/index.d.ts +0 -4
  105. package/dist/compiled/fast-glob/@nodelib/fs.walk/out/index.d.ts +0 -14
  106. package/dist/compiled/fast-glob/@nodelib/fs.walk/out/providers/async.d.ts +0 -12
  107. package/dist/compiled/fast-glob/@nodelib/fs.walk/out/readers/async.d.ts +0 -30
  108. package/dist/compiled/fast-glob/@nodelib/fs.walk/out/readers/reader.d.ts +0 -6
  109. package/dist/compiled/fast-glob/@nodelib/fs.walk/out/settings.d.ts +0 -30
  110. package/dist/compiled/fast-glob/@nodelib/fs.walk/out/types/index.d.ts +0 -8
  111. package/dist/compiled/fast-glob/index.js +0 -37
  112. package/dist/compiled/fast-glob/license +0 -21
  113. package/dist/compiled/fast-glob/out/index.d.ts +0 -27
  114. package/dist/compiled/fast-glob/out/managers/tasks.d.ts +0 -22
  115. package/dist/compiled/fast-glob/out/settings.d.ts +0 -164
  116. package/dist/compiled/fast-glob/out/types/index.d.ts +0 -31
  117. package/dist/compiled/fast-glob/package.json +0 -1
  118. package/dist/compiled/filesize/filesize.d.ts +0 -131
  119. package/dist/compiled/filesize/index.js +0 -9
  120. package/dist/compiled/filesize/license +0 -28
  121. package/dist/compiled/filesize/package.json +0 -1
  122. package/dist/compiled/fs-extra/index.d.ts +0 -563
  123. package/dist/compiled/fs-extra/index.js +0 -1
  124. package/dist/compiled/fs-extra/license +0 -15
  125. package/dist/compiled/fs-extra/package.json +0 -1
  126. package/dist/compiled/glob/index.d.ts +0 -91
  127. package/dist/compiled/glob/index.js +0 -1
  128. package/dist/compiled/glob/license +0 -21
  129. package/dist/compiled/glob/minimatch/index.d.ts +0 -204
  130. package/dist/compiled/glob/package.json +0 -1
  131. package/dist/compiled/globby/index.d.ts +0 -186
  132. package/dist/compiled/globby/index.js +0 -1
  133. package/dist/compiled/globby/license +0 -9
  134. package/dist/compiled/globby/package.json +0 -1
  135. package/dist/compiled/gzip-size/index.d.ts +0 -96
  136. package/dist/compiled/gzip-size/index.js +0 -1
  137. package/dist/compiled/gzip-size/license +0 -9
  138. package/dist/compiled/gzip-size/package.json +0 -1
  139. package/dist/compiled/import-lazy/index.d.ts +0 -26
  140. package/dist/compiled/import-lazy/index.js +0 -1
  141. package/dist/compiled/import-lazy/license +0 -9
  142. package/dist/compiled/import-lazy/package.json +0 -1
  143. package/dist/compiled/inquirer/index.d.ts +0 -997
  144. package/dist/compiled/inquirer/index.js +0 -9
  145. package/dist/compiled/inquirer/lib/objects/choice.d.ts +0 -65
  146. package/dist/compiled/inquirer/lib/objects/choices.d.ts +0 -206
  147. package/dist/compiled/inquirer/lib/objects/separator.d.ts +0 -37
  148. package/dist/compiled/inquirer/lib/ui/baseUI.d.ts +0 -37
  149. package/dist/compiled/inquirer/lib/ui/bottom-bar.d.ts +0 -65
  150. package/dist/compiled/inquirer/lib/ui/prompt.d.ts +0 -104
  151. package/dist/compiled/inquirer/license +0 -22
  152. package/dist/compiled/inquirer/package.json +0 -1
  153. package/dist/compiled/inquirer/through/index.d.ts +0 -25
  154. package/dist/compiled/js-yaml/index.d.ts +0 -154
  155. package/dist/compiled/js-yaml/index.js +0 -1
  156. package/dist/compiled/js-yaml/license +0 -21
  157. package/dist/compiled/js-yaml/package.json +0 -1
  158. package/dist/compiled/json5/index.js +0 -1
  159. package/dist/compiled/json5/lib/index.d.ts +0 -4
  160. package/dist/compiled/json5/lib/parse.d.ts +0 -15
  161. package/dist/compiled/json5/lib/stringify.d.ts +0 -89
  162. package/dist/compiled/json5/package.json +0 -1
  163. package/dist/compiled/lodash/common/array.d.ts +0 -2126
  164. package/dist/compiled/lodash/common/collection.d.ts +0 -1930
  165. package/dist/compiled/lodash/common/common.d.ts +0 -280
  166. package/dist/compiled/lodash/common/date.d.ts +0 -23
  167. package/dist/compiled/lodash/common/function.d.ts +0 -1446
  168. package/dist/compiled/lodash/common/lang.d.ts +0 -1693
  169. package/dist/compiled/lodash/common/math.d.ts +0 -405
  170. package/dist/compiled/lodash/common/number.d.ts +0 -131
  171. package/dist/compiled/lodash/common/object.d.ts +0 -2519
  172. package/dist/compiled/lodash/common/seq.d.ts +0 -210
  173. package/dist/compiled/lodash/common/string.d.ts +0 -788
  174. package/dist/compiled/lodash/common/util.d.ts +0 -1220
  175. package/dist/compiled/lodash/index.d.ts +0 -46
  176. package/dist/compiled/lodash/index.js +0 -5
  177. package/dist/compiled/lodash/license +0 -47
  178. package/dist/compiled/lodash/package.json +0 -1
  179. package/dist/compiled/mime-types/index.d.ts +0 -14
  180. package/dist/compiled/mime-types/index.js +0 -14
  181. package/dist/compiled/mime-types/license +0 -23
  182. package/dist/compiled/mime-types/package.json +0 -1
  183. package/dist/compiled/minimist/index.d.ts +0 -95
  184. package/dist/compiled/minimist/index.js +0 -1
  185. package/dist/compiled/minimist/license +0 -18
  186. package/dist/compiled/minimist/package.json +0 -1
  187. package/dist/compiled/nanoid/index.d.ts +0 -91
  188. package/dist/compiled/nanoid/index.js +0 -1
  189. package/dist/compiled/nanoid/license +0 -20
  190. package/dist/compiled/nanoid/package.json +0 -1
  191. package/dist/compiled/ora/cli-spinners/index.d.ts +0 -125
  192. package/dist/compiled/ora/index.d.ts +0 -277
  193. package/dist/compiled/ora/index.js +0 -3
  194. package/dist/compiled/ora/license +0 -9
  195. package/dist/compiled/ora/package.json +0 -1
  196. package/dist/compiled/pkg-up/index.d.ts +0 -48
  197. package/dist/compiled/pkg-up/index.js +0 -1
  198. package/dist/compiled/pkg-up/license +0 -9
  199. package/dist/compiled/pkg-up/package.json +0 -1
  200. package/dist/compiled/recursive-readdir/index.d.ts +0 -21
  201. package/dist/compiled/recursive-readdir/index.js +0 -1
  202. package/dist/compiled/recursive-readdir/license +0 -21
  203. package/dist/compiled/recursive-readdir/package.json +0 -1
  204. package/dist/compiled/schema-utils3/index.d.ts +0 -1
  205. package/dist/compiled/schema-utils3/index.js +0 -3
  206. package/dist/compiled/schema-utils3/license +0 -20
  207. package/dist/compiled/schema-utils3/package.json +0 -1
  208. package/dist/compiled/semver/classes/comparator.d.ts +0 -17
  209. package/dist/compiled/semver/classes/range.d.ts +0 -21
  210. package/dist/compiled/semver/classes/semver.d.ts +0 -62
  211. package/dist/compiled/semver/functions/clean.d.ts +0 -8
  212. package/dist/compiled/semver/functions/cmp.d.ts +0 -16
  213. package/dist/compiled/semver/functions/coerce.d.ts +0 -12
  214. package/dist/compiled/semver/functions/compare-build.d.ts +0 -16
  215. package/dist/compiled/semver/functions/compare-loose.d.ts +0 -5
  216. package/dist/compiled/semver/functions/compare.d.ts +0 -20
  217. package/dist/compiled/semver/functions/diff.d.ts +0 -13
  218. package/dist/compiled/semver/functions/eq.d.ts +0 -9
  219. package/dist/compiled/semver/functions/gt.d.ts +0 -9
  220. package/dist/compiled/semver/functions/gte.d.ts +0 -9
  221. package/dist/compiled/semver/functions/inc.d.ts +0 -15
  222. package/dist/compiled/semver/functions/lt.d.ts +0 -9
  223. package/dist/compiled/semver/functions/lte.d.ts +0 -8
  224. package/dist/compiled/semver/functions/major.d.ts +0 -9
  225. package/dist/compiled/semver/functions/minor.d.ts +0 -9
  226. package/dist/compiled/semver/functions/neq.d.ts +0 -9
  227. package/dist/compiled/semver/functions/parse.d.ts +0 -12
  228. package/dist/compiled/semver/functions/patch.d.ts +0 -9
  229. package/dist/compiled/semver/functions/prerelease.d.ts +0 -12
  230. package/dist/compiled/semver/functions/rcompare.d.ts +0 -15
  231. package/dist/compiled/semver/functions/rsort.d.ts +0 -9
  232. package/dist/compiled/semver/functions/satisfies.d.ts +0 -14
  233. package/dist/compiled/semver/functions/sort.d.ts +0 -9
  234. package/dist/compiled/semver/functions/valid.d.ts +0 -11
  235. package/dist/compiled/semver/index.d.ts +0 -133
  236. package/dist/compiled/semver/index.js +0 -1
  237. package/dist/compiled/semver/internals/identifiers.d.ts +0 -13
  238. package/dist/compiled/semver/license +0 -15
  239. package/dist/compiled/semver/package.json +0 -1
  240. package/dist/compiled/semver/ranges/gtr.d.ts +0 -14
  241. package/dist/compiled/semver/ranges/intersects.d.ts +0 -13
  242. package/dist/compiled/semver/ranges/ltr.d.ts +0 -14
  243. package/dist/compiled/semver/ranges/max-satisfying.d.ts +0 -14
  244. package/dist/compiled/semver/ranges/min-satisfying.d.ts +0 -14
  245. package/dist/compiled/semver/ranges/min-version.d.ts +0 -10
  246. package/dist/compiled/semver/ranges/outside.d.ts +0 -15
  247. package/dist/compiled/semver/ranges/simplify.d.ts +0 -14
  248. package/dist/compiled/semver/ranges/subset.d.ts +0 -13
  249. package/dist/compiled/semver/ranges/to-comparators.d.ts +0 -9
  250. package/dist/compiled/semver/ranges/valid.d.ts +0 -12
  251. package/dist/compiled/signale/index.d.ts +0 -162
  252. package/dist/compiled/signale/index.js +0 -1
  253. package/dist/compiled/signale/package.json +0 -1
  254. package/dist/compiled/slash/index.d.ts +0 -25
  255. package/dist/compiled/slash/index.js +0 -1
  256. package/dist/compiled/slash/license +0 -9
  257. package/dist/compiled/slash/package.json +0 -1
  258. package/dist/compiled/strip-ansi/index.d.ts +0 -17
  259. package/dist/compiled/strip-ansi/index.js +0 -1
  260. package/dist/compiled/strip-ansi/license +0 -9
  261. package/dist/compiled/strip-ansi/package.json +0 -1
  262. package/dist/compiled/tsconfig-paths/index.js +0 -1
  263. package/dist/compiled/tsconfig-paths/lib/config-loader.d.ts +0 -33
  264. package/dist/compiled/tsconfig-paths/lib/filesystem.d.ts +0 -34
  265. package/dist/compiled/tsconfig-paths/lib/index.d.ts +0 -5
  266. package/dist/compiled/tsconfig-paths/lib/mapping-entry.d.ts +0 -18
  267. package/dist/compiled/tsconfig-paths/lib/match-path-async.d.ts +0 -21
  268. package/dist/compiled/tsconfig-paths/lib/match-path-sync.d.ts +0 -32
  269. package/dist/compiled/tsconfig-paths/lib/register.d.ts +0 -12
  270. package/dist/compiled/tsconfig-paths/lib/try-path.d.ts +0 -15
  271. package/dist/compiled/tsconfig-paths/lib/tsconfig-loader.d.ts +0 -28
  272. package/dist/compiled/tsconfig-paths/license +0 -21
  273. package/dist/compiled/tsconfig-paths/package.json +0 -1
  274. package/dist/compiled/upath/index.js +0 -1
  275. package/dist/compiled/upath/license +0 -22
  276. package/dist/compiled/upath/package.json +0 -1
  277. package/dist/compiled/upath/upath.d.ts +0 -241
  278. package/dist/compiled/url-join/index.d.ts +0 -17
  279. package/dist/compiled/url-join/index.js +0 -1
  280. package/dist/compiled/url-join/license +0 -21
  281. package/dist/compiled/url-join/package.json +0 -1
  282. package/dist/compiled/webpack-chain/index.js +0 -1
  283. package/dist/compiled/webpack-chain/license +0 -373
  284. package/dist/compiled/webpack-chain/package.json +0 -1
  285. package/dist/compiled/webpack-chain/types/index.d.ts +0 -388
  286. package/dist/compiled/webpack-dev-middleware/index.js +0 -7
  287. package/dist/compiled/webpack-dev-middleware/license +0 -20
  288. package/dist/compiled/webpack-dev-middleware/package.json +0 -1
  289. package/dist/compiled/webpack-dev-middleware/types/index.d.ts +0 -262
  290. package/dist/esm/FileSizeReporter.js +0 -180
  291. package/dist/esm/alias.js +0 -83
  292. package/dist/esm/analyzeProject.js +0 -168
  293. package/dist/esm/applyOptionsChain.js +0 -26
  294. package/dist/esm/babel.js +0 -169
  295. package/dist/esm/chainId.js +0 -92
  296. package/dist/esm/clearConsole.js +0 -6
  297. package/dist/esm/commands.js +0 -17
  298. package/dist/esm/compatRequire.js +0 -68
  299. package/dist/esm/compiled.js +0 -34
  300. package/dist/esm/constants.js +0 -317
  301. package/dist/esm/debug.js +0 -5
  302. package/dist/esm/emptyDir.js +0 -158
  303. package/dist/esm/ensureAbsolutePath.js +0 -5
  304. package/dist/esm/ensureArray.js +0 -9
  305. package/dist/esm/findExists.js +0 -27
  306. package/dist/esm/generateMetaTags.js +0 -40
  307. package/dist/esm/getBrowserslist.js +0 -12
  308. package/dist/esm/getCoreJsVersion.js +0 -57
  309. package/dist/esm/getEntryOptions.js +0 -45
  310. package/dist/esm/getPackageManager.js +0 -187
  311. package/dist/esm/getPort.js +0 -215
  312. package/dist/esm/getServerConfig.js +0 -145
  313. package/dist/esm/getTargetDir.js +0 -6
  314. package/dist/esm/import.js +0 -8
  315. package/dist/esm/index.js +0 -44
  316. package/dist/esm/is/index.js +0 -85
  317. package/dist/esm/is/nodeEnv.js +0 -16
  318. package/dist/esm/is/platform.js +0 -7
  319. package/dist/esm/is/type.js +0 -25
  320. package/dist/esm/logger.js +0 -207
  321. package/dist/esm/monorepo.js +0 -109
  322. package/dist/esm/nodeEnv.js +0 -258
  323. package/dist/esm/path.js +0 -85
  324. package/dist/esm/pathSerializer.js +0 -85
  325. package/dist/esm/plugin.js +0 -45
  326. package/dist/esm/prettyInstructions.js +0 -96
  327. package/dist/esm/printBuildError.js +0 -24
  328. package/dist/esm/react.js +0 -43
  329. package/dist/esm/readTsConfig.js +0 -10
  330. package/dist/esm/removeSlash.js +0 -10
  331. package/dist/esm/resolve.js +0 -42
  332. package/dist/esm/routes.js +0 -19
  333. package/dist/esm/runtimeExports.js +0 -65
  334. package/dist/esm/ssr.js +0 -3
  335. package/dist/esm/storage.js +0 -36
  336. package/dist/esm/testUtils.js +0 -13
  337. package/dist/esm/types.js +0 -1
  338. package/dist/esm/universal/constants.js +0 -3
  339. package/dist/esm/universal/formatWebpack.js +0 -108
  340. package/dist/esm/universal/nestedRoutes.js +0 -174
  341. package/dist/esm/universal/remixRouter.js +0 -1
  342. package/dist/esm/universal/serialize.js +0 -7
  343. package/dist/esm/version.js +0 -193
  344. package/dist/esm/wait.js +0 -7
  345. package/dist/esm/watch.js +0 -230
  346. package/dist/esm-node/FileSizeReporter.js +0 -133
  347. package/dist/esm-node/alias.js +0 -61
  348. package/dist/esm-node/analyzeProject.js +0 -17
  349. package/dist/esm-node/applyOptionsChain.js +0 -35
  350. package/dist/esm-node/babel.js +0 -105
  351. package/dist/esm-node/chainId.js +0 -173
  352. package/dist/esm-node/clearConsole.js +0 -8
  353. package/dist/esm-node/commands.js +0 -22
  354. package/dist/esm-node/compatRequire.js +0 -42
  355. package/dist/esm-node/compiled.js +0 -77
  356. package/dist/esm-node/constants.js +0 -264
  357. package/dist/esm-node/debug.js +0 -5
  358. package/dist/esm-node/emptyDir.js +0 -9
  359. package/dist/esm-node/ensureAbsolutePath.js +0 -5
  360. package/dist/esm-node/ensureArray.js +0 -9
  361. package/dist/esm-node/findExists.js +0 -12
  362. package/dist/esm-node/generateMetaTags.js +0 -38
  363. package/dist/esm-node/getBrowserslist.js +0 -7
  364. package/dist/esm-node/getCoreJsVersion.js +0 -13
  365. package/dist/esm-node/getEntryOptions.js +0 -17
  366. package/dist/esm-node/getPackageManager.js +0 -32
  367. package/dist/esm-node/getPort.js +0 -59
  368. package/dist/esm-node/getServerConfig.js +0 -14
  369. package/dist/esm-node/getTargetDir.js +0 -8
  370. package/dist/esm-node/import.js +0 -9
  371. package/dist/esm-node/index.js +0 -44
  372. package/dist/esm-node/is/index.js +0 -71
  373. package/dist/esm-node/is/nodeEnv.js +0 -12
  374. package/dist/esm-node/is/platform.js +0 -6
  375. package/dist/esm-node/is/type.js +0 -34
  376. package/dist/esm-node/logger.js +0 -100
  377. package/dist/esm-node/monorepo.js +0 -87
  378. package/dist/esm-node/nodeEnv.js +0 -30
  379. package/dist/esm-node/path.js +0 -50
  380. package/dist/esm-node/pathSerializer.js +0 -46
  381. package/dist/esm-node/plugin.js +0 -23
  382. package/dist/esm-node/prettyInstructions.js +0 -77
  383. package/dist/esm-node/printBuildError.js +0 -34
  384. package/dist/esm-node/react.js +0 -20
  385. package/dist/esm-node/readTsConfig.js +0 -13
  386. package/dist/esm-node/removeSlash.js +0 -8
  387. package/dist/esm-node/resolve.js +0 -38
  388. package/dist/esm-node/routes.js +0 -24
  389. package/dist/esm-node/runtimeExports.js +0 -40
  390. package/dist/esm-node/ssr.js +0 -6
  391. package/dist/esm-node/storage.js +0 -42
  392. package/dist/esm-node/testUtils.js +0 -15
  393. package/dist/esm-node/types.js +0 -0
  394. package/dist/esm-node/universal/constants.js +0 -6
  395. package/dist/esm-node/universal/formatWebpack.js +0 -77
  396. package/dist/esm-node/universal/nestedRoutes.js +0 -93
  397. package/dist/esm-node/universal/remixRouter.js +0 -1
  398. package/dist/esm-node/universal/serialize.js +0 -7
  399. package/dist/esm-node/version.js +0 -25
  400. package/dist/esm-node/wait.js +0 -6
  401. package/dist/esm-node/watch.js +0 -36
  402. package/dist/types/compiled.d.ts +0 -43
  403. /package/dist/{types/FileSizeReporter.d.ts → FileSizeReporter.d.ts} +0 -0
  404. /package/dist/{cjs/FileSizeReporter.js → FileSizeReporter.js} +0 -0
  405. /package/dist/{types/alias.d.ts → alias.d.ts} +0 -0
  406. /package/dist/{types/analyzeProject.d.ts → analyzeProject.d.ts} +0 -0
  407. /package/dist/{types/applyOptionsChain.d.ts → applyOptionsChain.d.ts} +0 -0
  408. /package/dist/{cjs/applyOptionsChain.js → applyOptionsChain.js} +0 -0
  409. /package/dist/{types/babel.d.ts → babel.d.ts} +0 -0
  410. /package/dist/{types/chainId.d.ts → chainId.d.ts} +0 -0
  411. /package/dist/{cjs/chainId.js → chainId.js} +0 -0
  412. /package/dist/{types/clearConsole.d.ts → clearConsole.d.ts} +0 -0
  413. /package/dist/{cjs/clearConsole.js → clearConsole.js} +0 -0
  414. /package/dist/{types/commands.d.ts → commands.d.ts} +0 -0
  415. /package/dist/{cjs/commands.js → commands.js} +0 -0
  416. /package/dist/{types/compatRequire.d.ts → compatRequire.d.ts} +0 -0
  417. /package/dist/{cjs/compiled.js → compiled.js} +0 -0
  418. /package/dist/{types/constants.d.ts → constants.d.ts} +0 -0
  419. /package/dist/{cjs/constants.js → constants.js} +0 -0
  420. /package/dist/{cjs/debug.js → debug.js} +0 -0
  421. /package/dist/{types/emptyDir.d.ts → emptyDir.d.ts} +0 -0
  422. /package/dist/{types/ensureAbsolutePath.d.ts → ensureAbsolutePath.d.ts} +0 -0
  423. /package/dist/{cjs/ensureAbsolutePath.js → ensureAbsolutePath.js} +0 -0
  424. /package/dist/{types/ensureArray.d.ts → ensureArray.d.ts} +0 -0
  425. /package/dist/{cjs/ensureArray.js → ensureArray.js} +0 -0
  426. /package/dist/{types/findExists.d.ts → findExists.d.ts} +0 -0
  427. /package/dist/{cjs/findExists.js → findExists.js} +0 -0
  428. /package/dist/{types/generateMetaTags.d.ts → generateMetaTags.d.ts} +0 -0
  429. /package/dist/{cjs/generateMetaTags.js → generateMetaTags.js} +0 -0
  430. /package/dist/{types/getBrowserslist.d.ts → getBrowserslist.d.ts} +0 -0
  431. /package/dist/{cjs/getBrowserslist.js → getBrowserslist.js} +0 -0
  432. /package/dist/{types/getCoreJsVersion.d.ts → getCoreJsVersion.d.ts} +0 -0
  433. /package/dist/{cjs/getCoreJsVersion.js → getCoreJsVersion.js} +0 -0
  434. /package/dist/{types/getEntryOptions.d.ts → getEntryOptions.d.ts} +0 -0
  435. /package/dist/{types/getPackageManager.d.ts → getPackageManager.d.ts} +0 -0
  436. /package/dist/{types/getPort.d.ts → getPort.d.ts} +0 -0
  437. /package/dist/{types/getServerConfig.d.ts → getServerConfig.d.ts} +0 -0
  438. /package/dist/{types/getTargetDir.d.ts → getTargetDir.d.ts} +0 -0
  439. /package/dist/{cjs/getTargetDir.js → getTargetDir.js} +0 -0
  440. /package/dist/{types/import.d.ts → import.d.ts} +0 -0
  441. /package/dist/{cjs/import.js → import.js} +0 -0
  442. /package/dist/{types/index.d.ts → index.d.ts} +0 -0
  443. /package/dist/{cjs/index.js → index.js} +0 -0
  444. /package/dist/{types/is → is}/index.d.ts +0 -0
  445. /package/dist/{cjs/is → is}/index.js +0 -0
  446. /package/dist/{types/is → is}/nodeEnv.d.ts +0 -0
  447. /package/dist/{cjs/is → is}/nodeEnv.js +0 -0
  448. /package/dist/{types/is → is}/platform.d.ts +0 -0
  449. /package/dist/{cjs/is → is}/platform.js +0 -0
  450. /package/dist/{types/is → is}/type.d.ts +0 -0
  451. /package/dist/{cjs/is → is}/type.js +0 -0
  452. /package/dist/{types/monorepo.d.ts → monorepo.d.ts} +0 -0
  453. /package/dist/{types/nodeEnv.d.ts → nodeEnv.d.ts} +0 -0
  454. /package/dist/{types/path.d.ts → path.d.ts} +0 -0
  455. /package/dist/{types/pathSerializer.d.ts → pathSerializer.d.ts} +0 -0
  456. /package/dist/{types/plugin.d.ts → plugin.d.ts} +0 -0
  457. /package/dist/{cjs/plugin.js → plugin.js} +0 -0
  458. /package/dist/{types/prettyInstructions.d.ts → prettyInstructions.d.ts} +0 -0
  459. /package/dist/{cjs/prettyInstructions.js → prettyInstructions.js} +0 -0
  460. /package/dist/{types/printBuildError.d.ts → printBuildError.d.ts} +0 -0
  461. /package/dist/{cjs/printBuildError.js → printBuildError.js} +0 -0
  462. /package/dist/{types/react.d.ts → react.d.ts} +0 -0
  463. /package/dist/{types/readTsConfig.d.ts → readTsConfig.d.ts} +0 -0
  464. /package/dist/{cjs/readTsConfig.js → readTsConfig.js} +0 -0
  465. /package/dist/{types/removeSlash.d.ts → removeSlash.d.ts} +0 -0
  466. /package/dist/{cjs/removeSlash.js → removeSlash.js} +0 -0
  467. /package/dist/{types/resolve.d.ts → resolve.d.ts} +0 -0
  468. /package/dist/{cjs/resolve.js → resolve.js} +0 -0
  469. /package/dist/{types/routes.d.ts → routes.d.ts} +0 -0
  470. /package/dist/{cjs/routes.js → routes.js} +0 -0
  471. /package/dist/{types/runtimeExports.d.ts → runtimeExports.d.ts} +0 -0
  472. /package/dist/{types/ssr.d.ts → ssr.d.ts} +0 -0
  473. /package/dist/{cjs/ssr.js → ssr.js} +0 -0
  474. /package/dist/{types/storage.d.ts → storage.d.ts} +0 -0
  475. /package/dist/{cjs/storage.js → storage.js} +0 -0
  476. /package/dist/{types/testUtils.d.ts → testUtils.d.ts} +0 -0
  477. /package/dist/{cjs/testUtils.js → testUtils.js} +0 -0
  478. /package/dist/{types/types.d.ts → types.d.ts} +0 -0
  479. /package/dist/{cjs/types.js → types.js} +0 -0
  480. /package/dist/{types/universal → universal}/constants.d.ts +0 -0
  481. /package/dist/{cjs/universal → universal}/constants.js +0 -0
  482. /package/dist/{types/universal → universal}/formatWebpack.d.ts +0 -0
  483. /package/dist/{cjs/universal → universal}/formatWebpack.js +0 -0
  484. /package/dist/{types/universal → universal}/nestedRoutes.d.ts +0 -0
  485. /package/dist/{types/universal → universal}/remixRouter.d.ts +0 -0
  486. /package/dist/{cjs/universal → universal}/remixRouter.js +0 -0
  487. /package/dist/{types/universal → universal}/serialize.d.ts +0 -0
  488. /package/dist/{cjs/universal → universal}/serialize.js +0 -0
  489. /package/dist/{types/version.d.ts → version.d.ts} +0 -0
  490. /package/dist/{types/wait.d.ts → wait.d.ts} +0 -0
  491. /package/dist/{cjs/wait.js → wait.js} +0 -0
  492. /package/dist/{types/watch.d.ts → watch.d.ts} +0 -0
@@ -1,2126 +0,0 @@
1
- import _ = require("../index");
2
- declare module "../index" {
3
- interface LoDashStatic {
4
- /**
5
- * Creates an array of elements split into groups the length of size. If collection can’t be split evenly, the
6
- * final chunk will be the remaining elements.
7
- *
8
- * @param array The array to process.
9
- * @param size The length of each chunk.
10
- * @return Returns the new array containing chunks.
11
- */
12
- chunk<T>(array: List<T> | null | undefined, size?: number): T[][];
13
- }
14
- interface Collection<T> {
15
- /**
16
- * @see _.chunk
17
- */
18
- chunk(size?: number): Collection<T[]>;
19
- }
20
- interface CollectionChain<T> {
21
- /**
22
- * @see _.chunk
23
- */
24
- chunk(size?: number): CollectionChain<T[]>;
25
- }
26
- interface LoDashStatic {
27
- /**
28
- * Creates an array with all falsey values removed. The values false, null, 0, "", undefined, and NaN are
29
- * falsey.
30
- *
31
- * @param array The array to compact.
32
- * @return Returns the new array of filtered values.
33
- */
34
- compact<T>(array: List<T | null | undefined | false | "" | 0> | null | undefined): T[];
35
- }
36
-
37
- type Truthy<T> = T extends null | undefined | false | "" | 0 ? never : T;
38
- interface Collection<T> {
39
- /**
40
- * @see _.compact
41
- */
42
- compact(): Collection<Truthy<T>>;
43
- }
44
- interface CollectionChain<T> {
45
- /**
46
- * @see _.compact
47
- */
48
- compact(): CollectionChain<Truthy<T>>;
49
- }
50
- interface LoDashStatic {
51
- /**
52
- * Creates a new array concatenating `array` with any additional arrays
53
- * and/or values.
54
- *
55
- * @category Array
56
- * @param [values] The array values to concatenate.
57
- * @returns Returns the new concatenated array.
58
- * @example
59
- *
60
- * var array = [1];
61
- * var other = _.concat(array, 2, [3], [[4]]);
62
- *
63
- * console.log(other);
64
- * // => [1, 2, 3, [4]]
65
- *
66
- * console.log(array);
67
- * // => [1]
68
- */
69
- concat<T>(...values: Array<Many<T>>): T[];
70
- }
71
- interface Primitive<T> {
72
- /**
73
- * @see _.concat
74
- */
75
- concat(...values: Array<Many<T>>): Collection<T>;
76
- }
77
- interface Collection<T> {
78
- /**
79
- * @see _.concat
80
- */
81
- concat(...values: Array<Many<T>>): Collection<T>;
82
- }
83
- interface Object<T> {
84
- /**
85
- * @see _.concat
86
- */
87
- concat(...values: Array<Many<T>>): Collection<T>;
88
- }
89
- interface PrimitiveChain<T> {
90
- /**
91
- * @see _.concat
92
- */
93
- concat(...values: Array<Many<T>>): CollectionChain<T>;
94
- }
95
- interface CollectionChain<T> {
96
- /**
97
- * @see _.concat
98
- */
99
- concat(...values: Array<Many<T>>): CollectionChain<T>;
100
- }
101
- interface ObjectChain<T> {
102
- /**
103
- * @see _.concat
104
- */
105
- concat(...values: Array<Many<T>>): CollectionChain<T>;
106
- }
107
- interface LoDashStatic {
108
- /**
109
- * Creates an array of `array` values not included in the other provided arrays using SameValueZero for
110
- * equality comparisons. The order and references of result values are determined by the first array.
111
- *
112
- * @param array The array to inspect.
113
- * @param values The arrays of values to exclude.
114
- * @return Returns the new array of filtered values.
115
- */
116
- difference<T>(array: List<T> | null | undefined, ...values: Array<List<T>>): T[];
117
- }
118
- interface Collection<T> {
119
- /**
120
- * @see _.difference
121
- */
122
- difference(...values: Array<List<T>>): Collection<T>;
123
- }
124
- interface CollectionChain<T> {
125
- /**
126
- * @see _.difference
127
- */
128
- difference(...values: Array<List<T>>): CollectionChain<T>;
129
- }
130
- interface LoDashStatic {
131
- /**
132
- * This method is like _.difference except that it accepts iteratee which is invoked for each element
133
- * of array and values to generate the criterion by which they're compared. The order and references
134
- * of result values are determined by the first array. The iteratee is invoked with one argument: (value).
135
- *
136
- * @param array The array to inspect.
137
- * @param values The values to exclude.
138
- * @param iteratee The iteratee invoked per element.
139
- * @returns Returns the new array of filtered values.
140
- */
141
- differenceBy<T1, T2>(array: List<T1> | null | undefined, values: List<T2>, iteratee: ValueIteratee<T1 | T2>): T1[];
142
- /**
143
- * @see _.differenceBy
144
- */
145
- differenceBy<T1, T2, T3>(array: List<T1> | null | undefined, values1: List<T2>, values2: List<T3>, iteratee: ValueIteratee<T1 | T2 | T3>): T1[];
146
- /**
147
- * @see _.differenceBy
148
- */
149
- differenceBy<T1, T2, T3, T4>(array: List<T1> | null | undefined, values1: List<T2>, values2: List<T3>, values3: List<T4>, iteratee: ValueIteratee<T1 | T2 | T3 | T4>): T1[];
150
- /**
151
- * @see _.differenceBy
152
- */
153
- differenceBy<T1, T2, T3, T4, T5>(array: List<T1> | null | undefined, values1: List<T2>, values2: List<T3>, values3: List<T4>, values4: List<T5>, iteratee: ValueIteratee<T1 | T2 | T3 | T4 | T5>): T1[];
154
- /**
155
- * @see _.differenceBy
156
- */
157
- differenceBy<T1, T2, T3, T4, T5, T6>(array: List<T1> | null | undefined, values1: List<T2>, values2: List<T3>, values3: List<T4>, values4: List<T5>, values5: List<T6>, iteratee: ValueIteratee<T1 | T2 | T3 | T4 | T5 | T6>): T1[];
158
- /**
159
- * @see _.differenceBy
160
- */
161
- differenceBy<T1, T2, T3, T4, T5, T6, T7>(array: List<T1> | null | undefined, values1: List<T2>, values2: List<T3>, values3: List<T4>, values4: List<T5>, values5: List<T6>, ...values: Array<List<T7> | ValueIteratee<T1 | T2 | T3 | T4 | T5 | T6 | T7>>): T1[];
162
- /**
163
- * @see _.differenceBy
164
- */
165
- differenceBy<T>(array: List<T> | null | undefined, ...values: Array<List<T>>): T[];
166
- }
167
- interface Collection<T> {
168
- /**
169
- * @see _.differenceBy
170
- */
171
- differenceBy<T2>(values1: List<T2>, iteratee?: ValueIteratee<T | T2>): Collection<T>;
172
- /**
173
- * @see _.differenceBy
174
- */
175
- differenceBy(...values: Array<List<unknown> | ValueIteratee<T>>): Collection<T>;
176
- }
177
- interface CollectionChain<T> {
178
- /**
179
- * @see _.differenceBy
180
- */
181
- differenceBy<T2>(values1: List<T2>, iteratee?: ValueIteratee<T | T2>): CollectionChain<T>;
182
- /**
183
- * @see _.differenceBy
184
- */
185
- differenceBy(...values: Array<List<unknown> | ValueIteratee<T>>): CollectionChain<T>;
186
- }
187
- interface LoDashStatic {
188
- /**
189
- * This method is like _.difference except that it accepts comparator which is invoked to compare elements
190
- * of array to values. The order and references of result values are determined by the first array. The
191
- * comparator is invoked with two arguments: (arrVal, othVal).
192
- *
193
- * @category Array
194
- * @param [values] The arrays to inspect.
195
- * @param [comparator] The comparator invoked per element.
196
- * @returns Returns the new array of filtered values.
197
- * @example
198
- *
199
- * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
200
-
201
- * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual);
202
- * // => [{ 'x': 2, 'y': 1 }]
203
- */
204
- differenceWith<T1, T2>(array: List<T1> | null | undefined, values: List<T2>, comparator: Comparator2<T1, T2>): T1[];
205
- /**
206
- * @see _.differenceWith
207
- */
208
- differenceWith<T1, T2, T3>(array: List<T1> | null | undefined, values1: List<T2>, values2: List<T3>, comparator: Comparator2<T1, T2 | T3>): T1[];
209
- /**
210
- * @see _.differenceWith
211
- */
212
- differenceWith<T1, T2, T3, T4>(array: List<T1> | null | undefined, values1: List<T2>, values2: List<T3>, ...values: Array<List<T4> | Comparator2<T1, T2 | T3 | T4>>): T1[];
213
- /**
214
- * @see _.differenceWith
215
- */
216
- differenceWith<T>(array: List<T> | null | undefined, ...values: Array<List<T>>): T[];
217
- }
218
- interface Collection<T> {
219
- /**
220
- * @see _.differenceWith
221
- */
222
- differenceWith<T2>(values: List<T2>, comparator: Comparator2<T, T2>): Collection<T>;
223
- /**
224
- * @see _.differenceWith
225
- */
226
- differenceWith<T2, T3, T4>(...values: Array<List<unknown> | Comparator2<T, never>>): Collection<T>;
227
- }
228
- interface CollectionChain<T> {
229
- /**
230
- * @see _.differenceWith
231
- */
232
- differenceWith< T2>(values: List<T2>, comparator: Comparator2<T, T2>): CollectionChain<T>;
233
- /**
234
- * @see _.differenceWith
235
- */
236
- differenceWith< T2, T3, T4>(...values: Array<List<unknown> | Comparator2<T, never>>): CollectionChain<T>;
237
- }
238
- interface LoDashStatic {
239
- /**
240
- * Creates a slice of array with n elements dropped from the beginning.
241
- *
242
- * @param array The array to query.
243
- * @param n The number of elements to drop.
244
- * @return Returns the slice of array.
245
- */
246
- drop<T>(array: List<T> | null | undefined, n?: number): T[];
247
- }
248
- interface Collection<T> {
249
- /**
250
- * @see _.drop
251
- */
252
- drop(n?: number): Collection<T>;
253
- }
254
- interface CollectionChain<T> {
255
- /**
256
- * @see _.drop
257
- */
258
- drop(n?: number): CollectionChain<T>;
259
- }
260
- interface LoDashStatic {
261
- /**
262
- * Creates a slice of array with n elements dropped from the end.
263
- *
264
- * @param array The array to query.
265
- * @param n The number of elements to drop.
266
- * @return Returns the slice of array.
267
- */
268
- dropRight<T>(array: List<T> | null | undefined, n?: number): T[];
269
- }
270
- interface Collection<T> {
271
- /**
272
- * @see _.dropRight
273
- */
274
- dropRight(n?: number): Collection<T>;
275
- }
276
- interface CollectionChain<T> {
277
- /**
278
- * @see _.dropRight
279
- */
280
- dropRight(n?: number): CollectionChain<T>;
281
- }
282
- interface LoDashStatic {
283
- /**
284
- * Creates a slice of array excluding elements dropped from the end. Elements are dropped until predicate
285
- * returns falsey. The predicate is invoked with three arguments: (value, index, array).
286
- *
287
- * @param array The array to query.
288
- * @param predicate The function invoked per iteration.
289
- * @return Returns the slice of array.
290
- */
291
- dropRightWhile<T>(array: List<T> | null | undefined, predicate?: ListIteratee<T>): T[];
292
- }
293
- interface Collection<T> {
294
- /**
295
- * @see _.dropRightWhile
296
- */
297
- dropRightWhile(predicate?: ListIteratee<T>): Collection<T>;
298
- }
299
- interface CollectionChain<T> {
300
- /**
301
- * @see _.dropRightWhile
302
- */
303
- dropRightWhile(predicate?: ListIteratee<T>): CollectionChain<T>;
304
- }
305
- interface LoDashStatic {
306
- /**
307
- * Creates a slice of array excluding elements dropped from the beginning. Elements are dropped until predicate
308
- * returns falsey. The predicate is invoked with three arguments: (value, index, array).
309
- *
310
- * @param array The array to query.
311
- * @param predicate The function invoked per iteration.
312
- * @return Returns the slice of array.
313
- */
314
- dropWhile<T>(array: List<T> | null | undefined, predicate?: ListIteratee<T>): T[];
315
- }
316
- interface Collection<T> {
317
- /**
318
- * @see _.dropWhile
319
- */
320
- dropWhile(predicate?: ListIteratee<T>): Collection<T>;
321
- }
322
- interface CollectionChain<T> {
323
- /**
324
- * @see _.dropWhile
325
- */
326
- dropWhile(predicate?: ListIteratee<T>): CollectionChain<T>;
327
- }
328
- interface LoDashStatic {
329
- /**
330
- * Fills elements of array with value from start up to, but not including, end.
331
- *
332
- * Note: This method mutates array.
333
- *
334
- * @param array The array to fill.
335
- * @param value The value to fill array with.
336
- * @param start The start position.
337
- * @param end The end position.
338
- * @return Returns array.
339
- */
340
- fill<T>(array: any[] | null | undefined, value: T): T[];
341
- /**
342
- * @see _.fill
343
- */
344
- fill<T>(array: List<any> | null | undefined, value: T): List<T>;
345
- /**
346
- * @see _.fill
347
- */
348
- fill<T, U>(array: U[] | null | undefined, value: T, start?: number, end?: number): Array<T | U>;
349
- /**
350
- * @see _.fill
351
- */
352
- fill<T, U>(array: List<U> | null | undefined, value: T, start?: number, end?: number): List<T | U>;
353
- }
354
- interface Collection<T> {
355
- /**
356
- * @see _.fill
357
- */
358
- fill<U>(value: U, start?: number, end?: number): Collection<T | U>;
359
- }
360
- interface CollectionChain<T> {
361
- /**
362
- * @see _.fill
363
- */
364
- fill<U>(value: U, start?: number, end?: number): CollectionChain<T | U>;
365
- }
366
- interface LoDashStatic {
367
- /**
368
- * This method is like _.find except that it returns the index of the first element predicate returns truthy
369
- * for instead of the element itself.
370
- *
371
- * @param array The array to search.
372
- * @param predicate The function invoked per iteration.
373
- * @param fromIndex The index to search from.
374
- * @return Returns the index of the found element, else -1.
375
- */
376
- findIndex<T>(array: List<T> | null | undefined, predicate?: ListIterateeCustom<T, boolean>, fromIndex?: number): number;
377
- }
378
- interface Collection<T> {
379
- /**
380
- * @see _.findIndex
381
- */
382
- findIndex(predicate?: ListIterateeCustom<T, boolean>, fromIndex?: number): number;
383
- }
384
- interface CollectionChain<T> {
385
- /**
386
- * @see _.findIndex
387
- */
388
- findIndex(predicate?: ListIterateeCustom<T, boolean>, fromIndex?: number): PrimitiveChain<number>;
389
- }
390
- interface LoDashStatic {
391
- /**
392
- * This method is like _.findIndex except that it iterates over elements of collection from right to left.
393
- *
394
- * @param array The array to search.
395
- * @param predicate The function invoked per iteration.
396
- * @param fromIndex The index to search from.
397
- * @return Returns the index of the found element, else -1.
398
- */
399
- findLastIndex<T>(array: List<T> | null | undefined, predicate?: ListIterateeCustom<T, boolean>, fromIndex?: number): number;
400
- }
401
- interface Collection<T> {
402
- /**
403
- * @see _.findLastIndex
404
- */
405
- findLastIndex(predicate?: ListIterateeCustom<T, boolean>, fromIndex?: number): number;
406
- }
407
- interface CollectionChain<T> {
408
- /**
409
- * @see _.findLastIndex
410
- */
411
- findLastIndex(predicate?: ListIterateeCustom<T, boolean>, fromIndex?: number): PrimitiveChain<number>;
412
- }
413
- interface LoDashStatic {
414
- /**
415
- * @see _.head
416
- */
417
- first: LoDashStatic["head"];
418
- }
419
- interface String {
420
- /**
421
- * @see _.first
422
- */
423
- first(): string | undefined;
424
- }
425
- interface StringChain {
426
- /**
427
- * @see _.first
428
- */
429
- first(): StringNullableChain;
430
- }
431
- interface StringNullableChain {
432
- /**
433
- * @see _.first
434
- */
435
- first(): StringNullableChain;
436
- }
437
- interface Collection<T> {
438
- /**
439
- * @see _.first
440
- */
441
- first(): T | undefined;
442
- }
443
- interface CollectionChain<T> {
444
- /**
445
- * @see _.first
446
- */
447
- first(): ExpChain<T | undefined>;
448
- }
449
- interface RecursiveArray<T> extends Array<T|RecursiveArray<T>> {}
450
- interface ListOfRecursiveArraysOrValues<T> extends List<T|RecursiveArray<T>> {}
451
- interface LoDashStatic {
452
- /**
453
- * Flattens `array` a single level deep.
454
- *
455
- * @param array The array to flatten.
456
- * @return Returns the new flattened array.
457
- */
458
- flatten<T>(array: List<Many<T>> | null | undefined): T[];
459
- }
460
- interface String {
461
- /**
462
- * @see _.flatten
463
- */
464
- flatten(): Collection<string>;
465
- }
466
- interface StringChain {
467
- /**
468
- * @see _.flatten
469
- */
470
- flatten(): CollectionChain<string>;
471
- }
472
- interface StringNullableChain {
473
- /**
474
- * @see _.flatten
475
- */
476
- flatten(): CollectionChain<string>;
477
- }
478
- interface Collection<T> {
479
- /**
480
- * @see _.flatten
481
- */
482
- flatten(): T extends Many<infer U> ? Collection<U> : Collection<T>;
483
- }
484
- interface CollectionChain<T> {
485
- /**
486
- * @see _.flatten
487
- */
488
- flatten(): T extends Many<infer U> ? CollectionChain<U> : CollectionChain<T>;
489
- }
490
-
491
- type Flat<T> = T extends string ? T : (T extends List<any> ? never : T);
492
-
493
- interface LoDashStatic {
494
- /**
495
- * Recursively flattens a nested array.
496
- *
497
- * @param array The array to recursively flatten.
498
- * @return Returns the new flattened array.
499
- */
500
- flattenDeep<T>(array: ListOfRecursiveArraysOrValues<T> | null | undefined): Array<Flat<T>>;
501
- }
502
- interface Collection<T> {
503
- /**
504
- * @see _.flattenDeep
505
- */
506
- flattenDeep(): T extends ListOfRecursiveArraysOrValues<infer U> ? Collection<Flat<U>> : Collection<T>;
507
- }
508
- interface CollectionChain<T> {
509
- /**
510
- * @see _.flattenDeep
511
- */
512
- flattenDeep(): T extends ListOfRecursiveArraysOrValues<infer U> ? CollectionChain<Flat<U>> : CollectionChain<T>;
513
- }
514
- interface LoDashStatic {
515
- /**
516
- * Recursively flatten array up to depth times.
517
- *
518
- * @param array The array to recursively flatten.
519
- * @param number The maximum recursion depth.
520
- * @return Returns the new flattened array.
521
- */
522
- flattenDepth<T>(array: ListOfRecursiveArraysOrValues<T> | null | undefined, depth?: number): T[];
523
- }
524
- interface Collection<T> {
525
- /**
526
- * @see _.flattenDepth
527
- */
528
- flattenDepth(depth?: number): Collection<T>;
529
- }
530
- interface CollectionChain<T> {
531
- /**
532
- * @see _.flattenDepth
533
- */
534
- flattenDepth(depth?: number): CollectionChain<T>;
535
- }
536
- interface LoDashStatic {
537
- /**
538
- * The inverse of `_.toPairs`; this method returns an object composed
539
- * from key-value `pairs`.
540
- *
541
- * @category Array
542
- * @param pairs The key-value pairs.
543
- * @returns Returns the new object.
544
- * @example
545
- *
546
- * _.fromPairs([['fred', 30], ['barney', 40]]);
547
- * // => { 'fred': 30, 'barney': 40 }
548
- */
549
- fromPairs<T>(pairs: List<[PropertyName, T]> | null | undefined): Dictionary<T>;
550
- /**
551
- * @see _.fromPairs
552
- */
553
- fromPairs(pairs: List<any[]> | null | undefined): Dictionary<any>;
554
- }
555
- interface Collection<T> {
556
- /**
557
- * @see _.fromPairs
558
- */
559
- fromPairs(): Object<Dictionary<T extends [PropertyName, infer U] ? U : any>>;
560
- }
561
- interface CollectionChain<T> {
562
- /**
563
- * @see _.fromPairs
564
- */
565
- fromPairs(): ObjectChain<Dictionary<T extends [PropertyName, infer U] ? U : any>>;
566
- }
567
- interface LoDashStatic {
568
- /**
569
- * Gets the first element of array.
570
- *
571
- * @alias _.first
572
- *
573
- * @param array The array to query.
574
- * @return Returns the first element of array.
575
- */
576
- head<T>(array: List<T> | null | undefined): T | undefined;
577
- }
578
- interface String {
579
- /**
580
- * @see _.head
581
- */
582
- head(): string | undefined;
583
- }
584
- interface StringChain {
585
- /**
586
- * @see _.head
587
- */
588
- head(): StringNullableChain;
589
- }
590
- interface StringNullableChain {
591
- /**
592
- * @see _.head
593
- */
594
- head(): StringNullableChain;
595
- }
596
- interface Collection<T> {
597
- /**
598
- * @see _.head
599
- */
600
- head(): T | undefined;
601
- }
602
- interface CollectionChain<T> {
603
- /**
604
- * @see _.head
605
- */
606
- head(): ExpChain<T | undefined>;
607
- }
608
- interface LoDashStatic {
609
- /**
610
- * Gets the index at which the first occurrence of `value` is found in `array`
611
- * using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
612
- * for equality comparisons. If `fromIndex` is negative, it's used as the offset
613
- * from the end of `array`.
614
- *
615
- * @category Array
616
- * @param array The array to search.
617
- * @param value The value to search for.
618
- * @param [fromIndex=0] The index to search from.
619
- * @returns Returns the index of the matched value, else `-1`.
620
- * @example
621
- *
622
- * _.indexOf([1, 2, 1, 2], 2);
623
- * // => 1
624
- *
625
- * // using `fromIndex`
626
- * _.indexOf([1, 2, 1, 2], 2, 2);
627
- * // => 3
628
- */
629
- indexOf<T>(array: List<T> | null | undefined, value: T, fromIndex?: number): number;
630
- }
631
- interface Collection<T> {
632
- /**
633
- * @see _.indexOf
634
- */
635
- indexOf(value: T, fromIndex?: number): number;
636
- }
637
- interface CollectionChain<T> {
638
- /**
639
- * @see _.indexOf
640
- */
641
- indexOf(value: T, fromIndex?: number): PrimitiveChain<number>;
642
- }
643
- interface LoDashStatic {
644
- /**
645
- * Gets all but the last element of array.
646
- *
647
- * @param array The array to query.
648
- * @return Returns the slice of array.
649
- */
650
- initial<T>(array: List<T> | null | undefined): T[];
651
- }
652
- interface Collection<T> {
653
- /**
654
- * @see _.initial
655
- */
656
- initial(): Collection<T>;
657
- }
658
- interface CollectionChain<T> {
659
- /**
660
- * @see _.initial
661
- */
662
- initial(): CollectionChain<T>;
663
- }
664
- interface LoDashStatic {
665
- /**
666
- * Creates an array of unique values that are included in all of the provided arrays using SameValueZero for
667
- * equality comparisons.
668
- *
669
- * @param arrays The arrays to inspect.
670
- * @return Returns the new array of shared values.
671
- */
672
- intersection<T>(...arrays: Array<List<T> | null | undefined>): T[];
673
- }
674
- interface Collection<T> {
675
- /**
676
- * @see _.intersection
677
- */
678
- intersection(...arrays: Array<List<T> | null | undefined>): Collection<T>;
679
- }
680
- interface CollectionChain<T> {
681
- /**
682
- * @see _.intersection
683
- */
684
- intersection(...arrays: Array<List<T> | null | undefined>): CollectionChain<T>;
685
- }
686
- interface LoDashStatic {
687
- /**
688
- * This method is like `_.intersection` except that it accepts `iteratee`
689
- * which is invoked for each element of each `arrays` to generate the criterion
690
- * by which uniqueness is computed. The iteratee is invoked with one argument: (value).
691
- *
692
- * @category Array
693
- * @param [arrays] The arrays to inspect.
694
- * @param [iteratee=_.identity] The iteratee invoked per element.
695
- * @returns Returns the new array of shared values.
696
- * @example
697
- *
698
- * _.intersectionBy([2.1, 1.2], [4.3, 2.4], Math.floor);
699
- * // => [2.1]
700
- *
701
- * // using the `_.property` iteratee shorthand
702
- * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
703
- * // => [{ 'x': 1 }]
704
- */
705
- intersectionBy<T1, T2>(array: List<T1> | null, values: List<T2>, iteratee: ValueIteratee<T1 | T2>): T1[];
706
- /**
707
- * @see _.intersectionBy
708
- */
709
- intersectionBy<T1, T2, T3>(array: List<T1> | null, values1: List<T2>, values2: List<T3>, iteratee: ValueIteratee<T1 | T2 | T3>): T1[];
710
- /**
711
- * @see _.intersectionBy
712
- */
713
- intersectionBy<T1, T2, T3, T4>(array: List<T1> | null | undefined, values1: List<T2>, values2: List<T3>, ...values: Array<List<T4> | ValueIteratee<T1 | T2 | T3 | T4>>): T1[];
714
- /**
715
- * @see _.intersectionBy
716
- */
717
- intersectionBy<T>(array?: List<T> | null, ...values: Array<List<T>>): T[];
718
- /**
719
- * @see _.intersectionBy
720
- */
721
- intersectionBy<T>(...values: Array<List<T> | ValueIteratee<T>>): T[];
722
- }
723
- interface Collection<T> {
724
- /**
725
- * @see _.intersectionBy
726
- */
727
- intersectionBy<T2>(values: List<T2>, iteratee: ValueIteratee<T | T2>): Collection<T>;
728
- /**
729
- * @see _.intersectionBy
730
- */
731
- intersectionBy(...values: Array<List<unknown> | ValueIteratee<T>>): Collection<T>;
732
- }
733
- interface CollectionChain<T> {
734
- /**
735
- * @see _.intersectionBy
736
- */
737
- intersectionBy<T2>(values: List<T2>, iteratee: ValueIteratee<T | T2>): CollectionChain<T>;
738
- /**
739
- * @see _.intersectionBy
740
- */
741
- intersectionBy(...values: Array<List<unknown> | ValueIteratee<T>>): CollectionChain<T>;
742
- }
743
- interface LoDashStatic {
744
- /**
745
- * Creates an array of unique `array` values not included in the other
746
- * provided arrays using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
747
- * for equality comparisons.
748
- *
749
- * @category Array
750
- * @param [values] The arrays to inspect.
751
- * @param [comparator] The comparator invoked per element.
752
- * @returns Returns the new array of filtered values.
753
- * @example
754
- *
755
- * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
756
- * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
757
-
758
- * _.intersectionWith(objects, others, _.isEqual);
759
- * // => [{ 'x': 1, 'y': 2 }]
760
- */
761
- intersectionWith<T1, T2>(array: List<T1> | null | undefined, values: List<T2>, comparator: Comparator2<T1, T2>): T1[];
762
- /**
763
- * @see _.intersectionWith
764
- */
765
- intersectionWith<T1, T2, T3>(array: List<T1> | null | undefined, values1: List<T2>, values2: List<T3>, comparator: Comparator2<T1, T2 | T3>): T1[];
766
- /**
767
- * @see _.intersectionWith
768
- */
769
- intersectionWith<T1, T2, T3, T4>(array: List<T1> | null | undefined, values1: List<T2>, values2: List<T3>, ...values: Array<List<T4> | Comparator2<T1, T2 | T3 | T4>>): T1[];
770
- /**
771
- * @see _.intersectionWith
772
- */
773
- intersectionWith<T>(array?: List<T> | null, ...values: Array<List<T> | Comparator2<T, never>>): T[];
774
- }
775
- interface Collection<T> {
776
- /**
777
- * @see _.intersectionWith
778
- */
779
- intersectionWith<T2>(values: List<T2>, comparator: Comparator2<T, T2>): Collection<T>;
780
- /**
781
- * @see _.intersectionWith
782
- */
783
- intersectionWith(...values: Array<List<unknown> | Comparator2<T, never>>): Collection<T>;
784
- }
785
- interface CollectionChain<T> {
786
- /**
787
- * @see _.intersectionWith
788
- */
789
- intersectionWith<T2>(values: List<T2>, comparator: Comparator2<T, T2>): CollectionChain<T>;
790
- /**
791
- * @see _.intersectionWith
792
- */
793
- intersectionWith(...values: Array<List<unknown> | Comparator2<T, never>>): CollectionChain<T>;
794
- }
795
- interface LoDashStatic {
796
- /**
797
- * Converts all elements in `array` into a string separated by `separator`.
798
- *
799
- * @param array The array to convert.
800
- * @param separator The element separator.
801
- * @returns Returns the joined string.
802
- */
803
- join(array: List<any> | null | undefined, separator?: string): string;
804
- }
805
- interface String {
806
- /**
807
- * @see _.join
808
- */
809
- join(separator?: string): string;
810
- }
811
- interface StringChain {
812
- /**
813
- * @see _.join
814
- */
815
- join(separator?: string): StringChain;
816
- }
817
- interface StringNullableChain {
818
- /**
819
- * @see _.join
820
- */
821
- join(separator?: string): StringChain;
822
- }
823
- interface Collection<T> {
824
- /**
825
- * @see _.join
826
- */
827
- join(separator?: string): string;
828
- }
829
- interface CollectionChain<T> {
830
- /**
831
- * @see _.join
832
- */
833
- join(separator?: string): StringChain;
834
- }
835
- interface LoDashStatic {
836
- /**
837
- * Gets the last element of array.
838
- *
839
- * @param array The array to query.
840
- * @return Returns the last element of array.
841
- */
842
- last<T>(array: List<T> | null | undefined): T | undefined;
843
- }
844
- interface Collection<T> {
845
- /**
846
- * @see _.last
847
- */
848
- last(): T | undefined;
849
- }
850
- interface CollectionChain<T> {
851
- /**
852
- * @see _.last
853
- */
854
- last(): ExpChain<T | undefined>;
855
- }
856
- interface String {
857
- /**
858
- * @see _.last
859
- */
860
- last(): string | undefined;
861
- }
862
- interface StringChain {
863
- /**
864
- * @see _.last
865
- */
866
- last(): StringNullableChain;
867
- }
868
- interface StringNullableChain {
869
- /**
870
- * @see _.last
871
- */
872
- last(): StringNullableChain;
873
- }
874
- interface LoDashStatic {
875
- /**
876
- * This method is like _.indexOf except that it iterates over elements of array from right to left.
877
- *
878
- * @param array The array to search.
879
- * @param value The value to search for.
880
- * @param fromIndex The index to search from or true to perform a binary search on a sorted array.
881
- * @return Returns the index of the matched value, else -1.
882
- */
883
- lastIndexOf<T>(array: List<T> | null | undefined, value: T, fromIndex?: true|number): number;
884
- }
885
- interface Collection<T> {
886
- /**
887
- * @see _.lastIndexOf
888
- */
889
- lastIndexOf(value: T, fromIndex?: true|number): number;
890
- }
891
- interface CollectionChain<T> {
892
- /**
893
- * @see _.lastIndexOf
894
- */
895
- lastIndexOf(value: T, fromIndex?: true|number): PrimitiveChain<number>;
896
- }
897
- interface LoDashStatic {
898
- /**
899
- * Gets the element at index `n` of `array`. If `n` is negative, the nth element from the end is returned.
900
- *
901
- * @param array array The array to query.
902
- * @param value The index of the element to return.
903
- * @return Returns the nth element of `array`.
904
- */
905
- nth<T>(array: List<T> | null | undefined, n?: number): T | undefined;
906
- }
907
- interface Collection<T> {
908
- /**
909
- * @see _.nth
910
- */
911
- nth(n?: number): T | undefined;
912
- }
913
- interface CollectionChain<T> {
914
- /**
915
- * @see _.nth
916
- */
917
- nth(n?: number): ExpChain<T | undefined>;
918
- }
919
- interface LoDashStatic {
920
- /**
921
- * Removes all provided values from array using SameValueZero for equality comparisons.
922
- *
923
- * Note: Unlike _.without, this method mutates array.
924
- *
925
- * @param array The array to modify.
926
- * @param values The values to remove.
927
- * @return Returns array.
928
- */
929
- pull<T>(array: T[], ...values: T[]): T[];
930
- /**
931
- * @see _.pull
932
- */
933
- pull<T>(array: List<T>, ...values: T[]): List<T>;
934
- }
935
- interface Collection<T> {
936
- /**
937
- * @see _.pull
938
- */
939
- pull(...values: T[]): Collection<T>;
940
- }
941
- interface CollectionChain<T> {
942
- /**
943
- * @see _.pull
944
- */
945
- pull(...values: T[]): CollectionChain<T>;
946
- }
947
- interface LoDashStatic {
948
- /**
949
- * This method is like `_.pull` except that it accepts an array of values to remove.
950
- *
951
- * **Note:** Unlike `_.difference`, this method mutates `array`.
952
- *
953
- * @category Array
954
- * @param array The array to modify.
955
- * @param values The values to remove.
956
- * @returns Returns `array`.
957
- * @example
958
- *
959
- * var array = [1, 2, 3, 1, 2, 3];
960
- *
961
- * _.pull(array, [2, 3]);
962
- * console.log(array);
963
- * // => [1, 1]
964
- */
965
- pullAll<T>(array: T[], values?: List<T>): T[];
966
- /**
967
- * @see _.pullAll
968
- */
969
- pullAll<T>(array: List<T>, values?: List<T>): List<T>;
970
- }
971
- interface Collection<T> {
972
- /**
973
- * @see _.pullAll
974
- */
975
- pullAll(values?: List<T>): Collection<T>;
976
- }
977
- interface CollectionChain<T> {
978
- /**
979
- * @see _.pullAll
980
- */
981
- pullAll(values?: List<T>): CollectionChain<T>;
982
- }
983
- interface LoDashStatic {
984
- /**
985
- * This method is like `_.pullAll` except that it accepts `iteratee` which is
986
- * invoked for each element of `array` and `values` to to generate the criterion
987
- * by which uniqueness is computed. The iteratee is invoked with one argument: (value).
988
- *
989
- * **Note:** Unlike `_.differenceBy`, this method mutates `array`.
990
- *
991
- * @category Array
992
- * @param array The array to modify.
993
- * @param values The values to remove.
994
- * @param [iteratee=_.identity] The iteratee invoked per element.
995
- * @returns Returns `array`.
996
- * @example
997
- *
998
- * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }];
999
- *
1000
- * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x');
1001
- * console.log(array);
1002
- * // => [{ 'x': 2 }]
1003
- */
1004
- pullAllBy<T>(array: T[], values?: List<T>, iteratee?: ValueIteratee<T>): T[];
1005
- /**
1006
- * @see _.pullAllBy
1007
- */
1008
- pullAllBy<T>(array: List<T>, values?: List<T>, iteratee?: ValueIteratee<T>): List<T>;
1009
- /**
1010
- * @see _.pullAllBy
1011
- */
1012
- pullAllBy<T1, T2>(array: T1[], values: List<T2>, iteratee: ValueIteratee<T1 | T2>): T1[];
1013
- /**
1014
- * @see _.pullAllBy
1015
- */
1016
- pullAllBy<T1, T2>(array: List<T1>, values: List<T2>, iteratee: ValueIteratee<T1 | T2>): List<T1>;
1017
- }
1018
- interface Collection<T> {
1019
- /**
1020
- * @see _.pullAllBy
1021
- */
1022
- pullAllBy<T2>(values?: List<T2>, iteratee?: ValueIteratee<T | T2>): Collection<T>;
1023
- }
1024
- interface CollectionChain<T> {
1025
- /**
1026
- * @see _.pullAllBy
1027
- */
1028
- pullAllBy<T2>(values?: List<T2>, iteratee?: ValueIteratee<T | T2>): CollectionChain<T>;
1029
- }
1030
- interface LoDashStatic {
1031
- /**
1032
- * This method is like `_.pullAll` except that it accepts `comparator` which is
1033
- * invoked to compare elements of array to values. The comparator is invoked with
1034
- * two arguments: (arrVal, othVal).
1035
- *
1036
- * **Note:** Unlike `_.differenceWith`, this method mutates `array`.
1037
- *
1038
- * @category Array
1039
- * @param array The array to modify.
1040
- * @param values The values to remove.
1041
- * @param [iteratee=_.identity] The iteratee invoked per element.
1042
- * @returns Returns `array`.
1043
- * @example
1044
- *
1045
- * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }];
1046
- *
1047
- * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual);
1048
- * console.log(array);
1049
- * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }]
1050
- */
1051
- pullAllWith<T>(array: T[], values?: List<T>, comparator?: Comparator<T>): T[];
1052
- /**
1053
- * @see _.pullAllWith
1054
- */
1055
- pullAllWith<T>(array: List<T>, values?: List<T>, comparator?: Comparator<T>): List<T>;
1056
- /**
1057
- * @see _.pullAllWith
1058
- */
1059
- pullAllWith<T1, T2>(array: T1[], values: List<T2>, comparator: Comparator2<T1, T2>): T1[];
1060
- /**
1061
- * @see _.pullAllWith
1062
- */
1063
- pullAllWith<T1, T2>(array: List<T1>, values: List<T2>, comparator: Comparator2<T1, T2>): List<T1>;
1064
- }
1065
- interface Collection<T> {
1066
- /**
1067
- * @see _.pullAllWith
1068
- */
1069
- pullAllWith<T2>(values?: List<T2>, comparator?: Comparator2<T, T2>): Collection<T>;
1070
- }
1071
- interface CollectionChain<T> {
1072
- /**
1073
- * @see _.pullAllWith
1074
- */
1075
- pullAllWith<T2>(values?: List<T2>, comparator?: Comparator2<T, T2>): CollectionChain<T>;
1076
- }
1077
- interface LoDashStatic {
1078
- /**
1079
- * Removes elements from array corresponding to the given indexes and returns an array of the removed elements.
1080
- * Indexes may be specified as an array of indexes or as individual arguments.
1081
- *
1082
- * Note: Unlike _.at, this method mutates array.
1083
- *
1084
- * @param array The array to modify.
1085
- * @param indexes The indexes of elements to remove, specified as individual indexes or arrays of indexes.
1086
- * @return Returns the new array of removed elements.
1087
- */
1088
- pullAt<T>(array: T[], ...indexes: Array<Many<number>>): T[];
1089
- /**
1090
- * @see _.pullAt
1091
- */
1092
- pullAt<T>(array: List<T>, ...indexes: Array<Many<number>>): List<T>;
1093
- }
1094
- interface Collection<T> {
1095
- /**
1096
- * @see _.pullAt
1097
- */
1098
- pullAt(...indexes: Array<Many<number>>): Collection<T>;
1099
- }
1100
- interface CollectionChain<T> {
1101
- /**
1102
- * @see _.pullAt
1103
- */
1104
- pullAt(...indexes: Array<Many<number>>): CollectionChain<T>;
1105
- }
1106
- interface LoDashStatic {
1107
- /**
1108
- * Removes all elements from array that predicate returns truthy for and returns an array of the removed
1109
- * elements. The predicate is invoked with three arguments: (value, index, array).
1110
- *
1111
- * Note: Unlike _.filter, this method mutates array.
1112
- *
1113
- * @param array The array to modify.
1114
- * @param predicate The function invoked per iteration.
1115
- * @return Returns the new array of removed elements.
1116
- */
1117
- remove<T>(array: List<T>, predicate?: ListIteratee<T>): T[];
1118
- }
1119
- interface Collection<T> {
1120
- /**
1121
- * @see _.remove
1122
- */
1123
- remove(predicate?: ListIteratee<T>): Collection<T>;
1124
- }
1125
- interface CollectionChain<T> {
1126
- /**
1127
- * @see _.remove
1128
- */
1129
- remove(predicate?: ListIteratee<T>): CollectionChain<T>;
1130
- }
1131
- interface LoDashStatic {
1132
- /**
1133
- * Reverses `array` so that the first element becomes the last, the second
1134
- * element becomes the second to last, and so on.
1135
- *
1136
- * **Note:** This method mutates `array` and is based on
1137
- * [`Array#reverse`](https://mdn.io/Array/reverse).
1138
- *
1139
- * @category Array
1140
- * @returns Returns `array`.
1141
- * @example
1142
- *
1143
- * var array = [1, 2, 3];
1144
- *
1145
- * _.reverse(array);
1146
- * // => [3, 2, 1]
1147
- *
1148
- * console.log(array);
1149
- * // => [3, 2, 1]
1150
- */
1151
- reverse<TList extends List<any>>(array: TList): TList;
1152
- }
1153
- interface LoDashStatic {
1154
- /**
1155
- * Creates a slice of array from start up to, but not including, end.
1156
- *
1157
- * @param array The array to slice.
1158
- * @param start The start position.
1159
- * @param end The end position.
1160
- * @return Returns the slice of array.
1161
- */
1162
- slice<T>(array: List<T> | null | undefined, start?: number, end?: number): T[];
1163
- }
1164
- interface Collection<T> {
1165
- /**
1166
- * @see _.slice
1167
- */
1168
- slice(start?: number, end?: number): Collection<T>;
1169
- }
1170
- interface CollectionChain<T> {
1171
- /**
1172
- * @see _.slice
1173
- */
1174
- slice(start?: number, end?: number): CollectionChain<T>;
1175
- }
1176
- interface LoDashStatic {
1177
- /**
1178
- * Uses a binary search to determine the lowest index at which `value` should
1179
- * be inserted into `array` in order to maintain its sort order.
1180
- *
1181
- * @category Array
1182
- * @param array The sorted array to inspect.
1183
- * @param value The value to evaluate.
1184
- * @returns Returns the index at which `value` should be inserted into `array`.
1185
- * @example
1186
- *
1187
- * _.sortedIndex([30, 50], 40);
1188
- * // => 1
1189
- *
1190
- * _.sortedIndex([4, 5], 4);
1191
- * // => 0
1192
- */
1193
- sortedIndex<T>(array: List<T> | null | undefined, value: T): number;
1194
- }
1195
- interface Collection<T> {
1196
- /**
1197
- * @see _.sortedIndex
1198
- */
1199
- sortedIndex(value: T): number;
1200
- }
1201
- interface CollectionChain<T> {
1202
- /**
1203
- * @see _.sortedIndex
1204
- */
1205
- sortedIndex(value: T): PrimitiveChain<number>;
1206
- }
1207
- interface LoDashStatic {
1208
- /**
1209
- * Uses a binary search to determine the lowest index at which `value` should
1210
- * be inserted into `array` in order to maintain its sort order.
1211
- *
1212
- * @category Array
1213
- * @param array The sorted array to inspect.
1214
- * @param value The value to evaluate.
1215
- * @returns Returns the index at which `value` should be inserted into `array`.
1216
- * @example
1217
- *
1218
- * _.sortedIndex([30, 50], 40);
1219
- * // => 1
1220
- *
1221
- * _.sortedIndex([4, 5], 4);
1222
- * // => 0
1223
- */
1224
- sortedIndex<T>(array: List<T> | null | undefined, value: T): number;
1225
- }
1226
- interface Collection<T> {
1227
- /**
1228
- * @see _.sortedIndex
1229
- */
1230
- sortedIndex(value: T): number;
1231
- }
1232
- interface CollectionChain<T> {
1233
- /**
1234
- * @see _.sortedIndex
1235
- */
1236
- sortedIndex(value: T): PrimitiveChain<number>;
1237
- }
1238
- interface LoDashStatic {
1239
- /**
1240
- * This method is like `_.sortedIndex` except that it accepts `iteratee`
1241
- * which is invoked for `value` and each element of `array` to compute their
1242
- * sort ranking. The iteratee is invoked with one argument: (value).
1243
- *
1244
- * @category Array
1245
- * @param array The sorted array to inspect.
1246
- * @param value The value to evaluate.
1247
- * @param [iteratee=_.identity] The iteratee invoked per element.
1248
- * @returns Returns the index at which `value` should be inserted into `array`.
1249
- * @example
1250
- *
1251
- * var dict = { 'thirty': 30, 'forty': 40, 'fifty': 50 };
1252
- *
1253
- * _.sortedIndexBy(['thirty', 'fifty'], 'forty', _.propertyOf(dict));
1254
- * // => 1
1255
- *
1256
- * // using the `_.property` iteratee shorthand
1257
- * _.sortedIndexBy([{ 'x': 4 }, { 'x': 5 }], { 'x': 4 }, 'x');
1258
- * // => 0
1259
- */
1260
- sortedIndexBy<T>(array: List<T> | null | undefined, value: T, iteratee?: ValueIteratee<T>): number;
1261
- }
1262
- interface Collection<T> {
1263
- /**
1264
- * @see _.sortedIndexBy
1265
- */
1266
- sortedIndexBy(value: T, iteratee?: ValueIteratee<T>): number;
1267
- }
1268
- interface CollectionChain<T> {
1269
- /**
1270
- * @see _.sortedIndexBy
1271
- */
1272
- sortedIndexBy(value: T, iteratee?: ValueIteratee<T>): PrimitiveChain<number>;
1273
- }
1274
- interface LoDashStatic {
1275
- /**
1276
- * This method is like `_.indexOf` except that it performs a binary
1277
- * search on a sorted `array`.
1278
- *
1279
- * @category Array
1280
- * @param array The array to search.
1281
- * @param value The value to search for.
1282
- * @returns Returns the index of the matched value, else `-1`.
1283
- * @example
1284
- *
1285
- * _.sortedIndexOf([1, 1, 2, 2], 2);
1286
- * // => 2
1287
- */
1288
- sortedIndexOf<T>(array: List<T> | null | undefined, value: T): number;
1289
- }
1290
- interface Collection<T> {
1291
- /**
1292
- * @see _.sortedIndexOf
1293
- */
1294
- sortedIndexOf(value: T): number;
1295
- }
1296
- interface CollectionChain<T> {
1297
- /**
1298
- * @see _.sortedIndexOf
1299
- */
1300
- sortedIndexOf(value: T): PrimitiveChain<number>;
1301
- }
1302
- interface LoDashStatic {
1303
- /**
1304
- * This method is like `_.sortedIndex` except that it returns the highest
1305
- * index at which `value` should be inserted into `array` in order to
1306
- * maintain its sort order.
1307
- *
1308
- * @category Array
1309
- * @param array The sorted array to inspect.
1310
- * @param value The value to evaluate.
1311
- * @returns Returns the index at which `value` should be inserted into `array`.
1312
- * @example
1313
- *
1314
- * _.sortedLastIndex([4, 5], 4);
1315
- * // => 1
1316
- */
1317
- sortedLastIndex<T>(array: List<T> | null | undefined, value: T): number;
1318
- }
1319
- interface Collection<T> {
1320
- /**
1321
- * @see _.sortedLastIndex
1322
- */
1323
- sortedLastIndex(value: T): number;
1324
- }
1325
- interface CollectionChain<T> {
1326
- /**
1327
- * @see _.sortedLastIndex
1328
- */
1329
- sortedLastIndex(value: T): PrimitiveChain<number>;
1330
- }
1331
- interface LoDashStatic {
1332
- /**
1333
- * This method is like `_.sortedLastIndex` except that it accepts `iteratee`
1334
- * which is invoked for `value` and each element of `array` to compute their
1335
- * sort ranking. The iteratee is invoked with one argument: (value).
1336
- *
1337
- * @category Array
1338
- * @param array The sorted array to inspect.
1339
- * @param value The value to evaluate.
1340
- * @param [iteratee=_.identity] The iteratee invoked per element.
1341
- * @returns Returns the index at which `value` should be inserted into `array`.
1342
- * @example
1343
- *
1344
- * // using the `_.property` iteratee shorthand
1345
- * _.sortedLastIndexBy([{ 'x': 4 }, { 'x': 5 }], { 'x': 4 }, 'x');
1346
- * // => 1
1347
- */
1348
- sortedLastIndexBy<T>(array: List<T> | null | undefined, value: T, iteratee: ValueIteratee<T>): number;
1349
- }
1350
- interface Collection<T> {
1351
- /**
1352
- * @see _.sortedLastIndexBy
1353
- */
1354
- sortedLastIndexBy(value: T, iteratee: ValueIteratee<T>): number;
1355
- }
1356
- interface CollectionChain<T> {
1357
- /**
1358
- * @see _.sortedLastIndexBy
1359
- */
1360
- sortedLastIndexBy(value: T, iteratee: ValueIteratee<T>): PrimitiveChain<number>;
1361
- }
1362
- interface LoDashStatic {
1363
- /**
1364
- * This method is like `_.lastIndexOf` except that it performs a binary
1365
- * search on a sorted `array`.
1366
- *
1367
- * @category Array
1368
- * @param array The array to search.
1369
- * @param value The value to search for.
1370
- * @returns Returns the index of the matched value, else `-1`.
1371
- * @example
1372
- *
1373
- * _.sortedLastIndexOf([1, 1, 2, 2], 2);
1374
- * // => 3
1375
- */
1376
- sortedLastIndexOf<T>(array: List<T> | null | undefined, value: T): number;
1377
- }
1378
- interface Collection<T> {
1379
- /**
1380
- * @see _.sortedLastIndexOf
1381
- */
1382
- sortedLastIndexOf(value: T): number;
1383
- }
1384
- interface CollectionChain<T> {
1385
- /**
1386
- * @see _.sortedLastIndexOf
1387
- */
1388
- sortedLastIndexOf(value: T): PrimitiveChain<number>;
1389
- }
1390
- interface LoDashStatic {
1391
- /**
1392
- * This method is like `_.uniq` except that it's designed and optimized
1393
- * for sorted arrays.
1394
- *
1395
- * @category Array
1396
- * @param array The array to inspect.
1397
- * @returns Returns the new duplicate free array.
1398
- * @example
1399
- *
1400
- * _.sortedUniq([1, 1, 2]);
1401
- * // => [1, 2]
1402
- */
1403
- sortedUniq<T>(array: List<T> | null | undefined): T[];
1404
- }
1405
- interface Collection<T> {
1406
- /**
1407
- * @see _.sortedUniq
1408
- */
1409
- sortedUniq(): Collection<T>;
1410
- }
1411
- interface CollectionChain<T> {
1412
- /**
1413
- * @see _.sortedUniq
1414
- */
1415
- sortedUniq(): CollectionChain<T>;
1416
- }
1417
- interface LoDashStatic {
1418
- /**
1419
- * This method is like `_.uniqBy` except that it's designed and optimized
1420
- * for sorted arrays.
1421
- *
1422
- * @category Array
1423
- * @param array The array to inspect.
1424
- * @param [iteratee] The iteratee invoked per element.
1425
- * @returns Returns the new duplicate free array.
1426
- * @example
1427
- *
1428
- * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor);
1429
- * // => [1.1, 2.3]
1430
- */
1431
- sortedUniqBy<T>(array: List<T> | null | undefined, iteratee: ValueIteratee<T>): T[];
1432
- }
1433
- interface Collection<T> {
1434
- /**
1435
- * @see _.sortedUniqBy
1436
- */
1437
- sortedUniqBy(iteratee: ValueIteratee<T>): Collection<T>;
1438
- }
1439
- interface CollectionChain<T> {
1440
- /**
1441
- * @see _.sortedUniqBy
1442
- */
1443
- sortedUniqBy(iteratee: ValueIteratee<T>): CollectionChain<T>;
1444
- }
1445
- interface LoDashStatic {
1446
- /**
1447
- * Gets all but the first element of array.
1448
- *
1449
- * @param array The array to query.
1450
- * @return Returns the slice of array.
1451
- */
1452
- tail<T>(array: List<T> | null | undefined): T[];
1453
- }
1454
- interface Collection<T> {
1455
- /**
1456
- * @see _.tail
1457
- */
1458
- tail(): Collection<T>;
1459
- }
1460
- interface CollectionChain<T> {
1461
- /**
1462
- * @see _.tail
1463
- */
1464
- tail(): CollectionChain<T>;
1465
- }
1466
- interface LoDashStatic {
1467
- /**
1468
- * Creates a slice of array with n elements taken from the beginning.
1469
- *
1470
- * @param array The array to query.
1471
- * @param n The number of elements to take.
1472
- * @return Returns the slice of array.
1473
- */
1474
- take<T>(array: List<T> | null | undefined, n?: number): T[];
1475
- }
1476
- interface Collection<T> {
1477
- /**
1478
- * @see _.take
1479
- */
1480
- take(n?: number): Collection<T>;
1481
- }
1482
- interface CollectionChain<T> {
1483
- /**
1484
- * @see _.take
1485
- */
1486
- take(n?: number): CollectionChain<T>;
1487
- }
1488
- interface LoDashStatic {
1489
- /**
1490
- * Creates a slice of array with n elements taken from the end.
1491
- *
1492
- * @param array The array to query.
1493
- * @param n The number of elements to take.
1494
- * @return Returns the slice of array.
1495
- */
1496
- takeRight<T>(array: List<T> | null | undefined, n?: number): T[];
1497
- }
1498
- interface Collection<T> {
1499
- /**
1500
- * @see _.takeRight
1501
- */
1502
- takeRight(n?: number): Collection<T>;
1503
- }
1504
- interface CollectionChain<T> {
1505
- /**
1506
- * @see _.takeRight
1507
- */
1508
- takeRight(n?: number): CollectionChain<T>;
1509
- }
1510
- interface LoDashStatic {
1511
- /**
1512
- * Creates a slice of array with elements taken from the end. Elements are taken until predicate returns
1513
- * falsey. The predicate is invoked with three arguments: (value, index, array).
1514
- *
1515
- * @param array The array to query.
1516
- * @param predicate The function invoked per iteration.
1517
- * @return Returns the slice of array.
1518
- */
1519
- takeRightWhile<T>(array: List<T> | null | undefined, predicate?: ListIteratee<T>): T[];
1520
- }
1521
- interface Collection<T> {
1522
- /**
1523
- * @see _.takeRightWhile
1524
- */
1525
- takeRightWhile(predicate?: ListIteratee<T>): Collection<T>;
1526
- }
1527
- interface CollectionChain<T> {
1528
- /**
1529
- * @see _.takeRightWhile
1530
- */
1531
- takeRightWhile(predicate?: ListIteratee<T>): CollectionChain<T>;
1532
- }
1533
- interface LoDashStatic {
1534
- /**
1535
- * Creates a slice of array with elements taken from the beginning. Elements are taken until predicate returns
1536
- * falsey. The predicate is invoked with three arguments: (value, index, array).
1537
- *
1538
- * @param array The array to query.
1539
- * @param predicate The function invoked per iteration.
1540
- * @return Returns the slice of array.
1541
- */
1542
- takeWhile<T>(array: List<T> | null | undefined, predicate?: ListIteratee<T>): T[];
1543
- }
1544
- interface Collection<T> {
1545
- /**
1546
- * @see _.takeWhile
1547
- */
1548
- takeWhile(predicate?: ListIteratee<T>): Collection<T>;
1549
- }
1550
- interface CollectionChain<T> {
1551
- /**
1552
- * @see _.takeWhile
1553
- */
1554
- takeWhile(predicate?: ListIteratee<T>): CollectionChain<T>;
1555
- }
1556
- interface LoDashStatic {
1557
- /**
1558
- * Creates an array of unique values, in order, from all of the provided arrays using SameValueZero for
1559
- * equality comparisons.
1560
- *
1561
- * @param arrays The arrays to inspect.
1562
- * @return Returns the new array of combined values.
1563
- */
1564
- union<T>(...arrays: Array<List<T> | null | undefined>): T[];
1565
- }
1566
- interface Collection<T> {
1567
- /**
1568
- * @see _.union
1569
- */
1570
- union(...arrays: Array<List<T> | null | undefined>): Collection<T>;
1571
- }
1572
- interface CollectionChain<T> {
1573
- /**
1574
- * @see _.union
1575
- */
1576
- union(...arrays: Array<List<T> | null | undefined>): CollectionChain<T>;
1577
- }
1578
- interface LoDashStatic {
1579
- /**
1580
- * This method is like `_.union` except that it accepts `iteratee` which is
1581
- * invoked for each element of each `arrays` to generate the criterion by which
1582
- * uniqueness is computed. The iteratee is invoked with one argument: (value).
1583
- *
1584
- * @param arrays The arrays to inspect.
1585
- * @param iteratee The iteratee invoked per element.
1586
- * @return Returns the new array of combined values.
1587
- */
1588
- unionBy<T>(arrays: List<T> | null | undefined, iteratee?: ValueIteratee<T>): T[];
1589
- /**
1590
- * @see _.unionBy
1591
- */
1592
- unionBy<T>(arrays1: List<T> | null | undefined, arrays2: List<T> | null | undefined, iteratee?: ValueIteratee<T>): T[];
1593
- /**
1594
- * @see _.unionBy
1595
- */
1596
- unionBy<T>(arrays1: List<T> | null | undefined, arrays2: List<T> | null | undefined, arrays3: List<T> | null | undefined, iteratee?: ValueIteratee<T>): T[];
1597
- /**
1598
- * @see _.unionBy
1599
- */
1600
- unionBy<T>(arrays1: List<T> | null | undefined, arrays2: List<T> | null | undefined, arrays3: List<T> | null | undefined, arrays4: List<T> | null | undefined, iteratee?: ValueIteratee<T>): T[];
1601
- /**
1602
- * @see _.unionBy
1603
- */
1604
- unionBy<T>(arrays1: List<T> | null | undefined, arrays2: List<T> | null | undefined, arrays3: List<T> | null | undefined, arrays4: List<T> | null | undefined, arrays5: List<T> | null | undefined, ...iteratee: Array<ValueIteratee<T> | List<T> | null | undefined>): T[];
1605
- }
1606
- interface Collection<T> {
1607
- /**
1608
- * @see _.unionBy
1609
- */
1610
- unionBy(arrays2: List<T> | null | undefined, iteratee?: ValueIteratee<T>): Collection<T>;
1611
- /**
1612
- * @see _.unionBy
1613
- */
1614
- unionBy(...iteratee: Array<ValueIteratee<T> | List<T> | null | undefined>): Collection<T>;
1615
- }
1616
- interface CollectionChain<T> {
1617
- /**
1618
- * @see _.unionBy
1619
- */
1620
- unionBy(arrays2: List<T> | null | undefined, iteratee?: ValueIteratee<T>): CollectionChain<T>;
1621
- /**
1622
- * @see _.unionBy
1623
- */
1624
- unionBy(...iteratee: Array<ValueIteratee<T> | List<T> | null | undefined>): CollectionChain<T>;
1625
- }
1626
- interface LoDashStatic {
1627
- /**
1628
- * This method is like `_.union` except that it accepts `comparator` which
1629
- * is invoked to compare elements of `arrays`. The comparator is invoked
1630
- * with two arguments: (arrVal, othVal).
1631
- *
1632
- * @category Array
1633
- * @param [arrays] The arrays to inspect.
1634
- * @param [comparator] The comparator invoked per element.
1635
- * @returns Returns the new array of combined values.
1636
- * @example
1637
- *
1638
- * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
1639
- * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
1640
- *
1641
- * _.unionWith(objects, others, _.isEqual);
1642
- * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]
1643
- */
1644
- unionWith<T>(arrays: List<T> | null | undefined, comparator?: Comparator<T>): T[];
1645
- /**
1646
- * @see _.unionWith
1647
- */
1648
- unionWith<T>(arrays: List<T> | null | undefined, arrays2: List<T> | null | undefined, comparator?: Comparator<T>): T[];
1649
- /**
1650
- * @see _.unionWith
1651
- */
1652
- unionWith<T>(arrays: List<T> | null | undefined, arrays2: List<T> | null | undefined, arrays3: List<T> | null | undefined, ...comparator: Array<Comparator<T> | List<T> | null | undefined>): T[];
1653
- }
1654
- interface Collection<T> {
1655
- /**
1656
- * @see _.unionWith
1657
- */
1658
- unionWith(arrays2: List<T> | null | undefined, comparator?: Comparator<T>): Collection<T>;
1659
- /**
1660
- * @see _.unionWith
1661
- */
1662
- unionWith(...comparator: Array<Comparator<T> | List<T> | null | undefined>): Collection<T>;
1663
- }
1664
- interface CollectionChain<T> {
1665
- /**
1666
- * @see _.unionWith
1667
- */
1668
- unionWith(arrays2: List<T> | null | undefined, comparator?: Comparator<T>): CollectionChain<T>;
1669
- /**
1670
- * @see _.unionWith
1671
- */
1672
- unionWith(...comparator: Array<Comparator<T> | List<T> | null | undefined>): CollectionChain<T>;
1673
- }
1674
- interface LoDashStatic {
1675
- /**
1676
- * Creates a duplicate-free version of an array, using
1677
- * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
1678
- * for equality comparisons, in which only the first occurrence of each element
1679
- * is kept.
1680
- *
1681
- * @category Array
1682
- * @param array The array to inspect.
1683
- * @returns Returns the new duplicate free array.
1684
- * @example
1685
- *
1686
- * _.uniq([2, 1, 2]);
1687
- * // => [2, 1]
1688
- */
1689
- uniq<T>(array: List<T> | null | undefined): T[];
1690
- }
1691
- interface Collection<T> {
1692
- /**
1693
- * @see _.uniq
1694
- */
1695
- uniq(): Collection<T>;
1696
- }
1697
- interface CollectionChain<T> {
1698
- /**
1699
- * @see _.uniq
1700
- */
1701
- uniq(): CollectionChain<T>;
1702
- }
1703
- interface LoDashStatic {
1704
- /**
1705
- * This method is like `_.uniq` except that it accepts `iteratee` which is
1706
- * invoked for each element in `array` to generate the criterion by which
1707
- * uniqueness is computed. The iteratee is invoked with one argument: (value).
1708
- *
1709
- * @category Array
1710
- * @param array The array to inspect.
1711
- * @param [iteratee=_.identity] The iteratee invoked per element.
1712
- * @returns Returns the new duplicate free array.
1713
- * @example
1714
- *
1715
- * _.uniqBy([2.1, 1.2, 2.3], Math.floor);
1716
- * // => [2.1, 1.2]
1717
- *
1718
- * // using the `_.property` iteratee shorthand
1719
- * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');
1720
- * // => [{ 'x': 1 }, { 'x': 2 }]
1721
- */
1722
- uniqBy<T>(array: List<T> | null | undefined, iteratee: ValueIteratee<T>): T[];
1723
- }
1724
- interface Collection<T> {
1725
- /**
1726
- * @see _.uniqBy
1727
- */
1728
- uniqBy(iteratee: ValueIteratee<T>): Collection<T>;
1729
- }
1730
- interface CollectionChain<T> {
1731
- /**
1732
- * @see _.uniqBy
1733
- */
1734
- uniqBy(iteratee: ValueIteratee<T>): CollectionChain<T>;
1735
- }
1736
- interface LoDashStatic {
1737
- /**
1738
- * This method is like `_.uniq` except that it accepts `comparator` which
1739
- * is invoked to compare elements of `array`. The comparator is invoked with
1740
- * two arguments: (arrVal, othVal).
1741
- *
1742
- * @category Array
1743
- * @param array The array to inspect.
1744
- * @param [comparator] The comparator invoked per element.
1745
- * @returns Returns the new duplicate free array.
1746
- * @example
1747
- *
1748
- * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }];
1749
- *
1750
- * _.uniqWith(objects, _.isEqual);
1751
- * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]
1752
- */
1753
- uniqWith<T>(array: List<T> | null | undefined, comparator?: Comparator<T>): T[];
1754
- }
1755
- interface Collection<T> {
1756
- /**
1757
- * @see _.uniqWith
1758
- */
1759
- uniqWith(comparator?: Comparator<T>): Collection<T>;
1760
- }
1761
- interface CollectionChain<T> {
1762
- /**
1763
- * @see _.uniqWith
1764
- */
1765
- uniqWith(comparator?: Comparator<T>): CollectionChain<T>;
1766
- }
1767
- interface LoDashStatic {
1768
- /**
1769
- * This method is like _.zip except that it accepts an array of grouped elements and creates an array
1770
- * regrouping the elements to their pre-zip configuration.
1771
- *
1772
- * @param array The array of grouped elements to process.
1773
- * @return Returns the new array of regrouped elements.
1774
- */
1775
- unzip<T>(array: T[][] | List<List<T>> | null | undefined): T[][];
1776
- }
1777
- interface Collection<T> {
1778
- /**
1779
- * @see _.unzip
1780
- */
1781
- unzip(): T extends List<infer U> ? Collection<U[]> : unknown;
1782
- }
1783
- interface CollectionChain<T> {
1784
- /**
1785
- * @see _.unzip
1786
- */
1787
- unzip(): T extends List<infer U> ? CollectionChain<U[]> : unknown;
1788
- }
1789
- interface LoDashStatic {
1790
- /**
1791
- * This method is like _.unzip except that it accepts an iteratee to specify how regrouped values should be
1792
- * combined. The iteratee is invoked with four arguments: (accumulator, value, index, group).
1793
- *
1794
- * @param array The array of grouped elements to process.
1795
- * @param iteratee The function to combine regrouped values.
1796
- * @return Returns the new array of regrouped elements.
1797
- */
1798
- unzipWith<T, TResult>(array: List<List<T>> | null | undefined, iteratee: (...values: T[]) => TResult): TResult[];
1799
- /**
1800
- * @see _.unzipWith
1801
- */
1802
- unzipWith<T>(array: List<List<T>> | null | undefined): T[][];
1803
- }
1804
- interface Collection<T> {
1805
- /**
1806
- * @see _.unzipWith
1807
- */
1808
- unzipWith<TResult>(iteratee: (...values: Array<T extends List<infer U> ? U : unknown>) => TResult): Collection<TResult>;
1809
- /**
1810
- * @see _.unzipWith
1811
- */
1812
- unzipWith(): T extends List<infer U> ? Collection<U[]> : unknown;
1813
- }
1814
- interface CollectionChain<T> {
1815
- /**
1816
- * @see _.unzipWith
1817
- */
1818
- unzipWith<TResult>(iteratee: (...values: Array<T extends List<infer U> ? U : unknown>) => TResult): CollectionChain<TResult>;
1819
- /**
1820
- * @see _.unzipWith
1821
- */
1822
- unzipWith(): T extends List<infer U> ? CollectionChain<U[]> : unknown;
1823
- }
1824
- interface LoDashStatic {
1825
- /**
1826
- * Creates an array excluding all provided values using SameValueZero for equality comparisons.
1827
- *
1828
- * @param array The array to filter.
1829
- * @param values The values to exclude.
1830
- * @return Returns the new array of filtered values.
1831
- */
1832
- without<T>(array: List<T> | null | undefined, ...values: T[]): T[];
1833
- }
1834
- interface Collection<T> {
1835
- /**
1836
- * @see _.without
1837
- */
1838
- without(...values: T[]): Collection<T>;
1839
- }
1840
- interface CollectionChain<T> {
1841
- /**
1842
- * @see _.without
1843
- */
1844
- without(...values: T[]): CollectionChain<T>;
1845
- }
1846
- interface LoDashStatic {
1847
- /**
1848
- * Creates an array of unique values that is the symmetric difference of the provided arrays.
1849
- *
1850
- * @param arrays The arrays to inspect.
1851
- * @return Returns the new array of values.
1852
- */
1853
- xor<T>(...arrays: Array<List<T> | null | undefined>): T[];
1854
- }
1855
- interface Collection<T> {
1856
- /**
1857
- * @see _.xor
1858
- */
1859
- xor(...arrays: Array<List<T> | null | undefined>): Collection<T>;
1860
- }
1861
- interface CollectionChain<T> {
1862
- /**
1863
- * @see _.xor
1864
- */
1865
- xor(...arrays: Array<List<T> | null | undefined>): CollectionChain<T>;
1866
- }
1867
- interface LoDashStatic {
1868
- /**
1869
- * This method is like `_.xor` except that it accepts `iteratee` which is
1870
- * invoked for each element of each `arrays` to generate the criterion by which
1871
- * uniqueness is computed. The iteratee is invoked with one argument: (value).
1872
- *
1873
- * @category Array
1874
- * @param [arrays] The arrays to inspect.
1875
- * @param [iteratee=_.identity] The iteratee invoked per element.
1876
- * @returns Returns the new array of values.
1877
- * @example
1878
- *
1879
- * _.xorBy([2.1, 1.2], [4.3, 2.4], Math.floor);
1880
- * // => [1.2, 4.3]
1881
- *
1882
- * // using the `_.property` iteratee shorthand
1883
- * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
1884
- * // => [{ 'x': 2 }]
1885
- */
1886
- xorBy<T>(arrays: List<T> | null | undefined, iteratee?: ValueIteratee<T>): T[];
1887
- /**
1888
- * @see _.xorBy
1889
- */
1890
- xorBy<T>(arrays: List<T> | null | undefined, arrays2: List<T> | null | undefined, iteratee?: ValueIteratee<T>): T[];
1891
- /**
1892
- * @see _.xorBy
1893
- */
1894
- xorBy<T>(arrays: List<T> | null | undefined, arrays2: List<T> | null | undefined, arrays3: List<T> | null | undefined, ...iteratee: Array<ValueIteratee<T> | List<T> | null | undefined>): T[];
1895
- }
1896
- interface Collection<T> {
1897
- /**
1898
- * @see _.xorBy
1899
- */
1900
- xorBy(arrays2: List<T> | null | undefined, iteratee?: ValueIteratee<T>): Collection<T>;
1901
- /**
1902
- * @see _.xorBy
1903
- */
1904
- xorBy(...iteratee: Array<ValueIteratee<T> | List<T> | null | undefined>): Collection<T>;
1905
- }
1906
- interface CollectionChain<T> {
1907
- /**
1908
- * @see _.xorBy
1909
- */
1910
- xorBy(arrays2: List<T> | null | undefined, iteratee?: ValueIteratee<T>): CollectionChain<T>;
1911
- /**
1912
- * @see _.xorBy
1913
- */
1914
- xorBy(...iteratee: Array<ValueIteratee<T> | List<T> | null | undefined>): CollectionChain<T>;
1915
- }
1916
- interface LoDashStatic {
1917
- /**
1918
- * This method is like `_.xor` except that it accepts `comparator` which is
1919
- * invoked to compare elements of `arrays`. The comparator is invoked with
1920
- * two arguments: (arrVal, othVal).
1921
- *
1922
- * @category Array
1923
- * @param [arrays] The arrays to inspect.
1924
- * @param [comparator] The comparator invoked per element.
1925
- * @returns Returns the new array of values.
1926
- * @example
1927
- *
1928
- * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
1929
- * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
1930
- *
1931
- * _.xorWith(objects, others, _.isEqual);
1932
- * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]
1933
- */
1934
- xorWith<T>(arrays: List<T> | null | undefined, comparator?: Comparator<T>): T[];
1935
- /**
1936
- * @see _.xorWith
1937
- */
1938
- xorWith<T>(arrays: List<T> | null | undefined, arrays2: List<T> | null | undefined, comparator?: Comparator<T>): T[];
1939
- /**
1940
- * @see _.xorWith
1941
- */
1942
- xorWith<T>(arrays: List<T> | null | undefined, arrays2: List<T> | null | undefined, arrays3: List<T> | null | undefined, ...comparator: Array<Comparator<T> | List<T> | null | undefined>): T[];
1943
- }
1944
- interface Collection<T> {
1945
- /**
1946
- * @see _.xorWith
1947
- */
1948
- xorWith(arrays2: List<T> | null | undefined, comparator?: Comparator<T>): Collection<T>;
1949
- /**
1950
- * @see _.xorWith
1951
- */
1952
- xorWith(...comparator: Array<Comparator<T> | List<T> | null | undefined>): Collection<T>;
1953
- }
1954
- interface CollectionChain<T> {
1955
- /**
1956
- * @see _.xorWith
1957
- */
1958
- xorWith(arrays2: List<T> | null | undefined, comparator?: Comparator<T>): CollectionChain<T>;
1959
- /**
1960
- * @see _.xorWith
1961
- */
1962
- xorWith(...comparator: Array<Comparator<T> | List<T> | null | undefined>): CollectionChain<T>;
1963
- }
1964
- interface LoDashStatic {
1965
- /**
1966
- * Creates an array of grouped elements, the first of which contains the first elements of the given arrays,
1967
- * the second of which contains the second elements of the given arrays, and so on.
1968
- *
1969
- * @param arrays The arrays to process.
1970
- * @return Returns the new array of grouped elements.
1971
- */
1972
- zip<T1, T2>(arrays1: List<T1>, arrays2: List<T2>): Array<[T1 | undefined, T2 | undefined]>;
1973
- /**
1974
- * @see _.zip
1975
- */
1976
- zip<T1, T2, T3>(arrays1: List<T1>, arrays2: List<T2>, arrays3: List<T3>): Array<[T1 | undefined, T2 | undefined, T3 | undefined]>;
1977
- /**
1978
- * @see _.zip
1979
- */
1980
- zip<T1, T2, T3, T4>(arrays1: List<T1>, arrays2: List<T2>, arrays3: List<T3>, arrays4: List<T4>): Array<[T1 | undefined, T2 | undefined, T3 | undefined, T4 | undefined]>;
1981
- /**
1982
- * @see _.zip
1983
- */
1984
- zip<T1, T2, T3, T4, T5>(arrays1: List<T1>, arrays2: List<T2>, arrays3: List<T3>, arrays4: List<T4>, arrays5: List<T5>): Array<[T1 | undefined, T2 | undefined, T3 | undefined, T4 | undefined, T5 | undefined]>;
1985
- /**
1986
- * @see _.zip
1987
- */
1988
- zip<T>(...arrays: Array<List<T> | null | undefined>): Array<Array<T | undefined>>;
1989
- }
1990
- interface Collection<T> {
1991
- /**
1992
- * @see _.zip
1993
- */
1994
- zip<T2>(arrays2: List<T2>): Collection<[T | undefined, T2 | undefined]>;
1995
- /**
1996
- * @see _.zip
1997
- */
1998
- zip(...arrays: Array<List<T> | null | undefined>): Collection<Array<T | undefined>>;
1999
- }
2000
- interface CollectionChain<T> {
2001
- /**
2002
- * @see _.zip
2003
- */
2004
- zip<T2>(arrays2: List<T2>): CollectionChain<[T | undefined, T2 | undefined]>;
2005
- /**
2006
- * @see _.zip
2007
- */
2008
- zip(...arrays: Array<List<T> | null | undefined>): CollectionChain<Array<T | undefined>>;
2009
- }
2010
- interface LoDashStatic {
2011
- /**
2012
- * This method is like _.fromPairs except that it accepts two arrays, one of property
2013
- * identifiers and one of corresponding values.
2014
- *
2015
- * @param props The property names.
2016
- * @param values The property values.
2017
- * @return Returns the new object.
2018
- */
2019
- zipObject<T>(props: List<PropertyName>, values: List<T>): Dictionary<T>;
2020
- /**
2021
- * @see _.zipObject
2022
- */
2023
- zipObject(props?: List<PropertyName>): Dictionary<undefined>;
2024
- }
2025
- interface Collection<T> {
2026
- /**
2027
- * @see _.zipObject
2028
- */
2029
- zipObject<U>(values: List<U>): Object<Dictionary<U>>;
2030
- /**
2031
- * @see _.zipObject
2032
- */
2033
- zipObject(): Object<Dictionary<undefined>>;
2034
- }
2035
- interface CollectionChain<T> {
2036
- /**
2037
- * @see _.zipObject
2038
- */
2039
- zipObject<U>(values: List<U>): ObjectChain<Dictionary<U>>;
2040
- /**
2041
- * @see _.zipObject
2042
- */
2043
- zipObject(): ObjectChain<Dictionary<undefined>>;
2044
- }
2045
- interface LoDashStatic {
2046
- /**
2047
- * This method is like _.zipObject except that it supports property paths.
2048
- *
2049
- * @param paths The property names.
2050
- * @param values The property values.
2051
- * @return Returns the new object.
2052
- */
2053
- zipObjectDeep(paths?: List<PropertyPath>, values?: List<any>): object;
2054
- }
2055
- interface Collection<T> {
2056
- /**
2057
- * @see _.zipObjectDeep
2058
- */
2059
- zipObjectDeep(values?: List<any>): Object<object>;
2060
- }
2061
- interface CollectionChain<T> {
2062
- /**
2063
- * @see _.zipObjectDeep
2064
- */
2065
- zipObjectDeep(values?: List<any>): ObjectChain<object>;
2066
- }
2067
- interface LoDashStatic {
2068
- /**
2069
- * This method is like _.zip except that it accepts an iteratee to specify how grouped values should be
2070
- * combined. The iteratee is invoked with four arguments: (accumulator, value, index,
2071
- * group).
2072
- * @param arrays The arrays to process.
2073
- * @param iteratee The function to combine grouped values.
2074
- * @return Returns the new array of grouped elements.
2075
- */
2076
- zipWith<T, TResult>(arrays: List<T>, iteratee: (value1: T) => TResult): TResult[];
2077
- /**
2078
- * @see _.zipWith
2079
- */
2080
- zipWith<T1, T2, TResult>(arrays1: List<T1>, arrays2: List<T2>, iteratee: (value1: T1, value2: T2) => TResult): TResult[];
2081
- /**
2082
- * @see _.zipWith
2083
- */
2084
- zipWith<T1, T2, T3, TResult>(arrays1: List<T1>, arrays2: List<T2>, arrays3: List<T3>, iteratee: (value1: T1, value2: T2, value3: T3) => TResult): TResult[];
2085
- /**
2086
- * @see _.zipWith
2087
- */
2088
- zipWith<T1, T2, T3, T4, TResult>(arrays1: List<T1>, arrays2: List<T2>, arrays3: List<T3>, arrays4: List<T4>, iteratee: (value1: T1, value2: T2, value3: T3, value4: T4) => TResult): TResult[];
2089
- /**
2090
- * @see _.zipWith
2091
- */
2092
- zipWith<T1, T2, T3, T4, T5, TResult>(arrays1: List<T1>, arrays2: List<T2>, arrays3: List<T3>, arrays4: List<T4>, arrays5: List<T5>, iteratee: (value1: T1, value2: T2, value3: T3, value4: T4, value5: T5) => TResult): TResult[];
2093
- /**
2094
- * @see _.zipWith
2095
- */
2096
- zipWith<T, TResult>(...iteratee: Array<((...group: T[]) => TResult) | List<T> | null | undefined>): TResult[];
2097
- }
2098
- interface Collection<T> {
2099
- /**
2100
- * @see _.zipWith
2101
- */
2102
- zipWith<T2, TResult>(arrays2: List<T2>, iteratee: (value1: T, value2: T2) => TResult): Collection<TResult>;
2103
- /**
2104
- * @see _.zipWith
2105
- */
2106
- zipWith<T2, T3, TResult>(arrays2: List<T2>, arrays3: List<T3>, iteratee: (value1: T, value2: T2, value3: T3) => TResult): Collection<TResult>;
2107
- /**
2108
- * @see _.zipWith
2109
- */
2110
- zipWith<TResult>(...iteratee: Array<((...group: T[]) => TResult) | List<T> | null | undefined>): Collection<TResult>;
2111
- }
2112
- interface CollectionChain<T> {
2113
- /**
2114
- * @see _.zipWith
2115
- */
2116
- zipWith<T2, TResult>(arrays2: List<T2>, iteratee: (value1: T, value2: T2) => TResult): CollectionChain<TResult>;
2117
- /**
2118
- * @see _.zipWith
2119
- */
2120
- zipWith<T2, T3, TResult>(arrays2: List<T2>, arrays3: List<T3>, iteratee: (value1: T, value2: T2, value3: T3) => TResult): CollectionChain<TResult>;
2121
- /**
2122
- * @see _.zipWith
2123
- */
2124
- zipWith<TResult>(...iteratee: Array<((...group: T[]) => TResult) | List<T> | null | undefined>): CollectionChain<TResult>;
2125
- }
2126
- }