@umijs/utils 3.5.17 → 4.0.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (208) hide show
  1. package/README.md +2 -0
  2. package/compiled/address/index.js +1 -0
  3. package/compiled/address/lib/address.d.ts +28 -0
  4. package/compiled/address/package.json +1 -0
  5. package/compiled/axios/LICENSE +19 -0
  6. package/compiled/axios/index.d.ts +206 -0
  7. package/compiled/axios/index.js +1 -0
  8. package/compiled/axios/package.json +1 -0
  9. package/compiled/chalk/LICENSE +9 -0
  10. package/compiled/chalk/index.d.ts +415 -0
  11. package/compiled/chalk/index.js +1 -0
  12. package/compiled/chalk/package.json +1 -0
  13. package/compiled/cheerio/LICENSE +21 -0
  14. package/compiled/cheerio/domelementtype/lib/index.d.ts +48 -0
  15. package/compiled/cheerio/domhandler/lib/index.d.ts +85 -0
  16. package/compiled/cheerio/domhandler/lib/node.d.ts +169 -0
  17. package/compiled/cheerio/htmlparser2/lib/Parser.d.ts +159 -0
  18. package/compiled/cheerio/htmlparser2/lib/Tokenizer.d.ts +182 -0
  19. package/compiled/cheerio/htmlparser2/lib/index.d.ts +39 -0
  20. package/compiled/cheerio/index.js +16 -0
  21. package/compiled/cheerio/lib/api/attributes.d.ts +317 -0
  22. package/compiled/cheerio/lib/api/css.d.ts +41 -0
  23. package/compiled/cheerio/lib/api/forms.d.ts +31 -0
  24. package/compiled/cheerio/lib/api/manipulation.d.ts +496 -0
  25. package/compiled/cheerio/lib/api/traversing.d.ts +644 -0
  26. package/compiled/cheerio/lib/cheerio.d.ts +53 -0
  27. package/compiled/cheerio/lib/index.d.ts +91 -0
  28. package/compiled/cheerio/lib/load.d.ts +73 -0
  29. package/compiled/cheerio/lib/options.d.ts +31 -0
  30. package/compiled/cheerio/lib/static.d.ts +88 -0
  31. package/compiled/cheerio/lib/types.d.ts +20 -0
  32. package/compiled/cheerio/package.json +1 -0
  33. package/compiled/color/LICENSE +21 -0
  34. package/compiled/color/color-convert/conversions.d.ts +149 -0
  35. package/compiled/color/color-convert/index.d.ts +113 -0
  36. package/compiled/color/color-convert/route.d.ts +294 -0
  37. package/compiled/color/color-name/index.d.ts +161 -0
  38. package/compiled/color/index.d.ts +142 -0
  39. package/compiled/color/index.js +1 -0
  40. package/compiled/color/package.json +4 -0
  41. package/compiled/cross-spawn/LICENSE +21 -0
  42. package/compiled/cross-spawn/index.d.ts +36 -0
  43. package/compiled/cross-spawn/index.js +1 -0
  44. package/compiled/cross-spawn/package.json +1 -0
  45. package/compiled/debug/LICENSE +19 -0
  46. package/compiled/debug/index.d.ts +54 -0
  47. package/compiled/debug/index.js +1 -0
  48. package/compiled/debug/ms/index.d.ts +25 -0
  49. package/compiled/debug/package.json +1 -0
  50. package/compiled/fs-extra/LICENSE +15 -0
  51. package/compiled/fs-extra/index.d.ts +332 -0
  52. package/compiled/fs-extra/index.js +1 -0
  53. package/compiled/fs-extra/package.json +1 -0
  54. package/compiled/glob/LICENSE +21 -0
  55. package/compiled/glob/index.d.ts +89 -0
  56. package/compiled/glob/index.js +1 -0
  57. package/compiled/glob/minimatch/index.d.ts +204 -0
  58. package/compiled/glob/package.json +1 -0
  59. package/compiled/import-lazy/LICENSE +9 -0
  60. package/compiled/import-lazy/index.d.ts +26 -0
  61. package/compiled/import-lazy/index.js +1 -0
  62. package/compiled/import-lazy/package.json +1 -0
  63. package/compiled/lodash/LICENSE +47 -0
  64. package/compiled/lodash/common/array.d.ts +2126 -0
  65. package/compiled/lodash/common/collection.d.ts +1930 -0
  66. package/compiled/lodash/common/common.d.ts +280 -0
  67. package/compiled/lodash/common/date.d.ts +23 -0
  68. package/compiled/lodash/common/function.d.ts +1430 -0
  69. package/compiled/lodash/common/lang.d.ts +1692 -0
  70. package/compiled/lodash/common/math.d.ts +405 -0
  71. package/compiled/lodash/common/number.d.ts +131 -0
  72. package/compiled/lodash/common/object.d.ts +2519 -0
  73. package/compiled/lodash/common/seq.d.ts +210 -0
  74. package/compiled/lodash/common/string.d.ts +788 -0
  75. package/compiled/lodash/common/util.d.ts +1219 -0
  76. package/compiled/lodash/index.d.ts +46 -0
  77. package/compiled/lodash/index.js +9 -0
  78. package/compiled/lodash/package.json +1 -0
  79. package/compiled/mustache/LICENSE +11 -0
  80. package/compiled/mustache/index.d.ts +437 -0
  81. package/compiled/mustache/index.js +5 -0
  82. package/compiled/mustache/package.json +1 -0
  83. package/compiled/pkg-up/LICENSE +9 -0
  84. package/compiled/pkg-up/index.d.ts +48 -0
  85. package/compiled/pkg-up/index.js +1 -0
  86. package/compiled/pkg-up/package.json +1 -0
  87. package/compiled/portfinder/LICENSE +22 -0
  88. package/compiled/portfinder/index.js +1 -0
  89. package/compiled/portfinder/lib/portfinder.d.ts +47 -0
  90. package/compiled/portfinder/package.json +1 -0
  91. package/compiled/prettier/LICENSE +7 -0
  92. package/compiled/prettier/index.d.ts +867 -0
  93. package/compiled/prettier/index.js +475 -0
  94. package/compiled/prettier/package.json +5 -0
  95. package/compiled/prompts/LICENSE +21 -0
  96. package/compiled/prompts/index.d.ts +120 -0
  97. package/compiled/prompts/index.js +1 -0
  98. package/compiled/prompts/package.json +1 -0
  99. package/compiled/resolve/LICENSE +21 -0
  100. package/compiled/resolve/index.d.ts +166 -0
  101. package/compiled/resolve/index.js +1 -0
  102. package/compiled/resolve/package.json +1 -0
  103. package/compiled/rimraf/LICENSE +15 -0
  104. package/compiled/rimraf/glob/index.d.ts +89 -0
  105. package/compiled/rimraf/index.d.ts +49 -0
  106. package/compiled/rimraf/index.js +1 -0
  107. package/compiled/rimraf/minimatch/index.d.ts +204 -0
  108. package/compiled/rimraf/package.json +1 -0
  109. package/compiled/semver/LICENSE +15 -0
  110. package/compiled/semver/classes/comparator.d.ts +17 -0
  111. package/compiled/semver/classes/range.d.ts +21 -0
  112. package/compiled/semver/classes/semver.d.ts +62 -0
  113. package/compiled/semver/functions/clean.d.ts +8 -0
  114. package/compiled/semver/functions/cmp.d.ts +16 -0
  115. package/compiled/semver/functions/coerce.d.ts +12 -0
  116. package/compiled/semver/functions/compare-build.d.ts +16 -0
  117. package/compiled/semver/functions/compare-loose.d.ts +5 -0
  118. package/compiled/semver/functions/compare.d.ts +20 -0
  119. package/compiled/semver/functions/diff.d.ts +13 -0
  120. package/compiled/semver/functions/eq.d.ts +9 -0
  121. package/compiled/semver/functions/gt.d.ts +9 -0
  122. package/compiled/semver/functions/gte.d.ts +9 -0
  123. package/compiled/semver/functions/inc.d.ts +15 -0
  124. package/compiled/semver/functions/lt.d.ts +9 -0
  125. package/compiled/semver/functions/lte.d.ts +8 -0
  126. package/compiled/semver/functions/major.d.ts +9 -0
  127. package/compiled/semver/functions/minor.d.ts +9 -0
  128. package/compiled/semver/functions/neq.d.ts +9 -0
  129. package/compiled/semver/functions/parse.d.ts +12 -0
  130. package/compiled/semver/functions/patch.d.ts +9 -0
  131. package/compiled/semver/functions/prerelease.d.ts +12 -0
  132. package/compiled/semver/functions/rcompare.d.ts +15 -0
  133. package/compiled/semver/functions/rsort.d.ts +9 -0
  134. package/compiled/semver/functions/satisfies.d.ts +14 -0
  135. package/compiled/semver/functions/sort.d.ts +9 -0
  136. package/compiled/semver/functions/valid.d.ts +11 -0
  137. package/compiled/semver/index.d.ts +133 -0
  138. package/compiled/semver/index.js +1 -0
  139. package/compiled/semver/internals/identifiers.d.ts +13 -0
  140. package/compiled/semver/package.json +1 -0
  141. package/compiled/semver/ranges/gtr.d.ts +14 -0
  142. package/compiled/semver/ranges/intersects.d.ts +13 -0
  143. package/compiled/semver/ranges/ltr.d.ts +14 -0
  144. package/compiled/semver/ranges/max-satisfying.d.ts +14 -0
  145. package/compiled/semver/ranges/min-satisfying.d.ts +14 -0
  146. package/compiled/semver/ranges/min-version.d.ts +10 -0
  147. package/compiled/semver/ranges/outside.d.ts +15 -0
  148. package/compiled/semver/ranges/simplify.d.ts +14 -0
  149. package/compiled/semver/ranges/subset.d.ts +13 -0
  150. package/compiled/semver/ranges/to-comparators.d.ts +9 -0
  151. package/compiled/semver/ranges/valid.d.ts +12 -0
  152. package/compiled/strip-ansi/LICENSE +9 -0
  153. package/compiled/strip-ansi/index.d.ts +17 -0
  154. package/compiled/strip-ansi/index.js +1 -0
  155. package/compiled/strip-ansi/package.json +1 -0
  156. package/compiled/yargs-parser/index.d.ts +112 -0
  157. package/compiled/yargs-parser/index.js +1 -0
  158. package/compiled/yargs-parser/package.json +1 -0
  159. package/dist/BaseGenerator/BaseGenerator.d.ts +18 -0
  160. package/dist/BaseGenerator/BaseGenerator.js +58 -0
  161. package/{lib → dist}/Generator/Generator.d.ts +3 -3
  162. package/dist/Generator/Generator.js +74 -0
  163. package/dist/importLazy.d.ts +6 -0
  164. package/dist/importLazy.js +17 -0
  165. package/dist/index.d.ts +28 -0
  166. package/dist/index.js +79 -0
  167. package/dist/logger.d.ts +14 -0
  168. package/dist/logger.js +39 -0
  169. package/dist/randomColor/randomColor.d.ts +6 -0
  170. package/dist/randomColor/randomColor.js +19 -0
  171. package/dist/register.d.ts +6 -0
  172. package/dist/register.js +47 -0
  173. package/dist/winPath.d.ts +1 -0
  174. package/dist/winPath.js +11 -0
  175. package/package.json +92 -12
  176. package/lib/BabelRegister/BabelRegister.d.ts +0 -9
  177. package/lib/BabelRegister/BabelRegister.js +0 -66
  178. package/lib/Generator/Generator.js +0 -120
  179. package/lib/cheerio/cheerio.d.ts +0 -2
  180. package/lib/cheerio/cheerio.js +0 -37
  181. package/lib/cleanRequireCache/cleanRequireCache.d.ts +0 -1
  182. package/lib/cleanRequireCache/cleanRequireCache.js +0 -40
  183. package/lib/compatESModuleRequire/compatESModuleRequire.d.ts +0 -7
  184. package/lib/compatESModuleRequire/compatESModuleRequire.js +0 -22
  185. package/lib/delay/delay.d.ts +0 -1
  186. package/lib/delay/delay.js +0 -22
  187. package/lib/getFile/getFile.d.ts +0 -22
  188. package/lib/getFile/getFile.js +0 -85
  189. package/lib/index.d.ts +0 -66
  190. package/lib/index.js +0 -619
  191. package/lib/isLernaPackage/isLernaPackage.d.ts +0 -1
  192. package/lib/isLernaPackage/isLernaPackage.js +0 -42
  193. package/lib/mergeConfig/mergeConfig.d.ts +0 -8
  194. package/lib/mergeConfig/mergeConfig.js +0 -42
  195. package/lib/parseRequireDeps/parseRequireDeps.d.ts +0 -1
  196. package/lib/parseRequireDeps/parseRequireDeps.js +0 -98
  197. package/lib/randomColor/randomColor.d.ts +0 -6
  198. package/lib/randomColor/randomColor.js +0 -42
  199. package/lib/routes.d.ts +0 -11
  200. package/lib/routes.js +0 -53
  201. package/lib/ssr.d.ts +0 -12
  202. package/lib/ssr.js +0 -41
  203. package/lib/types.d.ts +0 -7
  204. package/lib/types.js +0 -17
  205. package/lib/winEOL/winEOL.d.ts +0 -7
  206. package/lib/winEOL/winEOL.js +0 -39
  207. package/lib/winPath/winPath.d.ts +0 -1
  208. package/lib/winPath/winPath.js +0 -28
@@ -0,0 +1,1219 @@
1
+ import _ = require("../index");
2
+ declare module "../index" {
3
+ interface LoDashStatic {
4
+ /**
5
+ * Attempts to invoke func, returning either the result or the caught error object. Any additional arguments
6
+ * are provided to func when it’s invoked.
7
+ *
8
+ * @param func The function to attempt.
9
+ * @return Returns the func result or error object.
10
+ */
11
+ attempt<TResult>(func: (...args: any[]) => TResult, ...args: any[]): TResult | Error;
12
+ }
13
+ interface LoDashImplicitWrapper<TValue> {
14
+ /**
15
+ * @see _.attempt
16
+ */
17
+ attempt<TResult>(...args: any[]): TResult | Error;
18
+ }
19
+ interface LoDashExplicitWrapper<TValue> {
20
+ /**
21
+ * @see _.attempt
22
+ */
23
+ attempt<TResult>(...args: any[]): ExpChain<TResult | Error>;
24
+ }
25
+
26
+ interface LoDashStatic {
27
+ /**
28
+ * Binds methods of an object to the object itself, overwriting the existing method. Method names may be
29
+ * specified as individual arguments or as arrays of method names. If no method names are provided all
30
+ * enumerable function properties, own and inherited, of object are bound.
31
+ *
32
+ * Note: This method does not set the "length" property of bound functions.
33
+ *
34
+ * @param object The object to bind and assign the bound methods to.
35
+ * @param methodNames The object method names to bind, specified as individual method names or arrays of
36
+ * method names.
37
+ * @return Returns object.
38
+ */
39
+ bindAll<T>(object: T, ...methodNames: Array<Many<string>>): T;
40
+ }
41
+ interface LoDashImplicitWrapper<TValue> {
42
+ /**
43
+ * @see _.bindAll
44
+ */
45
+ bindAll(...methodNames: Array<Many<string>>): this;
46
+ }
47
+ interface LoDashExplicitWrapper<TValue> {
48
+ /**
49
+ * @see _.bindAll
50
+ */
51
+ bindAll(...methodNames: Array<Many<string>>): this;
52
+ }
53
+
54
+ interface LoDashStatic {
55
+ /**
56
+ * Creates a function that iterates over `pairs` and invokes the corresponding
57
+ * function of the first predicate to return truthy. The predicate-function
58
+ * pairs are invoked with the `this` binding and arguments of the created
59
+ * function.
60
+ *
61
+ * @since 4.0.0
62
+ * @category Util
63
+ * @param pairs The predicate-function pairs.
64
+ * @returns Returns the new composite function.
65
+ * @example
66
+ *
67
+ * var func = _.cond([
68
+ * [_.matches({ 'a': 1 }), _.constant('matches A')],
69
+ * [_.conforms({ 'b': _.isNumber }), _.constant('matches B')],
70
+ * [_.stubTrue, _.constant('no match')]
71
+ * ]);
72
+ *
73
+ * func({ 'a': 1, 'b': 2 });
74
+ * // => 'matches A'
75
+ *
76
+ * func({ 'a': 0, 'b': 1 });
77
+ * // => 'matches B'
78
+ *
79
+ * func({ 'a': '1', 'b': '2' });
80
+ * // => 'no match'
81
+ */
82
+ cond<T, R>(pairs: Array<CondPair<T, R>>): (Target: T) => R;
83
+ }
84
+
85
+ type ConformsPredicateObject<T> = {
86
+ [P in keyof T]: T[P] extends (arg: infer A) => any ? A : any
87
+ };
88
+ interface LoDashStatic {
89
+ /**
90
+ * Creates a function that invokes the predicate properties of `source` with the corresponding
91
+ * property values of a given object, returning true if all predicates return truthy, else false.
92
+ */
93
+ conforms<T>(source: ConformsPredicateObject<T>): (value: T) => boolean;
94
+ }
95
+ interface LoDashImplicitWrapper<TValue> {
96
+ /**
97
+ * @see _.conforms
98
+ */
99
+ conforms(): Function<(value: ConformsPredicateObject<TValue>) => boolean>;
100
+ }
101
+ interface LoDashExplicitWrapper<TValue> {
102
+ /**
103
+ * @see _.conforms
104
+ */
105
+ conforms(): FunctionChain<(value: ConformsPredicateObject<TValue>) => boolean>;
106
+ }
107
+
108
+ interface LoDashStatic {
109
+ /**
110
+ * Creates a function that returns value.
111
+ *
112
+ * @param value The value to return from the new function.
113
+ * @return Returns the new function.
114
+ */
115
+ constant<T>(value: T): () => T;
116
+ }
117
+ interface LoDashImplicitWrapper<TValue> {
118
+ /**
119
+ * @see _.constant
120
+ */
121
+ constant(): Function<() => TValue>;
122
+ }
123
+ interface LoDashExplicitWrapper<TValue> {
124
+ /**
125
+ * @see _.constant
126
+ */
127
+ constant(): FunctionChain<() => TValue>;
128
+ }
129
+
130
+ interface LoDashStatic {
131
+ /**
132
+ * Checks `value` to determine whether a default value should be returned in
133
+ * its place. The `defaultValue` is returned if `value` is `NaN`, `null`,
134
+ * or `undefined`.
135
+ *
136
+ * @param value The value to check.
137
+ * @param defaultValue The default value.
138
+ * @returns Returns the resolved value.
139
+ */
140
+ defaultTo<T>(value: T | null | undefined, defaultValue: T): T;
141
+ /**
142
+ * @see _.defaultTo
143
+ */
144
+ defaultTo<T, TDefault>(value: T | null | undefined, defaultValue: TDefault): T | TDefault;
145
+ }
146
+ interface LoDashImplicitWrapper<TValue> {
147
+ /**
148
+ * @see _.defaultTo
149
+ */
150
+ defaultTo(defaultValue: TValue): TValue;
151
+ /**
152
+ * @see _.defaultTo
153
+ */
154
+ defaultTo<TDefault>(defaultValue: TDefault): TValue extends null | undefined ? TDefault : TValue | TDefault;
155
+ }
156
+ interface LoDashExplicitWrapper<TValue> {
157
+ /**
158
+ * @see _.defaultTo
159
+ */
160
+ defaultTo(defaultValue: TValue): ExpChain<TValue>;
161
+ /**
162
+ * @see _.defaultTo
163
+ */
164
+ defaultTo<TDefault>(defaultValue: TDefault): ExpChain<TValue extends null | undefined ? TDefault : TValue | TDefault>;
165
+ }
166
+
167
+ interface LoDashStatic {
168
+ /**
169
+ * Creates a function that returns the result of invoking the provided functions with the this binding of the
170
+ * created function, where each successive invocation is supplied the return value of the previous.
171
+ *
172
+ * @param funcs Functions to invoke.
173
+ * @return Returns the new function.
174
+ */
175
+ flow<A extends any[], R1, R2, R3, R4, R5, R6, R7>(f1: (...args: A) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5, f6: (a: R5) => R6, f7: (a: R6) => R7): (...args: A) => R7;
176
+ /**
177
+ * @see _.flow
178
+ */
179
+ flow<A extends any[], R1, R2, R3, R4, R5, R6, R7>(f1: (...args: A) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5, f6: (a: R5) => R6, f7: (a: R6) => R7, ...func: Array<Many<(a: any) => any>>): (...args: A) => any;
180
+ /**
181
+ * @see _.flow
182
+ */
183
+ flow<A extends any[], R1, R2, R3, R4, R5, R6>(f1: (...args: A) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5, f6: (a: R5) => R6): (...args: A) => R6;
184
+ /**
185
+ * @see _.flow
186
+ */
187
+ flow<A extends any[], R1, R2, R3, R4, R5>(f1: (...args: A) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5): (...args: A) => R5;
188
+ /**
189
+ * @see _.flow
190
+ */
191
+ flow<A extends any[], R1, R2, R3, R4>(f1: (...args: A) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4): (...args: A) => R4;
192
+ /**
193
+ * @see _.flow
194
+ */
195
+ flow<A extends any[], R1, R2, R3>(f1: (...args: A) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3): (...args: A) => R3;
196
+ /**
197
+ * @see _.flow
198
+ */
199
+ flow<A extends any[], R1, R2>(f1: (...args: A) => R1, f2: (a: R1) => R2): (...args: A) => R2;
200
+ /**
201
+ * @see _.flow
202
+ */
203
+ flow(...func: Array<Many<(...args: any[]) => any>>): (...args: any[]) => any;
204
+ }
205
+ interface Function<T extends (...arg: any) => any> {
206
+ /**
207
+ * @see _.flow
208
+ */
209
+ flow<R2, R3, R4, R5, R6, R7>(f2: (a: ReturnType<T>) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5, f6: (a: R5) => R6, f7: (a: R6) => R7): Function<(...args: Parameters<T>) => R7>;
210
+ /**
211
+ * @see _.flow
212
+ */
213
+ flow<R2, R3, R4, R5, R6, R7>(f2: (a: ReturnType<T>) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5, f6: (a: R5) => R6, f7: (a: R6) => R7, ...func: Array<Many<(a: any) => any>>): Function<(...args: Parameters<T>) => any>;
214
+ /**
215
+ * @see _.flow
216
+ */
217
+ flow<R2, R3, R4, R5, R6>(f2: (a: ReturnType<T>) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5, f6: (a: R5) => R6): Function<(...args: Parameters<T>) => R6>;
218
+ /**
219
+ * @see _.flow
220
+ */
221
+ flow<R2, R3, R4, R5>(f2: (a: ReturnType<T>) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5): Function<(...args: Parameters<T>) => R5>;
222
+ /**
223
+ * @see _.flow
224
+ */
225
+ flow<R2, R3, R4>(f2: (a: ReturnType<T>) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4): Function<(...args: Parameters<T>) => R4>;
226
+ /**
227
+ * @see _.flow
228
+ */
229
+ flow<R2, R3>(f2: (a: ReturnType<T>) => R2, f3: (a: R2) => R3): Function<(...args: Parameters<T>) => R3>;
230
+ /**
231
+ * @see _.flow
232
+ */
233
+ flow<R2>(f2: (a: ReturnType<T>) => R2): Function<(...args: Parameters<T>) => R2>;
234
+ /**
235
+ * @see _.flow
236
+ */
237
+ flow(...func: Array<Many<(...args: any[]) => any>>): Function<(...args: any[]) => any>;
238
+ }
239
+ interface FunctionChain<T> {
240
+ /**
241
+ * @see _.flow
242
+ */
243
+ flow<R2, R3, R4, R5, R6, R7>(f2: (a: ReturnType<T>) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5, f6: (a: R5) => R6, f7: (a: R6) => R7): FunctionChain<(...args: Parameters<T>) => R7>;
244
+ /**
245
+ * @see _.flow
246
+ */
247
+ flow<R2, R3, R4, R5, R6, R7>(f2: (a: ReturnType<T>) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5, f6: (a: R5) => R6, f7: (a: R6) => R7, ...func: Array<Many<(a: any) => any>>): FunctionChain<(...args: Parameters<T>) => any>;
248
+ /**
249
+ * @see _.flow
250
+ */
251
+ flow<R2, R3, R4, R5, R6>(f2: (a: ReturnType<T>) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5, f6: (a: R5) => R6): FunctionChain<(...args: Parameters<T>) => R6>;
252
+ /**
253
+ * @see _.flow
254
+ */
255
+ flow<R2, R3, R4, R5>(f2: (a: ReturnType<T>) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5): FunctionChain<(...args: Parameters<T>) => R5>;
256
+ /**
257
+ * @see _.flow
258
+ */
259
+ flow<R2, R3, R4>(f2: (a: ReturnType<T>) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4): FunctionChain<(...args: Parameters<T>) => R4>;
260
+ /**
261
+ * @see _.flow
262
+ */
263
+ flow<R2, R3>(f2: (a: ReturnType<T>) => R2, f3: (a: R2) => R3): FunctionChain<(...args: Parameters<T>) => R3>;
264
+ /**
265
+ * @see _.flow
266
+ */
267
+ flow<R2>(f2: (a: ReturnType<T>) => R2): FunctionChain<(...args: Parameters<T>) => R2>;
268
+ /**
269
+ * @see _.flow
270
+ */
271
+ flow(...func: Array<Many<(...args: any[]) => any>>): FunctionChain<(...args: any[]) => any>;
272
+ }
273
+
274
+ interface LoDashStatic {
275
+ /**
276
+ * This method is like _.flow except that it creates a function that invokes the provided functions from right
277
+ * to left.
278
+ *
279
+ * @param funcs Functions to invoke.
280
+ * @return Returns the new function.
281
+ */
282
+ flowRight<A extends any[], R1, R2, R3, R4, R5, R6, R7>(f7: (a: R6) => R7, f6: (a: R5) => R6, f5: (a: R4) => R5, f4: (a: R3) => R4, f3: (a: R2) => R3, f2: (a: R1) => R2, f1: (...args: A) => R1): (...args: A) => R7;
283
+ /**
284
+ * @see _.flowRight
285
+ */
286
+ flowRight<A extends any[], R1, R2, R3, R4, R5, R6>(f6: (a: R5) => R6, f5: (a: R4) => R5, f4: (a: R3) => R4, f3: (a: R2) => R3, f2: (a: R1) => R2, f1: (...args: A) => R1): (...args: A) => R6;
287
+ /**
288
+ * @see _.flowRight
289
+ */
290
+ flowRight<A extends any[], R1, R2, R3, R4, R5>(f5: (a: R4) => R5, f4: (a: R3) => R4, f3: (a: R2) => R3, f2: (a: R1) => R2, f1: (...args: A) => R1): (...args: A) => R5;
291
+ /**
292
+ * @see _.flowRight
293
+ */
294
+ flowRight<A extends any[], R1, R2, R3, R4>(f4: (a: R3) => R4, f3: (a: R2) => R3, f2: (a: R1) => R2, f1: (...args: A) => R1): (...args: A) => R4;
295
+ /**
296
+ * @see _.flowRight
297
+ */
298
+ flowRight<A extends any[], R1, R2, R3>(f3: (a: R2) => R3, f2: (a: R1) => R2, f1: (...args: A) => R1): (...args: A) => R3;
299
+ /**
300
+ * @see _.flowRight
301
+ */
302
+ flowRight<A extends any[], R1, R2>(f2: (a: R1) => R2, f1: (...args: A) => R1): (...args: A) => R2;
303
+ /**
304
+ * @see _.flowRight
305
+ */
306
+ flowRight(...func: Array<Many<(...args: any[]) => any>>): (...args: any[]) => any;
307
+ }
308
+ interface Function<T> {
309
+ /**
310
+ * @see _.flowRight
311
+ */
312
+ flowRight<A extends any[], R1, R2, R3, R4, R5>(f6: (a: R5) => Parameters<T>["0"], f5: (a: R4) => R5, f4: (a: R3) => R4, f3: (a: R2) => R3, f2: (a: R1) => R2, f1: (...args: A) => R1): Function<(...args: A) => ReturnType<T>>;
313
+ /**
314
+ * @see _.flowRight
315
+ */
316
+ flowRight<A extends any[], R1, R2, R3, R4>(f5: (a: R4) => Parameters<T>["0"], f4: (a: R3) => R4, f3: (a: R2) => R3, f2: (a: R1) => R2, f1: (...args: A) => R1): Function<(...args: A) => ReturnType<T>>;
317
+ /**
318
+ * @see _.flowRight
319
+ */
320
+ flowRight<A extends any[], R1, R2, R3>(f4: (a: R3) => Parameters<T>["0"], f3: (a: R2) => R3, f2: (a: R1) => R2, f1: (...args: A) => R1): Function<(...args: A) => ReturnType<T>>;
321
+ /**
322
+ * @see _.flowRight
323
+ */
324
+ flowRight<A extends any[], R1, R2>(f3: (a: R2) => Parameters<T>["0"], f2: (a: R1) => R2, f1: (...args: A) => R1): Function<(...args: A) => ReturnType<T>>;
325
+ /**
326
+ * @see _.flowRight
327
+ */
328
+ flowRight<A extends any[], R1>(f2: (a: R1) => Parameters<T>["0"], f1: (...args: A) => R1): Function<(...args: A) => ReturnType<T>>;
329
+ /**
330
+ * @see _.flowRight
331
+ */
332
+ flowRight<A extends any[]>(f1: (...args: A) => Parameters<T>["0"]): Function<(...args: A) => ReturnType<T>>;
333
+ /**
334
+ * @see _.flowRight
335
+ */
336
+ flowRight(...func: Array<Many<(...args: any[]) => any>>): Function<(...args: any[]) => any>;
337
+ }
338
+ interface FunctionChain<T> {
339
+ /**
340
+ * @see _.flowRight
341
+ */
342
+ flowRight<A extends any[], R1, R2, R3, R4, R5>(f6: (a: R5) => Parameters<T>["0"], f5: (a: R4) => R5, f4: (a: R3) => R4, f3: (a: R2) => R3, f2: (a: R1) => R2, f1: (...args: A) => R1): FunctionChain<(...args: A) => ReturnType<T>>;
343
+ /**
344
+ * @see _.flowRight
345
+ */
346
+ flowRight<A extends any[], R1, R2, R3, R4>(f5: (a: R4) => Parameters<T>["0"], f4: (a: R3) => R4, f3: (a: R2) => R3, f2: (a: R1) => R2, f1: (...args: A) => R1): FunctionChain<(...args: A) => ReturnType<T>>;
347
+ /**
348
+ * @see _.flowRight
349
+ */
350
+ flowRight<A extends any[], R1, R2, R3>(f4: (a: R3) => Parameters<T>["0"], f3: (a: R2) => R3, f2: (a: R1) => R2, f1: (...args: A) => R1): FunctionChain<(...args: A) => ReturnType<T>>;
351
+ /**
352
+ * @see _.flowRight
353
+ */
354
+ flowRight<A extends any[], R1, R2>(f3: (a: R2) => Parameters<T>["0"], f2: (a: R1) => R2, f1: (...args: A) => R1): FunctionChain<(...args: A) => ReturnType<T>>;
355
+ /**
356
+ * @see _.flowRight
357
+ */
358
+ flowRight<A extends any[], R1>(f2: (a: R1) => Parameters<T>["0"], f1: (...args: A) => R1): FunctionChain<(...args: A) => ReturnType<T>>;
359
+ /**
360
+ * @see _.flowRight
361
+ */
362
+ flowRight<A extends any[]>(f1: (...args: A) => Parameters<T>["0"]): FunctionChain<(...args: A) => ReturnType<T>>;
363
+ /**
364
+ * @see _.flowRight
365
+ */
366
+ flowRight(...func: Array<Many<(...args: any[]) => any>>): FunctionChain<(...args: any[]) => any>;
367
+ }
368
+
369
+ interface LoDashStatic {
370
+ /**
371
+ * This method returns the first argument provided to it.
372
+ *
373
+ * @param value Any value.
374
+ * @return Returns value.
375
+ */
376
+ identity<T>(value: T): T;
377
+ /**
378
+ * @see _.identity
379
+ */
380
+ identity(): undefined;
381
+ }
382
+ interface LoDashImplicitWrapper<TValue> {
383
+ /**
384
+ * @see _.identity
385
+ */
386
+ identity(): TValue;
387
+ }
388
+ interface LoDashExplicitWrapper<TValue> {
389
+ /**
390
+ * @see _.identity
391
+ */
392
+ identity(): this;
393
+ }
394
+
395
+ interface LoDashStatic {
396
+ /**
397
+ * Creates a function that invokes `func` with the arguments of the created
398
+ * function. If `func` is a property name the created callback returns the
399
+ * property value for a given element. If `func` is an object the created
400
+ * callback returns `true` for elements that contain the equivalent object properties, otherwise it returns `false`.
401
+ *
402
+ * @category Util
403
+ * @param [func=_.identity] The value to convert to a callback.
404
+ * @returns Returns the callback.
405
+ * @example
406
+ *
407
+ * var users = [
408
+ * { 'user': 'barney', 'age': 36 },
409
+ * { 'user': 'fred', 'age': 40 }
410
+ * ];
411
+ *
412
+ * // create custom iteratee shorthands
413
+ * _.iteratee = _.wrap(_.iteratee, function(callback, func) {
414
+ * var p = /^(\S+)\s*([<>])\s*(\S+)$/.exec(func);
415
+ * return !p ? callback(func) : function(object) {
416
+ * return (p[2] == '>' ? object[p[1]] > p[3] : object[p[1]] < p[3]);
417
+ * };
418
+ * });
419
+ *
420
+ * _.filter(users, 'age > 36');
421
+ * // => [{ 'user': 'fred', 'age': 40 }]
422
+ */
423
+ iteratee<TFunction extends (...args: any[]) => any>(func: TFunction): TFunction;
424
+ /**
425
+ * @see _.iteratee
426
+ */
427
+ iteratee(func: string | object): (...args: any[]) => any;
428
+ }
429
+ interface Function<T extends (...args: any) => any> {
430
+ /**
431
+ * @see _.iteratee
432
+ */
433
+ iteratee(): Function<T>;
434
+ }
435
+ interface Collection<T> {
436
+ /**
437
+ * @see _.iteratee
438
+ */
439
+ iteratee(): Function<(o: object) => boolean>;
440
+ }
441
+ interface Object<T> {
442
+ /**
443
+ * @see _.iteratee
444
+ */
445
+ iteratee(): Function<(o: T) => boolean>;
446
+ }
447
+ interface String {
448
+ /**
449
+ * @see _.iteratee
450
+ */
451
+ iteratee(): Function<(o: object) => any>;
452
+ }
453
+ interface FunctionChain<T extends (...args: any) => any> {
454
+ /**
455
+ * @see _.iteratee
456
+ */
457
+ iteratee(): FunctionChain<T>;
458
+ }
459
+ interface CollectionChain<T> {
460
+ /**
461
+ * @see _.iteratee
462
+ */
463
+ iteratee(): FunctionChain<(o: object) => boolean>;
464
+ }
465
+ interface ObjectChain<T> {
466
+ /**
467
+ * @see _.iteratee
468
+ */
469
+ iteratee(): FunctionChain<(o: T) => boolean>;
470
+ }
471
+ interface StringChain {
472
+ /**
473
+ * @see _.iteratee
474
+ */
475
+ iteratee(): FunctionChain<(o: object) => any>;
476
+ }
477
+ interface StringNullableChain {
478
+ /**
479
+ * @see _.iteratee
480
+ */
481
+ iteratee(): FunctionChain<(o: object) => any>;
482
+ }
483
+
484
+ interface LoDashStatic {
485
+ /**
486
+ * Creates a function that performs a deep comparison between a given object and source, returning true if the
487
+ * given object has equivalent property values, else false.
488
+ *
489
+ * Note: This method supports comparing arrays, booleans, Date objects, numbers, Object objects, regexes, and
490
+ * strings. Objects are compared by their own, not inherited, enumerable properties. For comparing a single own
491
+ * or inherited property value see _.matchesProperty.
492
+ *
493
+ * @param source The object of property values to match.
494
+ * @return Returns the new function.
495
+ */
496
+ matches<T>(source: T): (value: any) => boolean;
497
+ /**
498
+ * @see _.matches
499
+ */
500
+ matches<T, V>(source: T): (value: V) => boolean;
501
+ }
502
+ interface LoDashImplicitWrapper<TValue> {
503
+ /**
504
+ * @see _.matches
505
+ */
506
+ matches<V>(): Function<(value: V) => boolean>;
507
+ }
508
+ interface LoDashExplicitWrapper<TValue> {
509
+ /**
510
+ * @see _.matches
511
+ */
512
+ matches<V>(): FunctionChain<(value: V) => boolean>;
513
+ }
514
+
515
+ interface LoDashStatic {
516
+ /**
517
+ * Creates a function that compares the property value of path on a given object to value.
518
+ *
519
+ * Note: This method supports comparing arrays, booleans, Date objects, numbers, Object objects, regexes, and
520
+ * strings. Objects are compared by their own, not inherited, enumerable properties.
521
+ *
522
+ * @param path The path of the property to get.
523
+ * @param srcValue The value to match.
524
+ * @return Returns the new function.
525
+ */
526
+ matchesProperty<T>(path: PropertyPath, srcValue: T): (value: any) => boolean;
527
+ /**
528
+ * @see _.matchesProperty
529
+ */
530
+ matchesProperty<T, V>(path: PropertyPath, srcValue: T): (value: V) => boolean;
531
+ }
532
+ interface LoDashImplicitWrapper<TValue> {
533
+ /**
534
+ * @see _.matchesProperty
535
+ */
536
+ matchesProperty<SrcValue>(srcValue: SrcValue): Function<(value: any) => boolean>;
537
+ /**
538
+ * @see _.matchesProperty
539
+ */
540
+ matchesProperty<SrcValue, Value>(srcValue: SrcValue): Function<(value: Value) => boolean>;
541
+ }
542
+ interface LoDashExplicitWrapper<TValue> {
543
+ /**
544
+ * @see _.matchesProperty
545
+ */
546
+ matchesProperty<SrcValue>(srcValue: SrcValue): FunctionChain<(value: any) => boolean>;
547
+ /**
548
+ * @see _.matchesProperty
549
+ */
550
+ matchesProperty<SrcValue, Value>(srcValue: SrcValue): FunctionChain<(value: Value) => boolean>;
551
+ }
552
+
553
+ interface LoDashStatic {
554
+ /**
555
+ * Creates a function that invokes the method at path on a given object. Any additional arguments are provided
556
+ * to the invoked method.
557
+ *
558
+ * @param path The path of the method to invoke.
559
+ * @param args The arguments to invoke the method with.
560
+ * @return Returns the new function.
561
+ */
562
+ method(path: PropertyPath, ...args: any[]): (object: any) => any;
563
+ }
564
+ interface LoDashImplicitWrapper<TValue> {
565
+ /**
566
+ * @see _.method
567
+ */
568
+ method(...args: any[]): Function<(object: any) => any>;
569
+ }
570
+ interface LoDashExplicitWrapper<TValue> {
571
+ /**
572
+ * @see _.method
573
+ */
574
+ method(...args: any[]): FunctionChain<(object: any) => any>;
575
+ }
576
+
577
+ interface LoDashStatic {
578
+ /**
579
+ * The opposite of _.method; this method creates a function that invokes the method at a given path on object.
580
+ * Any additional arguments are provided to the invoked method.
581
+ *
582
+ * @param object The object to query.
583
+ * @param args The arguments to invoke the method with.
584
+ * @return Returns the new function.
585
+ */
586
+ methodOf(object: object, ...args: any[]): (path: PropertyPath) => any;
587
+ }
588
+ interface LoDashImplicitWrapper<TValue> {
589
+ /**
590
+ * @see _.methodOf
591
+ */
592
+ methodOf(...args: any[]): LoDashImplicitWrapper<(path: PropertyPath) => any>;
593
+ }
594
+ interface LoDashExplicitWrapper<TValue> {
595
+ /**
596
+ * @see _.methodOf
597
+ */
598
+ methodOf(...args: any[]): LoDashExplicitWrapper<(path: PropertyPath) => any>;
599
+ }
600
+
601
+ interface MixinOptions {
602
+ /**
603
+ * @see _.chain
604
+ */
605
+ chain?: boolean | undefined;
606
+ }
607
+ interface LoDashStatic {
608
+ /**
609
+ * Adds all own enumerable function properties of a source object to the destination object. If object is a
610
+ * function then methods are added to its prototype as well.
611
+ *
612
+ * Note: Use _.runInContext to create a pristine lodash function to avoid conflicts caused by modifying
613
+ * the original.
614
+ *
615
+ * @param object The destination object.
616
+ * @param source The object of functions to add.
617
+ * @param options The options object.
618
+ * @param options.chain Specify whether the functions added are chainable.
619
+ * @return Returns object.
620
+ */
621
+ mixin<TObject>(object: TObject, source: Dictionary<(...args: any[]) => any>, options?: MixinOptions): TObject;
622
+ /**
623
+ * @see _.mixin
624
+ */
625
+ mixin<TResult>(source: Dictionary<(...args: any[]) => any>, options?: MixinOptions): LoDashStatic;
626
+ }
627
+ interface LoDashImplicitWrapper<TValue> {
628
+ /**
629
+ * @see _.mixin
630
+ */
631
+ mixin(source: Dictionary<(...args: any[]) => any>, options?: MixinOptions): this;
632
+ /**
633
+ * @see _.mixin
634
+ */
635
+ mixin(options?: MixinOptions): LoDashImplicitWrapper<LoDashStatic>;
636
+ }
637
+ interface LoDashExplicitWrapper<TValue> {
638
+ /**
639
+ * @see _.mixin
640
+ */
641
+ mixin(source: Dictionary<(...args: any[]) => any>, options?: MixinOptions): this;
642
+ /**
643
+ * @see _.mixin
644
+ */
645
+ mixin(options?: MixinOptions): LoDashExplicitWrapper<LoDashStatic>;
646
+ }
647
+
648
+ interface LoDashStatic {
649
+ /**
650
+ * Reverts the _ variable to its previous value and returns a reference to the lodash function.
651
+ *
652
+ * @return Returns the lodash function.
653
+ */
654
+ noConflict(): typeof _;
655
+ }
656
+ interface LoDashImplicitWrapper<TValue> {
657
+ /**
658
+ * @see _.noConflict
659
+ */
660
+ noConflict(): typeof _;
661
+ }
662
+ interface LoDashExplicitWrapper<TValue> {
663
+ /**
664
+ * @see _.noConflict
665
+ */
666
+ noConflict(): LoDashExplicitWrapper<typeof _>;
667
+ }
668
+
669
+ interface LoDashStatic {
670
+ /**
671
+ * A no-operation function that returns undefined regardless of the arguments it receives.
672
+ *
673
+ * @return undefined
674
+ */
675
+ noop(...args: any[]): void;
676
+ }
677
+ interface LoDashImplicitWrapper<TValue> {
678
+ /**
679
+ * @see _.noop
680
+ */
681
+ noop(...args: any[]): void;
682
+ }
683
+ interface LoDashExplicitWrapper<TValue> {
684
+ /**
685
+ * @see _.noop
686
+ */
687
+ noop(...args: any[]): PrimitiveChain<undefined>;
688
+ }
689
+
690
+ interface LoDashStatic {
691
+ /**
692
+ * Creates a function that returns its nth argument.
693
+ *
694
+ * @param n The index of the argument to return.
695
+ * @return Returns the new function.
696
+ */
697
+ nthArg(n?: number): (...args: any[]) => any;
698
+ }
699
+ interface LoDashImplicitWrapper<TValue> {
700
+ /**
701
+ * @see _.nthArg
702
+ */
703
+ nthArg(): Function<(...args: any[]) => any>;
704
+ }
705
+ interface LoDashExplicitWrapper<TValue> {
706
+ /**
707
+ * @see _.nthArg
708
+ */
709
+ nthArg(): FunctionChain<(...args: any[]) => any>;
710
+ }
711
+
712
+ interface LoDashStatic {
713
+ /**
714
+ * Creates a function that invokes iteratees with the arguments provided to the created function and returns
715
+ * their results.
716
+ *
717
+ * @param iteratees The iteratees to invoke.
718
+ * @return Returns the new function.
719
+ */
720
+ over<TResult>(...iteratees: Array<Many<(...args: any[]) => TResult>>): (...args: any[]) => TResult[];
721
+ }
722
+ interface Collection<T> {
723
+ /**
724
+ * @see _.over
725
+ */
726
+ over<TResult>(...iteratees: Array<Many<(...args: any[]) => TResult>>): Function<(...args: any[]) => TResult[]>;
727
+ }
728
+ interface Function<T> {
729
+ /**
730
+ * @see _.over
731
+ */
732
+ over<TResult>(...iteratees: Array<Many<(...args: any[]) => TResult>>): Function<(...args: any[]) => Array<ReturnType<T> | TResult>>;
733
+ }
734
+ interface CollectionChain<T> {
735
+ /**
736
+ * @see _.over
737
+ */
738
+ over<TResult>(...iteratees: Array<Many<(...args: any[]) => TResult>>): FunctionChain<(...args: any[]) => TResult[]>;
739
+ }
740
+ interface FunctionChain<T> {
741
+ /**
742
+ * @see _.over
743
+ */
744
+ over<TResult>(...iteratees: Array<Many<(...args: any[]) => TResult>>): FunctionChain<(...args: any[]) => Array<ReturnType<T> | TResult>>;
745
+ }
746
+
747
+ interface LoDashStatic {
748
+ /**
749
+ * Creates a function that checks if all of the predicates return truthy when invoked with the arguments
750
+ * provided to the created function.
751
+ *
752
+ * @param predicates The predicates to check.
753
+ * @return Returns the new function.
754
+ */
755
+ overEvery<T, Result1 extends T, Result2 extends T>(...predicates: [
756
+ (arg: T) => arg is Result1,
757
+ (arg: T) => arg is Result2
758
+ ]): (arg: T) => arg is Result1 & Result2;
759
+ overEvery<T>(...predicates: Array<Many<(...args: T[]) => boolean>>): (...args: T[]) => boolean;
760
+ }
761
+ interface Collection<T> {
762
+ /**
763
+ * @see _.overEvery
764
+ */
765
+ overEvery<TArgs>(...iteratees: Array<Many<(...args: TArgs[]) => boolean>>): Function<(...args: TArgs[]) => boolean>;
766
+ }
767
+ interface Function<T> {
768
+ /**
769
+ * @see _.overEvery
770
+ */
771
+ overEvery<TArgs>(...iteratees: Array<Many<(...args: TArgs[]) => boolean>>): Function<(...args: Parameters<T> | TArgs[]) => boolean>;
772
+ }
773
+ interface CollectionChain<T> {
774
+ /**
775
+ * @see _.overEvery
776
+ */
777
+ overEvery<TArgs>(...iteratees: Array<Many<(...args: TArgs[]) => boolean>>): FunctionChain<(...args: TArgs[]) => boolean>;
778
+ }
779
+ interface FunctionChain<T> {
780
+ /**
781
+ * @see _.overEvery
782
+ */
783
+ overEvery<TArgs>(...iteratees: Array<Many<(...args: TArgs[]) => boolean>>): FunctionChain<(...args: Parameters<T> | TArgs[]) => boolean>;
784
+ }
785
+
786
+ interface LoDashStatic {
787
+ /**
788
+ * Creates a function that checks if any of the predicates return truthy when invoked with the arguments
789
+ * provided to the created function.
790
+ *
791
+ * @param predicates The predicates to check.
792
+ * @return Returns the new function.
793
+ */
794
+ overSome<T, Result1 extends T, Result2 extends T>(...predicates: [
795
+ (arg: T) => arg is Result1,
796
+ (arg: T) => arg is Result2
797
+ ]): (arg: T) => arg is Result1 | Result2;
798
+ overSome<T>(...predicates: Array<Many<(...args: T[]) => boolean>>): (...args: T[]) => boolean;
799
+ }
800
+ interface Collection<T> {
801
+ /**
802
+ * @see _.overSome
803
+ */
804
+ overSome<TArgs>(...iteratees: Array<Many<(...args: TArgs[]) => boolean>>): Function<(...args: TArgs[]) => boolean>;
805
+ }
806
+ interface Function<T> {
807
+ /**
808
+ * @see _.overSome
809
+ */
810
+ overSome<TArgs>(...iteratees: Array<Many<(...args: TArgs[]) => boolean>>): Function<(...args: Parameters<T> | TArgs[]) => boolean>;
811
+ }
812
+ interface CollectionChain<T> {
813
+ /**
814
+ * @see _.overSome
815
+ */
816
+ overSome<TArgs>(...iteratees: Array<Many<(...args: TArgs[]) => boolean>>): FunctionChain<(...args: TArgs[]) => boolean>;
817
+ }
818
+ interface FunctionChain<T> {
819
+ /**
820
+ * @see _.overSome
821
+ */
822
+ overSome<TArgs>(...iteratees: Array<Many<(...args: TArgs[]) => boolean>>): FunctionChain<(...args: Parameters<T> | TArgs[]) => boolean>;
823
+ }
824
+
825
+ interface LoDashStatic {
826
+ /**
827
+ * Creates a function that returns the property value at path on a given object.
828
+ *
829
+ * @param path The path of the property to get.
830
+ * @return Returns the new function.
831
+ */
832
+ property<TObj, TResult>(path: PropertyPath): (obj: TObj) => TResult;
833
+ }
834
+ interface LoDashImplicitWrapper<TValue> {
835
+ /**
836
+ * @see _.property
837
+ */
838
+ property<TObj, TResult>(): Function<(obj: TObj) => TResult>;
839
+ }
840
+ interface LoDashExplicitWrapper<TValue> {
841
+ /**
842
+ * @see _.property
843
+ */
844
+ property<TObj, TResult>(): FunctionChain<(obj: TObj) => TResult>;
845
+ }
846
+
847
+ interface LoDashStatic {
848
+ /**
849
+ * The opposite of _.property; this method creates a function that returns the property value at a given path
850
+ * on object.
851
+ *
852
+ * @param object The object to query.
853
+ * @return Returns the new function.
854
+ */
855
+ propertyOf<T extends {}>(object: T): (path: PropertyPath) => any;
856
+ }
857
+ interface LoDashImplicitWrapper<TValue> {
858
+ /**
859
+ * @see _.propertyOf
860
+ */
861
+ propertyOf(): LoDashImplicitWrapper<(path: PropertyPath) => any>;
862
+ }
863
+ interface LoDashExplicitWrapper<TValue> {
864
+ /**
865
+ * @see _.propertyOf
866
+ */
867
+ propertyOf(): LoDashExplicitWrapper<(path: PropertyPath) => any>;
868
+ }
869
+
870
+ interface LoDashStatic {
871
+ /**
872
+ * Creates an array of numbers (positive and/or negative) progressing from start up to, but not including, end.
873
+ * If end is not specified it’s set to start with start then set to 0. If end is less than start a zero-length
874
+ * range is created unless a negative step is specified.
875
+ *
876
+ * @param start The start of the range.
877
+ * @param end The end of the range.
878
+ * @param step The value to increment or decrement by.
879
+ * @return Returns a new range array.
880
+ */
881
+ range(start: number, end?: number, step?: number): number[];
882
+ /**
883
+ * @see _.range
884
+ */
885
+ range(end: number, index: string | number, guard: object): number[];
886
+ }
887
+ interface LoDashImplicitWrapper<TValue> {
888
+ /**
889
+ * @see _.range
890
+ */
891
+ range(end?: number, step?: number): Collection<number>;
892
+ }
893
+ interface LoDashExplicitWrapper<TValue> {
894
+ /**
895
+ * @see _.range
896
+ */
897
+ range(end?: number, step?: number): CollectionChain<number>;
898
+ }
899
+
900
+ interface LoDashStatic {
901
+ /**
902
+ * This method is like `_.range` except that it populates values in
903
+ * descending order.
904
+ *
905
+ * @category Util
906
+ * @param start The start of the range.
907
+ * @param end The end of the range.
908
+ * @param step The value to increment or decrement by.
909
+ * @returns Returns the new array of numbers.
910
+ * @example
911
+ *
912
+ * _.rangeRight(4);
913
+ * // => [3, 2, 1, 0]
914
+ *
915
+ * _.rangeRight(-4);
916
+ * // => [-3, -2, -1, 0]
917
+ *
918
+ * _.rangeRight(1, 5);
919
+ * // => [4, 3, 2, 1]
920
+ *
921
+ * _.rangeRight(0, 20, 5);
922
+ * // => [15, 10, 5, 0]
923
+ *
924
+ * _.rangeRight(0, -4, -1);
925
+ * // => [-3, -2, -1, 0]
926
+ *
927
+ * _.rangeRight(1, 4, 0);
928
+ * // => [1, 1, 1]
929
+ *
930
+ * _.rangeRight(0);
931
+ * // => []
932
+ */
933
+ rangeRight(start: number, end?: number, step?: number): number[];
934
+ /**
935
+ * @see _.rangeRight
936
+ */
937
+ rangeRight(end: number, index: string | number, guard: object): number[];
938
+ }
939
+ interface LoDashImplicitWrapper<TValue> {
940
+ /**
941
+ * @see _.rangeRight
942
+ */
943
+ rangeRight(end?: number, step?: number): Collection<number>;
944
+ }
945
+ interface LoDashExplicitWrapper<TValue> {
946
+ /**
947
+ * @see _.rangeRight
948
+ */
949
+ rangeRight(end?: number, step?: number): CollectionChain<number>;
950
+ }
951
+
952
+ interface LoDashStatic {
953
+ /**
954
+ * Create a new pristine lodash function using the given context object.
955
+ *
956
+ * @param context The context object.
957
+ * @return Returns a new lodash function.
958
+ */
959
+ runInContext(context?: object): LoDashStatic;
960
+ }
961
+ interface LoDashImplicitWrapper<TValue> {
962
+ /**
963
+ * @see _.runInContext
964
+ */
965
+ runInContext(): LoDashStatic;
966
+ }
967
+
968
+ interface LoDashStatic {
969
+ /**
970
+ * This method returns a new empty array.
971
+ *
972
+ * @returns Returns the new empty array.
973
+ */
974
+ stubArray(): any[];
975
+ }
976
+ interface LoDashImplicitWrapper<TValue> {
977
+ /**
978
+ * @see _.stubArray
979
+ */
980
+ stubArray(): any[];
981
+ }
982
+ interface LoDashExplicitWrapper<TValue> {
983
+ /**
984
+ * @see _.stubArray
985
+ */
986
+ stubArray(): CollectionChain<any>;
987
+ }
988
+
989
+ interface LoDashStatic {
990
+ /**
991
+ * This method returns `false`.
992
+ *
993
+ * @returns Returns `false`.
994
+ */
995
+ stubFalse(): false;
996
+ }
997
+ interface LoDashImplicitWrapper<TValue> {
998
+ /**
999
+ * @see _.stubFalse
1000
+ */
1001
+ stubFalse(): false;
1002
+ }
1003
+ interface LoDashExplicitWrapper<TValue> {
1004
+ /**
1005
+ * @see _.stubFalse
1006
+ */
1007
+ stubFalse(): PrimitiveChain<false>;
1008
+ }
1009
+
1010
+ interface LoDashStatic {
1011
+ /**
1012
+ * This method returns a new empty object.
1013
+ *
1014
+ * @returns Returns the new empty object.
1015
+ */
1016
+ stubObject(): any;
1017
+ }
1018
+ interface LoDashImplicitWrapper<TValue> {
1019
+ /**
1020
+ * @see _.stubObject
1021
+ */
1022
+ stubObject(): any;
1023
+ }
1024
+ interface LoDashExplicitWrapper<TValue> {
1025
+ /**
1026
+ * @see _.stubObject
1027
+ */
1028
+ stubObject(): LoDashExplicitWrapper<any>;
1029
+ }
1030
+
1031
+ interface LoDashStatic {
1032
+ /**
1033
+ * This method returns an empty string.
1034
+ *
1035
+ * @returns Returns the empty string.
1036
+ */
1037
+ stubString(): string;
1038
+ }
1039
+ interface LoDashImplicitWrapper<TValue> {
1040
+ /**
1041
+ * @see _.stubString
1042
+ */
1043
+ stubString(): string;
1044
+ }
1045
+ interface LoDashExplicitWrapper<TValue> {
1046
+ /**
1047
+ * @see _.stubString
1048
+ */
1049
+ stubString(): StringChain;
1050
+ }
1051
+
1052
+ interface LoDashStatic {
1053
+ /**
1054
+ * This method returns `true`.
1055
+ *
1056
+ * @returns Returns `true`.
1057
+ */
1058
+ stubTrue(): true;
1059
+ }
1060
+ interface LoDashImplicitWrapper<TValue> {
1061
+ /**
1062
+ * @see _.stubTrue
1063
+ */
1064
+ stubTrue(): true;
1065
+ }
1066
+ interface LoDashExplicitWrapper<TValue> {
1067
+ /**
1068
+ * @see _.stubTrue
1069
+ */
1070
+ stubTrue(): PrimitiveChain<true>;
1071
+ }
1072
+
1073
+ interface LoDashStatic {
1074
+ /**
1075
+ * Invokes the iteratee function n times, returning an array of the results of each invocation. The iteratee
1076
+ * is invoked with one argument; (index).
1077
+ *
1078
+ * @param n The number of times to invoke iteratee.
1079
+ * @param iteratee The function invoked per iteration.
1080
+ * @return Returns the array of results.
1081
+ */
1082
+ times<TResult>(n: number, iteratee: (num: number) => TResult): TResult[];
1083
+ /**
1084
+ * @see _.times
1085
+ */
1086
+ times(n: number): number[];
1087
+ }
1088
+ interface LoDashImplicitWrapper<TValue> {
1089
+ /**
1090
+ * @see _.times
1091
+ */
1092
+ times<TResult>(iteratee: (num: number) => TResult): TResult[];
1093
+ /**
1094
+ * @see _.times
1095
+ */
1096
+ times(): number[];
1097
+ }
1098
+ interface LoDashExplicitWrapper<TValue> {
1099
+ /**
1100
+ * @see _.times
1101
+ */
1102
+ times<TResult>(iteratee: (num: number) => TResult): CollectionChain<TResult>;
1103
+ /**
1104
+ * @see _.times
1105
+ */
1106
+ times(): CollectionChain<number>;
1107
+ }
1108
+
1109
+ interface LoDashStatic {
1110
+ /**
1111
+ * Converts `value` to a property path array.
1112
+ *
1113
+ * @category Util
1114
+ * @param value The value to convert.
1115
+ * @returns Returns the new property path array.
1116
+ * @example
1117
+ *
1118
+ * _.toPath('a.b.c');
1119
+ * // => ['a', 'b', 'c']
1120
+ *
1121
+ * _.toPath('a[0].b.c');
1122
+ * // => ['a', '0', 'b', 'c']
1123
+ *
1124
+ * var path = ['a', 'b', 'c'],
1125
+ * newPath = _.toPath(path);
1126
+ *
1127
+ * console.log(newPath);
1128
+ * // => ['a', 'b', 'c']
1129
+ *
1130
+ * console.log(path === newPath);
1131
+ * // => false
1132
+ */
1133
+ toPath(value: any): string[];
1134
+ }
1135
+ interface LoDashImplicitWrapper<TValue> {
1136
+ /**
1137
+ * @see _.toPath
1138
+ */
1139
+ toPath(): Collection<string>;
1140
+ }
1141
+ interface LoDashExplicitWrapper<TValue> {
1142
+ /**
1143
+ * @see _.toPath
1144
+ */
1145
+ toPath(): CollectionChain<string>;
1146
+ }
1147
+
1148
+ interface LoDashStatic {
1149
+ /**
1150
+ * Generates a unique ID. If prefix is provided the ID is appended to it.
1151
+ *
1152
+ * @param prefix The value to prefix the ID with.
1153
+ * @return Returns the unique ID.
1154
+ */
1155
+ uniqueId(prefix?: string): string;
1156
+ }
1157
+ interface LoDashImplicitWrapper<TValue> {
1158
+ /**
1159
+ * @see _.uniqueId
1160
+ */
1161
+ uniqueId(): string;
1162
+ }
1163
+ interface LoDashExplicitWrapper<TValue> {
1164
+ /**
1165
+ * @see _.uniqueId
1166
+ */
1167
+ uniqueId(): StringChain;
1168
+ }
1169
+
1170
+ // stubTrue
1171
+
1172
+ interface LoDashStatic {
1173
+ /**
1174
+ * This method returns true.
1175
+ *
1176
+ * @return Returns true.
1177
+ */
1178
+ stubTrue(): true;
1179
+ }
1180
+
1181
+ interface LoDashImplicitWrapper<TValue> {
1182
+ /**
1183
+ * @see _.stubTrue
1184
+ */
1185
+ stubTrue(): true;
1186
+ }
1187
+
1188
+ interface LoDashExplicitWrapper<TValue> {
1189
+ /**
1190
+ * @see _.stubTrue
1191
+ */
1192
+ stubTrue(): LoDashExplicitWrapper<true>;
1193
+ }
1194
+
1195
+ // stubFalse
1196
+
1197
+ interface LoDashStatic {
1198
+ /**
1199
+ * This method returns false.
1200
+ *
1201
+ * @return Returns false.
1202
+ */
1203
+ stubFalse(): false;
1204
+ }
1205
+
1206
+ interface LoDashImplicitWrapper<TValue> {
1207
+ /**
1208
+ * @see _.stubFalse
1209
+ */
1210
+ stubFalse(): false;
1211
+ }
1212
+
1213
+ interface LoDashExplicitWrapper<TValue> {
1214
+ /**
1215
+ * @see _.stubFalse
1216
+ */
1217
+ stubFalse(): LoDashExplicitWrapper<false>;
1218
+ }
1219
+ }