@umijs/utils 3.5.20 → 4.0.0-beta.4

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 (223) 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/deepmerge/index.d.ts +16 -0
  51. package/compiled/deepmerge/index.js +1 -0
  52. package/compiled/deepmerge/package.json +1 -0
  53. package/compiled/execa/LICENSE +9 -0
  54. package/compiled/execa/index.d.ts +564 -0
  55. package/compiled/execa/index.js +1 -0
  56. package/compiled/execa/package.json +1 -0
  57. package/compiled/fs-extra/LICENSE +15 -0
  58. package/compiled/fs-extra/index.d.ts +332 -0
  59. package/compiled/fs-extra/index.js +1 -0
  60. package/compiled/fs-extra/package.json +1 -0
  61. package/compiled/glob/LICENSE +21 -0
  62. package/compiled/glob/index.d.ts +89 -0
  63. package/compiled/glob/index.js +1 -0
  64. package/compiled/glob/minimatch/index.d.ts +204 -0
  65. package/compiled/glob/package.json +1 -0
  66. package/compiled/import-lazy/LICENSE +9 -0
  67. package/compiled/import-lazy/index.d.ts +26 -0
  68. package/compiled/import-lazy/index.js +1 -0
  69. package/compiled/import-lazy/package.json +1 -0
  70. package/compiled/lodash/LICENSE +47 -0
  71. package/compiled/lodash/common/array.d.ts +2126 -0
  72. package/compiled/lodash/common/collection.d.ts +1930 -0
  73. package/compiled/lodash/common/common.d.ts +280 -0
  74. package/compiled/lodash/common/date.d.ts +23 -0
  75. package/compiled/lodash/common/function.d.ts +1430 -0
  76. package/compiled/lodash/common/lang.d.ts +1692 -0
  77. package/compiled/lodash/common/math.d.ts +405 -0
  78. package/compiled/lodash/common/number.d.ts +131 -0
  79. package/compiled/lodash/common/object.d.ts +2519 -0
  80. package/compiled/lodash/common/seq.d.ts +210 -0
  81. package/compiled/lodash/common/string.d.ts +788 -0
  82. package/compiled/lodash/common/util.d.ts +1219 -0
  83. package/compiled/lodash/index.d.ts +46 -0
  84. package/compiled/lodash/index.js +9 -0
  85. package/compiled/lodash/package.json +1 -0
  86. package/compiled/mustache/LICENSE +11 -0
  87. package/compiled/mustache/index.d.ts +437 -0
  88. package/compiled/mustache/index.js +5 -0
  89. package/compiled/mustache/package.json +1 -0
  90. package/compiled/pkg-up/LICENSE +9 -0
  91. package/compiled/pkg-up/index.d.ts +48 -0
  92. package/compiled/pkg-up/index.js +1 -0
  93. package/compiled/pkg-up/package.json +1 -0
  94. package/compiled/portfinder/LICENSE +22 -0
  95. package/compiled/portfinder/index.js +1 -0
  96. package/compiled/portfinder/lib/portfinder.d.ts +47 -0
  97. package/compiled/portfinder/package.json +1 -0
  98. package/compiled/prettier/LICENSE +7 -0
  99. package/compiled/prettier/index.d.ts +867 -0
  100. package/compiled/prettier/index.js +475 -0
  101. package/compiled/prettier/package.json +5 -0
  102. package/compiled/prompts/LICENSE +21 -0
  103. package/compiled/prompts/index.d.ts +120 -0
  104. package/compiled/prompts/index.js +1 -0
  105. package/compiled/prompts/package.json +1 -0
  106. package/compiled/resolve/LICENSE +21 -0
  107. package/compiled/resolve/index.d.ts +166 -0
  108. package/compiled/resolve/index.js +1 -0
  109. package/compiled/resolve/package.json +1 -0
  110. package/compiled/rimraf/LICENSE +15 -0
  111. package/compiled/rimraf/glob/index.d.ts +89 -0
  112. package/compiled/rimraf/index.d.ts +49 -0
  113. package/compiled/rimraf/index.js +1 -0
  114. package/compiled/rimraf/minimatch/index.d.ts +204 -0
  115. package/compiled/rimraf/package.json +1 -0
  116. package/compiled/semver/LICENSE +15 -0
  117. package/compiled/semver/classes/comparator.d.ts +17 -0
  118. package/compiled/semver/classes/range.d.ts +21 -0
  119. package/compiled/semver/classes/semver.d.ts +62 -0
  120. package/compiled/semver/functions/clean.d.ts +8 -0
  121. package/compiled/semver/functions/cmp.d.ts +16 -0
  122. package/compiled/semver/functions/coerce.d.ts +12 -0
  123. package/compiled/semver/functions/compare-build.d.ts +16 -0
  124. package/compiled/semver/functions/compare-loose.d.ts +5 -0
  125. package/compiled/semver/functions/compare.d.ts +20 -0
  126. package/compiled/semver/functions/diff.d.ts +13 -0
  127. package/compiled/semver/functions/eq.d.ts +9 -0
  128. package/compiled/semver/functions/gt.d.ts +9 -0
  129. package/compiled/semver/functions/gte.d.ts +9 -0
  130. package/compiled/semver/functions/inc.d.ts +15 -0
  131. package/compiled/semver/functions/lt.d.ts +9 -0
  132. package/compiled/semver/functions/lte.d.ts +8 -0
  133. package/compiled/semver/functions/major.d.ts +9 -0
  134. package/compiled/semver/functions/minor.d.ts +9 -0
  135. package/compiled/semver/functions/neq.d.ts +9 -0
  136. package/compiled/semver/functions/parse.d.ts +12 -0
  137. package/compiled/semver/functions/patch.d.ts +9 -0
  138. package/compiled/semver/functions/prerelease.d.ts +12 -0
  139. package/compiled/semver/functions/rcompare.d.ts +15 -0
  140. package/compiled/semver/functions/rsort.d.ts +9 -0
  141. package/compiled/semver/functions/satisfies.d.ts +14 -0
  142. package/compiled/semver/functions/sort.d.ts +9 -0
  143. package/compiled/semver/functions/valid.d.ts +11 -0
  144. package/compiled/semver/index.d.ts +133 -0
  145. package/compiled/semver/index.js +1 -0
  146. package/compiled/semver/internals/identifiers.d.ts +13 -0
  147. package/compiled/semver/package.json +1 -0
  148. package/compiled/semver/ranges/gtr.d.ts +14 -0
  149. package/compiled/semver/ranges/intersects.d.ts +13 -0
  150. package/compiled/semver/ranges/ltr.d.ts +14 -0
  151. package/compiled/semver/ranges/max-satisfying.d.ts +14 -0
  152. package/compiled/semver/ranges/min-satisfying.d.ts +14 -0
  153. package/compiled/semver/ranges/min-version.d.ts +10 -0
  154. package/compiled/semver/ranges/outside.d.ts +15 -0
  155. package/compiled/semver/ranges/simplify.d.ts +14 -0
  156. package/compiled/semver/ranges/subset.d.ts +13 -0
  157. package/compiled/semver/ranges/to-comparators.d.ts +9 -0
  158. package/compiled/semver/ranges/valid.d.ts +12 -0
  159. package/compiled/strip-ansi/LICENSE +9 -0
  160. package/compiled/strip-ansi/index.d.ts +17 -0
  161. package/compiled/strip-ansi/index.js +1 -0
  162. package/compiled/strip-ansi/package.json +1 -0
  163. package/compiled/yargs-parser/index.d.ts +112 -0
  164. package/compiled/yargs-parser/index.js +1 -0
  165. package/compiled/yargs-parser/package.json +1 -0
  166. package/dist/BaseGenerator/BaseGenerator.d.ts +18 -0
  167. package/dist/BaseGenerator/BaseGenerator.js +58 -0
  168. package/dist/BaseGenerator/generateFile.d.ts +8 -0
  169. package/dist/BaseGenerator/generateFile.js +25 -0
  170. package/{lib → dist}/Generator/Generator.d.ts +3 -3
  171. package/dist/Generator/Generator.js +74 -0
  172. package/dist/importLazy.d.ts +6 -0
  173. package/dist/importLazy.js +17 -0
  174. package/dist/index.d.ts +33 -0
  175. package/dist/index.js +88 -0
  176. package/dist/installDeps.d.ts +9 -0
  177. package/dist/installDeps.js +39 -0
  178. package/dist/logger.d.ts +14 -0
  179. package/dist/logger.js +39 -0
  180. package/dist/npmClient.d.ts +15 -0
  181. package/dist/npmClient.js +43 -0
  182. package/dist/randomColor/randomColor.d.ts +6 -0
  183. package/dist/randomColor/randomColor.js +19 -0
  184. package/dist/register.d.ts +6 -0
  185. package/dist/register.js +47 -0
  186. package/dist/updatePackageJSON.d.ts +5 -0
  187. package/dist/updatePackageJSON.js +21 -0
  188. package/dist/winPath.d.ts +1 -0
  189. package/dist/winPath.js +11 -0
  190. package/package.json +96 -12
  191. package/lib/BabelRegister/BabelRegister.d.ts +0 -9
  192. package/lib/BabelRegister/BabelRegister.js +0 -66
  193. package/lib/Generator/Generator.js +0 -120
  194. package/lib/cheerio/cheerio.d.ts +0 -2
  195. package/lib/cheerio/cheerio.js +0 -37
  196. package/lib/cleanRequireCache/cleanRequireCache.d.ts +0 -1
  197. package/lib/cleanRequireCache/cleanRequireCache.js +0 -40
  198. package/lib/compatESModuleRequire/compatESModuleRequire.d.ts +0 -7
  199. package/lib/compatESModuleRequire/compatESModuleRequire.js +0 -22
  200. package/lib/delay/delay.d.ts +0 -1
  201. package/lib/delay/delay.js +0 -22
  202. package/lib/getFile/getFile.d.ts +0 -22
  203. package/lib/getFile/getFile.js +0 -85
  204. package/lib/index.d.ts +0 -66
  205. package/lib/index.js +0 -619
  206. package/lib/isLernaPackage/isLernaPackage.d.ts +0 -1
  207. package/lib/isLernaPackage/isLernaPackage.js +0 -42
  208. package/lib/mergeConfig/mergeConfig.d.ts +0 -8
  209. package/lib/mergeConfig/mergeConfig.js +0 -42
  210. package/lib/parseRequireDeps/parseRequireDeps.d.ts +0 -1
  211. package/lib/parseRequireDeps/parseRequireDeps.js +0 -98
  212. package/lib/randomColor/randomColor.d.ts +0 -6
  213. package/lib/randomColor/randomColor.js +0 -42
  214. package/lib/routes.d.ts +0 -11
  215. package/lib/routes.js +0 -53
  216. package/lib/ssr.d.ts +0 -12
  217. package/lib/ssr.js +0 -41
  218. package/lib/types.d.ts +0 -7
  219. package/lib/types.js +0 -17
  220. package/lib/winEOL/winEOL.d.ts +0 -7
  221. package/lib/winEOL/winEOL.js +0 -39
  222. package/lib/winPath/winPath.d.ts +0 -1
  223. package/lib/winPath/winPath.js +0 -28
@@ -0,0 +1,1430 @@
1
+ import _ = require("../index");
2
+ declare module "../index" {
3
+ interface LoDashStatic {
4
+ /**
5
+ * The opposite of _.before; this method creates a function that invokes func once it’s called n or more times.
6
+ *
7
+ * @param n The number of calls before func is invoked.
8
+ * @param func The function to restrict.
9
+ * @return Returns the new restricted function.
10
+ */
11
+ after<TFunc extends (...args: any[]) => any>(n: number, func: TFunc): TFunc;
12
+ }
13
+ interface Primitive<T> {
14
+ /**
15
+ * @see _.after
16
+ */
17
+ after<TFunc extends (...args: any[]) => any>(func: TFunc): Function<TFunc>;
18
+ }
19
+ interface PrimitiveChain<T> {
20
+ /**
21
+ * @see _.after
22
+ */
23
+ after<TFunc extends (...args: any[]) => any>(func: TFunc): FunctionChain<TFunc>;
24
+ }
25
+ interface LoDashStatic {
26
+ /**
27
+ * Creates a function that accepts up to n arguments ignoring any additional arguments.
28
+ *
29
+ * @param func The function to cap arguments for.
30
+ * @param n The arity cap.
31
+ * @returns Returns the new function.
32
+ */
33
+ ary(func: (...args: any[]) => any, n?: number): (...args: any[]) => any;
34
+ }
35
+ interface Function<T extends (...args: any) => any> {
36
+ /**
37
+ * @see _.ary
38
+ */
39
+ ary(n?: number): Function<(...args: any[]) => any>;
40
+ }
41
+ interface FunctionChain<T extends (...args: any) => any> {
42
+ /**
43
+ * @see _.ary
44
+ */
45
+ ary(n?: number): FunctionChain<(...args: any[]) => any>;
46
+ }
47
+ interface LoDashStatic {
48
+ /**
49
+ * Creates a function that invokes func, with the this binding and arguments of the created function, while
50
+ * it’s called less than n times. Subsequent calls to the created function return the result of the last func
51
+ * invocation.
52
+ *
53
+ * @param n The number of calls at which func is no longer invoked.
54
+ * @param func The function to restrict.
55
+ * @return Returns the new restricted function.
56
+ */
57
+ before<TFunc extends (...args: any[]) => any>(n: number, func: TFunc): TFunc;
58
+ }
59
+ interface Primitive<T> {
60
+ /**
61
+ * @see _.before
62
+ */
63
+ before<TFunc extends (...args: any[]) => any>(func: TFunc): Function<TFunc>;
64
+ }
65
+ interface PrimitiveChain<T> {
66
+ /**
67
+ * @see _.before
68
+ */
69
+ before<TFunc extends (...args: any[]) => any>(func: TFunc): FunctionChain<TFunc>;
70
+ }
71
+ interface FunctionBind {
72
+ /**
73
+ * @see _.placeholder
74
+ */
75
+ placeholder: __;
76
+ (func: (...args: any[]) => any, thisArg: any, ...partials: any[]): (...args: any[]) => any;
77
+ }
78
+ interface LoDashStatic {
79
+ /**
80
+ * Creates a function that invokes func with the this binding of thisArg and prepends any additional _.bind
81
+ * arguments to those provided to the bound function.
82
+ *
83
+ * The _.bind.placeholder value, which defaults to _ in monolithic builds, may be used as a placeholder for
84
+ * partially applied arguments.
85
+ *
86
+ * Note: Unlike native Function#bind this method does not set the "length" property of bound functions.
87
+ *
88
+ * @param func The function to bind.
89
+ * @param thisArg The this binding of func.
90
+ * @param partials The arguments to be partially applied.
91
+ * @return Returns the new bound function.
92
+ */
93
+ bind: FunctionBind;
94
+ }
95
+ interface LoDashImplicitWrapper<TValue> {
96
+ /**
97
+ * @see _.bind
98
+ */
99
+ bind(thisArg: any, ...partials: any[]): Function<(...args: any[]) => any>;
100
+ }
101
+ interface LoDashExplicitWrapper<TValue> {
102
+ /**
103
+ * @see _.bind
104
+ */
105
+ bind(thisArg: any, ...partials: any[]): FunctionChain<(...args: any[]) => any>;
106
+ }
107
+ interface FunctionBindKey {
108
+ placeholder: __;
109
+ (object: object, key: string, ...partials: any[]): (...args: any[]) => any;
110
+ }
111
+ interface LoDashStatic {
112
+ /**
113
+ * Creates a function that invokes the method at object[key] and prepends any additional _.bindKey arguments
114
+ * to those provided to the bound function.
115
+ *
116
+ * This method differs from _.bind by allowing bound functions to reference methods that may be redefined
117
+ * or don’t yet exist. See Peter Michaux’s article for more details.
118
+ *
119
+ * The _.bindKey.placeholder value, which defaults to _ in monolithic builds, may be used as a placeholder
120
+ * for partially applied arguments.
121
+ *
122
+ * @param object The object the method belongs to.
123
+ * @param key The key of the method.
124
+ * @param partials The arguments to be partially applied.
125
+ * @return Returns the new bound function.
126
+ */
127
+ bindKey: FunctionBindKey;
128
+ }
129
+ interface LoDashImplicitWrapper<TValue> {
130
+ /**
131
+ * @see _.bindKey
132
+ */
133
+ bindKey(key: string, ...partials: any[]): Function<(...args: any[]) => any>;
134
+ }
135
+ interface LoDashExplicitWrapper<TValue> {
136
+ /**
137
+ * @see _.bindKey
138
+ */
139
+ bindKey(key: string, ...partials: any[]): FunctionChain<(...args: any[]) => any>;
140
+ }
141
+ interface Curry {
142
+ <T1, R>(func: (t1: T1) => R, arity?: number): CurriedFunction1<T1, R>;
143
+ <T1, T2, R>(func: (t1: T1, t2: T2) => R, arity?: number): CurriedFunction2<T1, T2, R>;
144
+ <T1, T2, T3, R>(func: (t1: T1, t2: T2, t3: T3) => R, arity?: number): CurriedFunction3<T1, T2, T3, R>;
145
+ <T1, T2, T3, T4, R>(func: (t1: T1, t2: T2, t3: T3, t4: T4) => R, arity?: number): CurriedFunction4<T1, T2, T3, T4, R>;
146
+ <T1, T2, T3, T4, T5, R>(func: (t1: T1, t2: T2, t3: T3, t4: T4, t5: T5) => R, arity?: number): CurriedFunction5<T1, T2, T3, T4, T5, R>;
147
+ (func: (...args: any[]) => any, arity?: number): (...args: any[]) => any;
148
+ placeholder: __;
149
+ }
150
+ interface LoDashStatic {
151
+ curry: Curry;
152
+ }
153
+ interface CurriedFunction1<T1, R> {
154
+ (): CurriedFunction1<T1, R>;
155
+ (t1: T1): R;
156
+ }
157
+ interface CurriedFunction2<T1, T2, R> {
158
+ (): CurriedFunction2<T1, T2, R>;
159
+ (t1: T1): CurriedFunction1<T2, R>;
160
+ (t1: __, t2: T2): CurriedFunction1<T1, R>;
161
+ (t1: T1, t2: T2): R;
162
+ }
163
+ interface CurriedFunction3<T1, T2, T3, R> {
164
+ (): CurriedFunction3<T1, T2, T3, R>;
165
+ (t1: T1): CurriedFunction2<T2, T3, R>;
166
+ (t1: __, t2: T2): CurriedFunction2<T1, T3, R>;
167
+ (t1: T1, t2: T2): CurriedFunction1<T3, R>;
168
+ (t1: __, t2: __, t3: T3): CurriedFunction2<T1, T2, R>;
169
+ (t1: T1, t2: __, t3: T3): CurriedFunction1<T2, R>;
170
+ (t1: __, t2: T2, t3: T3): CurriedFunction1<T1, R>;
171
+ (t1: T1, t2: T2, t3: T3): R;
172
+ }
173
+ interface CurriedFunction4<T1, T2, T3, T4, R> {
174
+ (): CurriedFunction4<T1, T2, T3, T4, R>;
175
+ (t1: T1): CurriedFunction3<T2, T3, T4, R>;
176
+ (t1: __, t2: T2): CurriedFunction3<T1, T3, T4, R>;
177
+ (t1: T1, t2: T2): CurriedFunction2<T3, T4, R>;
178
+ (t1: __, t2: __, t3: T3): CurriedFunction3<T1, T2, T4, R>;
179
+ (t1: __, t2: __, t3: T3): CurriedFunction2<T2, T4, R>;
180
+ (t1: __, t2: T2, t3: T3): CurriedFunction2<T1, T4, R>;
181
+ (t1: T1, t2: T2, t3: T3): CurriedFunction1<T4, R>;
182
+ (t1: __, t2: __, t3: __, t4: T4): CurriedFunction3<T1, T2, T3, R>;
183
+ (t1: T1, t2: __, t3: __, t4: T4): CurriedFunction2<T2, T3, R>;
184
+ (t1: __, t2: T2, t3: __, t4: T4): CurriedFunction2<T1, T3, R>;
185
+ (t1: __, t2: __, t3: T3, t4: T4): CurriedFunction2<T1, T2, R>;
186
+ (t1: T1, t2: T2, t3: __, t4: T4): CurriedFunction1<T3, R>;
187
+ (t1: T1, t2: __, t3: T3, t4: T4): CurriedFunction1<T2, R>;
188
+ (t1: __, t2: T2, t3: T3, t4: T4): CurriedFunction1<T1, R>;
189
+ (t1: T1, t2: T2, t3: T3, t4: T4): R;
190
+ }
191
+ interface CurriedFunction5<T1, T2, T3, T4, T5, R> {
192
+ (): CurriedFunction5<T1, T2, T3, T4, T5, R>;
193
+ (t1: T1): CurriedFunction4<T2, T3, T4, T5, R>;
194
+ (t1: __, t2: T2): CurriedFunction4<T1, T3, T4, T5, R>;
195
+ (t1: T1, t2: T2): CurriedFunction3<T3, T4, T5, R>;
196
+ (t1: __, t2: __, t3: T3): CurriedFunction4<T1, T2, T4, T5, R>;
197
+ (t1: T1, t2: __, t3: T3): CurriedFunction3<T2, T4, T5, R>;
198
+ (t1: __, t2: T2, t3: T3): CurriedFunction3<T1, T4, T5, R>;
199
+ (t1: T1, t2: T2, t3: T3): CurriedFunction2<T4, T5, R>;
200
+ (t1: __, t2: __, t3: __, t4: T4): CurriedFunction4<T1, T2, T3, T5, R>;
201
+ (t1: T1, t2: __, t3: __, t4: T4): CurriedFunction3<T2, T3, T5, R>;
202
+ (t1: __, t2: T2, t3: __, t4: T4): CurriedFunction3<T1, T3, T5, R>;
203
+ (t1: __, t2: __, t3: T3, t4: T4): CurriedFunction3<T1, T2, T5, R>;
204
+ (t1: T1, t2: T2, t3: __, t4: T4): CurriedFunction2<T3, T5, R>;
205
+ (t1: T1, t2: __, t3: T3, t4: T4): CurriedFunction2<T2, T5, R>;
206
+ (t1: __, t2: T2, t3: T3, t4: T4): CurriedFunction2<T1, T5, R>;
207
+ (t1: T1, t2: T2, t3: T3, t4: T4): CurriedFunction1<T5, R>;
208
+ (t1: __, t2: __, t3: __, t4: __, t5: T5): CurriedFunction4<T1, T2, T3, T4, R>;
209
+ (t1: T1, t2: __, t3: __, t4: __, t5: T5): CurriedFunction3<T2, T3, T4, R>;
210
+ (t1: __, t2: T2, t3: __, t4: __, t5: T5): CurriedFunction3<T1, T3, T4, R>;
211
+ (t1: __, t2: __, t3: T3, t4: __, t5: T5): CurriedFunction3<T1, T2, T4, R>;
212
+ (t1: __, t2: __, t3: __, t4: T4, t5: T5): CurriedFunction3<T1, T2, T3, R>;
213
+ (t1: T1, t2: T2, t3: __, t4: __, t5: T5): CurriedFunction2<T3, T4, R>;
214
+ (t1: T1, t2: __, t3: T3, t4: __, t5: T5): CurriedFunction2<T2, T4, R>;
215
+ (t1: T1, t2: __, t3: __, t4: T4, t5: T5): CurriedFunction2<T2, T3, R>;
216
+ (t1: __, t2: T2, t3: T3, t4: __, t5: T5): CurriedFunction2<T1, T4, R>;
217
+ (t1: __, t2: T2, t3: __, t4: T4, t5: T5): CurriedFunction2<T1, T3, R>;
218
+ (t1: __, t2: __, t3: T3, t4: T4, t5: T5): CurriedFunction2<T1, T2, R>;
219
+ (t1: T1, t2: T2, t3: T3, t4: __, t5: T5): CurriedFunction1<T4, R>;
220
+ (t1: T1, t2: T2, t3: __, t4: T4, t5: T5): CurriedFunction1<T3, R>;
221
+ (t1: T1, t2: __, t3: T3, t4: T4, t5: T5): CurriedFunction1<T2, R>;
222
+ (t1: __, t2: T2, t3: T3, t4: T4, t5: T5): CurriedFunction1<T1, R>;
223
+ (t1: T1, t2: T2, t3: T3, t4: T4, t5: T5): R;
224
+ }
225
+ interface RightCurriedFunction1<T1, R> {
226
+ (): RightCurriedFunction1<T1, R>;
227
+ (t1: T1): R;
228
+ }
229
+ interface RightCurriedFunction2<T1, T2, R> {
230
+ (): RightCurriedFunction2<T1, T2, R>;
231
+ (t2: T2): RightCurriedFunction1<T1, R>;
232
+ (t1: T1, t2: __): RightCurriedFunction1<T2, R>;
233
+ (t1: T1, t2: T2): R;
234
+ }
235
+ interface RightCurriedFunction3<T1, T2, T3, R> {
236
+ (): RightCurriedFunction3<T1, T2, T3, R>;
237
+ (t3: T3): RightCurriedFunction2<T1, T2, R>;
238
+ (t2: T2, t3: __): RightCurriedFunction2<T1, T3, R>;
239
+ (t2: T2, t3: T3): RightCurriedFunction1<T1, R>;
240
+ (t1: T1, t2: __, t3: __): RightCurriedFunction2<T2, T3, R>;
241
+ (t1: T1, t2: T2, t3: __): RightCurriedFunction1<T3, R>;
242
+ (t1: T1, t2: __, t3: T3): RightCurriedFunction1<T2, R>;
243
+ (t1: T1, t2: T2, t3: T3): R;
244
+ }
245
+ interface RightCurriedFunction4<T1, T2, T3, T4, R> {
246
+ (): RightCurriedFunction4<T1, T2, T3, T4, R>;
247
+ (t4: T4): RightCurriedFunction3<T1, T2, T3, R>;
248
+ (t3: T3, t4: __): RightCurriedFunction3<T1, T2, T4, R>;
249
+ (t3: T3, t4: T4): RightCurriedFunction2<T1, T2, R>;
250
+ (t2: T2, t3: __, t4: __): RightCurriedFunction3<T1, T3, T4, R>;
251
+ (t2: T2, t3: T3, t4: __): RightCurriedFunction2<T1, T4, R>;
252
+ (t2: T2, t3: __, t4: T4): RightCurriedFunction2<T1, T3, R>;
253
+ (t2: T2, t3: T3, t4: T4): RightCurriedFunction1<T1, R>;
254
+ (t1: T1, t2: __, t3: __, t4: __): RightCurriedFunction3<T2, T3, T4, R>;
255
+ (t1: T1, t2: T2, t3: __, t4: __): RightCurriedFunction2<T3, T4, R>;
256
+ (t1: T1, t2: __, t3: T3, t4: __): RightCurriedFunction2<T2, T4, R>;
257
+ (t1: T1, t2: __, t3: __, t4: T4): RightCurriedFunction2<T2, T3, R>;
258
+ (t1: T1, t2: T2, t3: T3, t4: __): RightCurriedFunction1<T4, R>;
259
+ (t1: T1, t2: T2, t3: __, t4: T4): RightCurriedFunction1<T3, R>;
260
+ (t1: T1, t2: __, t3: T3, t4: T4): RightCurriedFunction1<T2, R>;
261
+ (t1: T1, t2: T2, t3: T3, t4: T4): R;
262
+ }
263
+ interface RightCurriedFunction5<T1, T2, T3, T4, T5, R> {
264
+ (): RightCurriedFunction5<T1, T2, T3, T4, T5, R>;
265
+ (t5: T5): RightCurriedFunction4<T1, T2, T3, T4, R>;
266
+ (t4: T4, t5: __): RightCurriedFunction4<T1, T2, T3, T5, R>;
267
+ (t4: T4, t5: T5): RightCurriedFunction3<T1, T2, T3, R>;
268
+ (t3: T3, t4: __, t5: __): RightCurriedFunction4<T1, T2, T4, T5, R>;
269
+ (t3: T3, t4: T4, t5: __): RightCurriedFunction3<T1, T2, T5, R>;
270
+ (t3: T3, t4: __, t5: T5): RightCurriedFunction3<T1, T2, T4, R>;
271
+ (t3: T3, t4: T4, t5: T5): RightCurriedFunction2<T1, T2, R>;
272
+ (t2: T2, t3: __, t4: __, t5: __): RightCurriedFunction4<T1, T3, T4, T5, R>;
273
+ (t2: T2, t3: T3, t4: __, t5: __): RightCurriedFunction3<T1, T4, T5, R>;
274
+ (t2: T2, t3: __, t4: T4, t5: __): RightCurriedFunction3<T1, T3, T5, R>;
275
+ (t2: T2, t3: __, t4: __, t5: T5): RightCurriedFunction3<T1, T3, T4, R>;
276
+ (t2: T2, t3: T3, t4: T4, t5: __): RightCurriedFunction2<T1, T5, R>;
277
+ (t2: T2, t3: T3, t4: __, t5: T5): RightCurriedFunction2<T1, T4, R>;
278
+ (t2: T2, t3: __, t4: T4, t5: T5): RightCurriedFunction2<T1, T3, R>;
279
+ (t2: T2, t3: T3, t4: T4, t5: T5): RightCurriedFunction1<T1, R>;
280
+ (t1: T1, t2: __, t3: __, t4: __, t5: __): RightCurriedFunction4<T2, T3, T4, T5, R>;
281
+ (t1: T1, t2: T2, t3: __, t4: __, t5: __): RightCurriedFunction3<T3, T4, T5, R>;
282
+ (t1: T1, t2: __, t3: T3, t4: __, t5: __): RightCurriedFunction3<T2, T4, T5, R>;
283
+ (t1: T1, t2: __, t3: __, t4: T4, t5: __): RightCurriedFunction3<T2, T3, T5, R>;
284
+ (t1: T1, t2: __, t3: __, t4: __, t5: T5): RightCurriedFunction3<T2, T3, T4, R>;
285
+ (t1: T1, t2: T2, t3: T3, t4: __, t5: __): RightCurriedFunction2<T4, T5, R>;
286
+ (t1: T1, t2: T2, t3: __, t4: T4, t5: __): RightCurriedFunction2<T3, T5, R>;
287
+ (t1: T1, t2: T2, t3: __, t4: __, t5: T5): RightCurriedFunction2<T3, T4, R>;
288
+ (t1: T1, t2: __, t3: T3, t4: T4, t5: __): RightCurriedFunction2<T2, T5, R>;
289
+ (t1: T1, t2: __, t3: T3, t4: __, t5: T5): RightCurriedFunction2<T2, T4, R>;
290
+ (t1: T1, t2: __, t3: __, t4: T4, t5: T5): RightCurriedFunction2<T2, T3, R>;
291
+ (t1: T1, t2: T2, t3: T3, t4: T4, t5: __): RightCurriedFunction1<T5, R>;
292
+ (t1: T1, t2: T2, t3: T3, t4: __, t5: T5): RightCurriedFunction1<T4, R>;
293
+ (t1: T1, t2: T2, t3: __, t4: T4, t5: T5): RightCurriedFunction1<T3, R>;
294
+ (t1: T1, t2: __, t3: T3, t4: T4, t5: T5): RightCurriedFunction1<T2, R>;
295
+ (t1: T1, t2: T2, t3: T3, t4: T4, t5: T5): R;
296
+ }
297
+ interface Function<T extends (...args: any) => any> {
298
+ /**
299
+ * @see _.curry
300
+ */
301
+ curry(arity?: number):
302
+ T extends (arg1: infer T1) => infer R ? Function<CurriedFunction1<T1, R>> :
303
+ T extends (arg1: infer T1, arg2: infer T2) => infer R ? Function<CurriedFunction2<T1, T2, R>> :
304
+ T extends (arg1: infer T1, arg2: infer T2, arg3: infer T3) => infer R ? Function<CurriedFunction3<T1, T2, T3, R>> :
305
+ T extends (arg1: infer T1, arg2: infer T2, arg3: infer T3, arg4: infer T4) => infer R ? Function<CurriedFunction4<T1, T2, T3, T4, R>> :
306
+ T extends (arg1: infer T1, arg2: infer T2, arg3: infer T3, arg4: infer T4, arg5: infer T5) => infer R ? Function<CurriedFunction5<T1, T2, T3, T4, T5, R>> :
307
+ Function<(...args: any[]) => any>;
308
+ }
309
+ interface FunctionChain<T extends (...args: any) => any> {
310
+ /**
311
+ * @see _.curry
312
+ */
313
+ curry(arity?: number):
314
+ T extends (arg1: infer T1) => infer R ? FunctionChain<CurriedFunction1<T1, R>> :
315
+ T extends (arg1: infer T1, arg2: infer T2) => infer R ? FunctionChain<CurriedFunction2<T1, T2, R>> :
316
+ T extends (arg1: infer T1, arg2: infer T2, arg3: infer T3) => infer R ? FunctionChain<CurriedFunction3<T1, T2, T3, R>> :
317
+ T extends (arg1: infer T1, arg2: infer T2, arg3: infer T3, arg4: infer T4) => infer R ? FunctionChain<CurriedFunction4<T1, T2, T3, T4, R>> :
318
+ T extends (arg1: infer T1, arg2: infer T2, arg3: infer T3, arg4: infer T4, arg5: infer T5) => infer R ? FunctionChain<CurriedFunction5<T1, T2, T3, T4, T5, R>> :
319
+ FunctionChain<(...args: any[]) => any>;
320
+ }
321
+ interface CurryRight {
322
+ <T1, R>(func: (t1: T1) => R, arity?: number): RightCurriedFunction1<T1, R>;
323
+ <T1, T2, R>(func: (t1: T1, t2: T2) => R, arity?: number): RightCurriedFunction2<T1, T2, R>;
324
+ <T1, T2, T3, R>(func: (t1: T1, t2: T2, t3: T3) => R, arity?: number): RightCurriedFunction3<T1, T2, T3, R>;
325
+ <T1, T2, T3, T4, R>(func: (t1: T1, t2: T2, t3: T3, t4: T4) => R, arity?: number): RightCurriedFunction4<T1, T2, T3, T4, R>;
326
+ <T1, T2, T3, T4, T5, R>(func: (t1: T1, t2: T2, t3: T3, t4: T4, t5: T5) => R, arity?: number): RightCurriedFunction5<T1, T2, T3, T4, T5, R>;
327
+ (func: (...args: any[]) => any, arity?: number): (...args: any[]) => any;
328
+ placeholder: __;
329
+ }
330
+ interface LoDashStatic {
331
+ curryRight: CurryRight;
332
+ }
333
+ interface Function<T extends (...args: any) => any> {
334
+ /**
335
+ * @see _.curryRight
336
+ */
337
+ curryRight(arity?: number):
338
+ T extends (arg1: infer T1) => infer R ? Function<RightCurriedFunction1<T1, R>> :
339
+ T extends (arg1: infer T1, arg2: infer T2) => infer R ? Function<RightCurriedFunction2<T1, T2, R>> :
340
+ T extends (arg1: infer T1, arg2: infer T2, arg3: infer T3) => infer R ? Function<RightCurriedFunction3<T1, T2, T3, R>> :
341
+ T extends (arg1: infer T1, arg2: infer T2, arg3: infer T3, arg4: infer T4) => infer R ? Function<RightCurriedFunction4<T1, T2, T3, T4, R>> :
342
+ T extends (arg1: infer T1, arg2: infer T2, arg3: infer T3, arg4: infer T4, arg5: infer T5) => infer R ? Function<RightCurriedFunction5<T1, T2, T3, T4, T5, R>> :
343
+ Function<(...args: any[]) => any>;
344
+ }
345
+ interface FunctionChain<T extends (...args: any) => any> {
346
+ /**
347
+ * @see _.curryRight
348
+ */
349
+ curryRight(arity?: number):
350
+ T extends (arg1: infer T1) => infer R ? FunctionChain<RightCurriedFunction1<T1, R>> :
351
+ T extends (arg1: infer T1, arg2: infer T2) => infer R ? FunctionChain<RightCurriedFunction2<T1, T2, R>> :
352
+ T extends (arg1: infer T1, arg2: infer T2, arg3: infer T3) => infer R ? FunctionChain<RightCurriedFunction3<T1, T2, T3, R>> :
353
+ T extends (arg1: infer T1, arg2: infer T2, arg3: infer T3, arg4: infer T4) => infer R ? FunctionChain<RightCurriedFunction4<T1, T2, T3, T4, R>> :
354
+ T extends (arg1: infer T1, arg2: infer T2, arg3: infer T3, arg4: infer T4, arg5: infer T5) => infer R ? FunctionChain<RightCurriedFunction5<T1, T2, T3, T4, T5, R>> :
355
+ FunctionChain<(...args: any[]) => any>;
356
+ }
357
+ interface DebounceSettings {
358
+ /**
359
+ * @see _.leading
360
+ */
361
+ leading?: boolean | undefined;
362
+ /**
363
+ * @see _.maxWait
364
+ */
365
+ maxWait?: number | undefined;
366
+ /**
367
+ * @see _.trailing
368
+ */
369
+ trailing?: boolean | undefined;
370
+ }
371
+ interface DebouncedFunc<T extends (...args: any[]) => any> {
372
+ /**
373
+ * Call the original function, but applying the debounce rules.
374
+ *
375
+ * If the debounced function can be run immediately, this calls it and returns its return
376
+ * value.
377
+ *
378
+ * Otherwise, it returns the return value of the last invocation, or undefined if the debounced
379
+ * function was not invoked yet.
380
+ */
381
+ (...args: Parameters<T>): ReturnType<T> | undefined;
382
+
383
+ /**
384
+ * Throw away any pending invocation of the debounced function.
385
+ */
386
+ cancel(): void;
387
+
388
+ /**
389
+ * If there is a pending invocation of the debounced function, invoke it immediately and return
390
+ * its return value.
391
+ *
392
+ * Otherwise, return the value from the last invocation, or undefined if the debounced function
393
+ * was never invoked.
394
+ */
395
+ flush(): ReturnType<T> | undefined;
396
+ }
397
+ interface LoDashStatic {
398
+ /**
399
+ * Creates a debounced function that delays invoking func until after wait milliseconds have elapsed since
400
+ * the last time the debounced function was invoked. The debounced function comes with a cancel method to
401
+ * cancel delayed invocations and a flush method to immediately invoke them. Provide an options object to
402
+ * indicate that func should be invoked on the leading and/or trailing edge of the wait timeout. Subsequent
403
+ * calls to the debounced function return the result of the last func invocation.
404
+ *
405
+ * Note: If leading and trailing options are true, func is invoked on the trailing edge of the timeout only
406
+ * if the the debounced function is invoked more than once during the wait timeout.
407
+ *
408
+ * See David Corbacho’s article for details over the differences between _.debounce and _.throttle.
409
+ *
410
+ * @param func The function to debounce.
411
+ * @param wait The number of milliseconds to delay.
412
+ * @param options The options object.
413
+ * @param options.leading Specify invoking on the leading edge of the timeout.
414
+ * @param options.maxWait The maximum time func is allowed to be delayed before it’s invoked.
415
+ * @param options.trailing Specify invoking on the trailing edge of the timeout.
416
+ * @return Returns the new debounced function.
417
+ */
418
+ debounce<T extends (...args: any) => any>(func: T, wait?: number, options?: DebounceSettings): DebouncedFunc<T>;
419
+ }
420
+ interface Function<T extends (...args: any) => any> {
421
+ /**
422
+ * @see _.debounce
423
+ */
424
+ debounce(
425
+ wait?: number,
426
+ options?: DebounceSettings
427
+ ): T extends (...args: any[]) => any ? Function<DebouncedFunc<T>> : never;
428
+ }
429
+ interface FunctionChain<T extends (...args: any) => any> {
430
+ /**
431
+ * @see _.debounce
432
+ */
433
+ debounce(
434
+ wait?: number,
435
+ options?: DebounceSettings
436
+ ): T extends (...args: any[]) => any ? FunctionChain<DebouncedFunc<T>> : never;
437
+ }
438
+ interface LoDashStatic {
439
+ /**
440
+ * Defers invoking the func until the current call stack has cleared. Any additional arguments are provided to
441
+ * func when it’s invoked.
442
+ *
443
+ * @param func The function to defer.
444
+ * @param args The arguments to invoke the function with.
445
+ * @return Returns the timer id.
446
+ */
447
+ defer(func: (...args: any[]) => any, ...args: any[]): number;
448
+ }
449
+ interface LoDashImplicitWrapper<TValue> {
450
+ /**
451
+ * @see _.defer
452
+ */
453
+ defer(...args: any[]): Primitive<number>;
454
+ }
455
+ interface LoDashExplicitWrapper<TValue> {
456
+ /**
457
+ * @see _.defer
458
+ */
459
+ defer(...args: any[]): PrimitiveChain<number>;
460
+ }
461
+ interface LoDashStatic {
462
+ /**
463
+ * Invokes func after wait milliseconds. Any additional arguments are provided to func when it’s invoked.
464
+ *
465
+ * @param func The function to delay.
466
+ * @param wait The number of milliseconds to delay invocation.
467
+ * @param args The arguments to invoke the function with.
468
+ * @return Returns the timer id.
469
+ */
470
+ delay(func: (...args: any[]) => any, wait: number, ...args: any[]): number;
471
+ }
472
+ interface LoDashImplicitWrapper<TValue> {
473
+ /**
474
+ * @see _.delay
475
+ */
476
+ delay(wait: number, ...args: any[]): Primitive<number>;
477
+ }
478
+ interface LoDashExplicitWrapper<TValue> {
479
+ /**
480
+ * @see _.delay
481
+ */
482
+ delay(wait: number, ...args: any[]): PrimitiveChain<number>;
483
+ }
484
+ interface LoDashStatic {
485
+ /**
486
+ * Creates a function that invokes `func` with arguments reversed.
487
+ *
488
+ * @category Function
489
+ * @param func The function to flip arguments for.
490
+ * @returns Returns the new function.
491
+ * @example
492
+ *
493
+ * var flipped = _.flip(function() {
494
+ * return _.toArray(arguments);
495
+ * });
496
+ *
497
+ * flipped('a', 'b', 'c', 'd');
498
+ * // => ['d', 'c', 'b', 'a']
499
+ */
500
+ flip<T extends (...args: any) => any>(func: T): T;
501
+ }
502
+ interface Function<T extends (...args: any) => any> {
503
+ /**
504
+ * @see _.flip
505
+ */
506
+ flip(): this;
507
+ }
508
+ interface FunctionChain<T extends (...args: any) => any> {
509
+ /**
510
+ * @see _.flip
511
+ */
512
+ flip(): this;
513
+ }
514
+ interface MemoizedFunction {
515
+ /**
516
+ * @see _.cache
517
+ */
518
+ cache: MapCache;
519
+ }
520
+ interface LoDashStatic {
521
+ /**
522
+ * Creates a function that memoizes the result of func. If resolver is provided it determines the cache key for
523
+ * storing the result based on the arguments provided to the memoized function. By default, the first argument
524
+ * provided to the memoized function is coerced to a string and used as the cache key. The func is invoked with
525
+ * the this binding of the memoized function.
526
+ *
527
+ * @param func The function to have its output memoized.
528
+ * @param resolver The function to resolve the cache key.
529
+ * @return Returns the new memoizing function.
530
+ */
531
+ memoize: {
532
+ <T extends (...args: any) => any>(func: T, resolver?: (...args: Parameters<T>) => any): T & MemoizedFunction;
533
+ Cache: MapCacheConstructor;
534
+ };
535
+ }
536
+ interface Function<T extends (...args: any) => any> {
537
+ /**
538
+ * @see _.memoize
539
+ */
540
+ memoize(resolver?: (...args: any[]) => any): Function<T & MemoizedFunction>;
541
+ }
542
+ interface FunctionChain<T extends (...args: any) => any> {
543
+ /**
544
+ * @see _.memoize
545
+ */
546
+ memoize(resolver?: (...args: any[]) => any): FunctionChain<T & MemoizedFunction>;
547
+ }
548
+ interface LoDashStatic {
549
+ /**
550
+ * Creates a function that negates the result of the predicate func. The func predicate is invoked with
551
+ * the this binding and arguments of the created function.
552
+ *
553
+ * @param predicate The predicate to negate.
554
+ * @return Returns the new function.
555
+ */
556
+ negate<T extends any[]>(predicate: (...args: T) => boolean): (...args: T) => boolean;
557
+ }
558
+ interface Function<T extends (...args: any) => any> {
559
+ /**
560
+ * @see _.negate
561
+ */
562
+ negate(): Function<(...args: Parameters<T>) => boolean>;
563
+ }
564
+ interface FunctionChain<T extends (...args: any) => any> {
565
+ /**
566
+ * @see _.negate
567
+ */
568
+ negate(): FunctionChain<(...args: Parameters<T>) => boolean>;
569
+ }
570
+ interface LoDashStatic {
571
+ /**
572
+ * Creates a function that is restricted to invoking func once. Repeat calls to the function return the value
573
+ * of the first call. The func is invoked with the this binding and arguments of the created function.
574
+ *
575
+ * @param func The function to restrict.
576
+ * @return Returns the new restricted function.
577
+ */
578
+ once<T extends (...args: any) => any>(func: T): T;
579
+ }
580
+ interface Function<T extends (...args: any) => any> {
581
+ /**
582
+ * @see _.once
583
+ */
584
+ once(): Function<T>;
585
+ }
586
+ interface FunctionChain<T extends (...args: any) => any> {
587
+ /**
588
+ * @see _.once
589
+ */
590
+ once(): FunctionChain<T>;
591
+ }
592
+ interface LoDashStatic {
593
+ /**
594
+ * Creates a function that runs each argument through a corresponding transform function.
595
+ *
596
+ * @param func The function to wrap.
597
+ * @param transforms The functions to transform arguments, specified as individual functions or arrays
598
+ * of functions.
599
+ * @return Returns the new function.
600
+ */
601
+ overArgs(func: (...args: any[]) => any, ...transforms: Array<Many<(...args: any[]) => any>>): (...args: any[]) => any;
602
+ }
603
+ interface Function<T extends (...args: any) => any> {
604
+ /**
605
+ * @see _.overArgs
606
+ */
607
+ overArgs(...transforms: Array<Many<(...args: any[]) => any>>): Function<(...args: any[]) => any>;
608
+ }
609
+ interface FunctionChain<T extends (...args: any) => any> {
610
+ /**
611
+ * @see _.overArgs
612
+ */
613
+ overArgs(...transforms: Array<Many<(...args: any[]) => any>>): FunctionChain<(...args: any[]) => any>;
614
+ }
615
+ interface LoDashStatic {
616
+ /**
617
+ * Creates a function that, when called, invokes func with any additional partial arguments
618
+ * prepended to those provided to the new function. This method is similar to _.bind except
619
+ * it does not alter the this binding.
620
+ * @param func The function to partially apply arguments to.
621
+ * @param args Arguments to be partially applied.
622
+ * @return The new partially applied function.
623
+ */
624
+ partial: Partial;
625
+ }
626
+ type __ = LoDashStatic;
627
+ type Function0<R> = () => R;
628
+ type Function1<T1, R> = (t1: T1) => R;
629
+ type Function2<T1, T2, R> = (t1: T1, t2: T2) => R;
630
+ type Function3<T1, T2, T3, R> = (t1: T1, t2: T2, t3: T3) => R;
631
+ type Function4<T1, T2, T3, T4, R> = (t1: T1, t2: T2, t3: T3, t4: T4) => R;
632
+ interface Partial {
633
+ <T1, T2, R>(func: Function2<T1, T2, R>, plc1: __, arg2: T2): Function1<T1, R>;
634
+ <T1, T2, T3, R>(func: Function3<T1, T2, T3, R>, plc1: __, arg2: T2): Function2<T1, T3, R>;
635
+ <T1, T2, T3, R>(func: Function3<T1, T2, T3, R>, plc1: __, plc2: __, arg3: T3): Function2<T1, T2, R>;
636
+ <T1, T2, T3, R>(func: Function3<T1, T2, T3, R>, arg1: T1, plc2: __, arg3: T3): Function1<T2, R>;
637
+ <T1, T2, T3, R>(func: Function3<T1, T2, T3, R>, plc1: __, arg2: T2, arg3: T3): Function1<T1, R>;
638
+ <T1, T2, T3, T4, R>(func: Function4<T1, T2, T3, T4, R>, plc1: __, arg2: T2): Function3<T1, T3, T4, R>;
639
+ <T1, T2, T3, T4, R>(func: Function4<T1, T2, T3, T4, R>, plc1: __, plc2: __, arg3: T3): Function3<T1, T2, T4, R>;
640
+ <T1, T2, T3, T4, R>(func: Function4<T1, T2, T3, T4, R>, arg1: T1, plc2: __, arg3: T3): Function2<T2, T4, R>;
641
+ <T1, T2, T3, T4, R>(func: Function4<T1, T2, T3, T4, R>, plc1: __, arg2: T2, arg3: T3): Function2<T1, T4, R>;
642
+ <T1, T2, T3, T4, R>(func: Function4<T1, T2, T3, T4, R>, arg1: T1, arg2: T2, arg3: T3): Function1<T4, R>;
643
+ <T1, T2, T3, T4, R>(func: Function4<T1, T2, T3, T4, R>, plc1: __, plc2: __, plc3: __, arg4: T4): Function3<T1, T2, T3, R>;
644
+ <T1, T2, T3, T4, R>(func: Function4<T1, T2, T3, T4, R>, arg1: T1, plc2: __, plc3: __, arg4: T4): Function2<T2, T3, R>;
645
+ <T1, T2, T3, T4, R>(func: Function4<T1, T2, T3, T4, R>, plc1: __, arg2: T2, plc3: __, arg4: T4): Function2<T1, T3, R>;
646
+ <T1, T2, T3, T4, R>(func: Function4<T1, T2, T3, T4, R>, arg1: T1, arg2: T2, plc3: __, arg4: T4): Function1<T3, R>;
647
+ <T1, T2, T3, T4, R>(func: Function4<T1, T2, T3, T4, R>, plc1: __, plc2: __, arg3: T3, arg4: T4): Function2<T1, T2, R>;
648
+ <T1, T2, T3, T4, R>(func: Function4<T1, T2, T3, T4, R>, arg1: T1, plc2: __, arg3: T3, arg4: T4): Function1<T2, R>;
649
+ <T1, T2, T3, T4, R>(func: Function4<T1, T2, T3, T4, R>, plc1: __, arg2: T2, arg3: T3, arg4: T4): Function1<T1, R>;
650
+ <TS extends any[], R>(func: (...ts: TS) => R): (...ts: TS) => R;
651
+ <TS extends any[], T1, R>(func: (t1: T1, ...ts: TS) => R, arg1: T1): (...ts: TS) => R;
652
+ <TS extends any[], T1, T2, R>(func: (t1: T1, t2: T2, ...ts: TS) => R, t1: T1, t2: T2): (...ts: TS) => R;
653
+ <TS extends any[], T1, T2, T3, R>(func: (t1: T1, t2: T2, t3: T3, ...ts: TS) => R, t1: T1, t2: T2, t3: T3): (...ts: TS) => R;
654
+ <TS extends any[], T1, T2, T3, T4, R>(func: (t1: T1, t2: T2, t3: T3, t4: T4, ...ts: TS) => R, t1: T1, t2: T2, t3: T3, t4: T4): (...ts: TS) => R;
655
+ placeholder: __;
656
+ }
657
+ interface Function<T extends (...args: any) => any> {
658
+ /**
659
+ * @see _.partial
660
+ */
661
+ partial<T2>(plc1: __, arg2: T2): Function<
662
+ T extends Function2<infer T1, T2, infer R> ? Function1<T1, R> :
663
+ T extends Function3<infer T1, T2, infer T3, infer R> ? Function2<T1, T3, R> :
664
+ T extends Function4<infer T1, T2, infer T3, infer T4, infer R> ? Function3<T1, T3, T4, R> :
665
+ any
666
+ >;
667
+ /**
668
+ * @see _.partial
669
+ */
670
+ partial<T3>(plc1: __, plc2: __, arg3: T3): Function<
671
+ T extends Function3<infer T1, infer T2, T3, infer R> ? Function2<T1, T2, R> :
672
+ T extends Function4<infer T1, infer T2, T3, infer T4, infer R> ? Function3<T1, T2, T4, R> :
673
+ any
674
+ >;
675
+ /**
676
+ * @see _.partial
677
+ */
678
+ partial<T1, T3>(arg1: T1, plc2: __, arg3: T3): Function<
679
+ T extends Function3<T1, infer T2, T3, infer R> ? Function1<T2, R> :
680
+ T extends Function4<T1, infer T2, T3, infer T4, infer R> ? Function2<T2, T4, R> :
681
+ any
682
+ >;
683
+ /**
684
+ * @see _.partial
685
+ */
686
+ partial<T2, T3>(plc1: __, arg2: T2, arg3: T3): Function<
687
+ T extends Function3<infer T1, T2, T3, infer R> ? Function1<T1, R> :
688
+ T extends Function4<infer T1, T2, T3, infer T4, infer R> ? Function2<T1, T4, R> :
689
+ any
690
+ >;
691
+ /**
692
+ * @see _.partial
693
+ */
694
+ partial<T3>(plc1: __, plc2: __, arg3: T3): Function<
695
+ T extends Function4<infer T1, infer T2, T3, infer T4, infer R> ? Function3<T1, T2, T4, R> :
696
+ any
697
+ >;
698
+ /**
699
+ * @see _.partial
700
+ */
701
+ partial<T1, T4>(arg1: T1, plc2: __, plc3: __, arg4: T4): Function<
702
+ T extends Function4<T1, infer T2, infer T3, T4, infer R> ? Function2<T2, T3, R> :
703
+ any
704
+ >;
705
+ /**
706
+ * @see _.partial
707
+ */
708
+ partial<T2, T4>(plc1: __, arg2: T2, plc3: __, arg4: T4): Function<
709
+ T extends Function4<infer T1, T2, infer T3, T4, infer R> ? Function2<T1, T3, R> :
710
+ any
711
+ >;
712
+ /**
713
+ * @see _.partial
714
+ */
715
+ partial<T1, T2, T4>(arg1: T1, arg2: T2, plc3: __, arg4: T4): Function<
716
+ T extends Function4<T1, T2, infer T3, T4, infer R> ? Function1<T3, R> :
717
+ any
718
+ >;
719
+ /**
720
+ * @see _.partial
721
+ */
722
+ partial<T3, T4>(plc1: __, plc2: __, arg3: T3, arg4: T4): Function<
723
+ T extends Function4<infer T1, infer T2, T3, T4, infer R> ? Function2<T1, T2, R> :
724
+ any
725
+ >;
726
+ /**
727
+ * @see _.partial
728
+ */
729
+ partial<T1, T3, T4>(arg1: T1, plc2: __, arg3: T3, arg4: T4): Function<
730
+ T extends Function4<T1, infer T2, T3, T4, infer R> ? Function1<T2, R> :
731
+ any
732
+ >;
733
+ /**
734
+ * @see _.partial
735
+ */
736
+ partial<T2, T3, T4>(plc1: __, arg2: T2, arg3: T3, arg4: T4): Function<
737
+ T extends Function4<infer T1, T2, T3, T4, infer R> ? Function1<T1, R> :
738
+ any
739
+ >;
740
+ /**
741
+ * @see _.partial
742
+ */
743
+ partial<T1, T2, T3, T4>(arg1: T1, arg2: T2, arg3: T3, arg4: T4): Function<
744
+ T extends (t1: T1, t2: T2, t3: T3, t4: T4, ...ts: infer TS) => infer R ? (...ts: TS) => R :
745
+ any
746
+ >;
747
+ /**
748
+ * @see _.partial
749
+ */
750
+ partial<T1, T2, T3>(arg1: T1, arg2: T2, arg3: T3): Function<
751
+ T extends (t1: T1, t2: T2, t3: T3, ...ts: infer TS) => infer R ? (...ts: TS) => R :
752
+ any
753
+ >;
754
+ /**
755
+ * @see _.partial
756
+ */
757
+ partial<T1, T2>(arg1: T1, arg2: T2): Function<
758
+ T extends (t1: T1, t2: T2, ...ts: infer TS) => infer R ? (...ts: TS) => R :
759
+ any
760
+ >;
761
+ /**
762
+ * @see _.partial
763
+ */
764
+ partial<T1>(arg1: T1): Function<
765
+ T extends (t1: T1, ...ts: infer TS) => infer R ? (...ts: TS) => R :
766
+ any
767
+ >;
768
+ /**
769
+ * @see _.partial
770
+ */
771
+ partial(): Function<T extends (...ts: any[]) => any ? T : any>;
772
+ }
773
+ interface FunctionChain<T extends (...args: any) => any> {
774
+ /**
775
+ * @see _.partial
776
+ */
777
+ partial<T2>(plc1: __, arg2: T2): FunctionChain<
778
+ T extends Function2<infer T1, T2, infer R> ? Function1<T1, R> :
779
+ T extends Function3<infer T1, T2, infer T3, infer R> ? Function2<T1, T3, R> :
780
+ T extends Function4<infer T1, T2, infer T3, infer T4, infer R> ? Function3<T1, T3, T4, R> :
781
+ any
782
+ >;
783
+ /**
784
+ * @see _.partial
785
+ */
786
+ partial<T3>(plc1: __, plc2: __, arg3: T3): FunctionChain<
787
+ T extends Function3<infer T1, infer T2, T3, infer R> ? Function2<T1, T2, R> :
788
+ T extends Function4<infer T1, infer T2, T3, infer T4, infer R> ? Function3<T1, T2, T4, R> :
789
+ any
790
+ >;
791
+ /**
792
+ * @see _.partial
793
+ */
794
+ partial<T1, T3>(arg1: T1, plc2: __, arg3: T3): FunctionChain<
795
+ T extends Function3<T1, infer T2, T3, infer R> ? Function1<T2, R> :
796
+ T extends Function4<T1, infer T2, T3, infer T4, infer R> ? Function2<T2, T4, R> :
797
+ any
798
+ >;
799
+ /**
800
+ * @see _.partial
801
+ */
802
+ partial<T2, T3>(plc1: __, arg2: T2, arg3: T3): FunctionChain<
803
+ T extends Function3<infer T1, T2, T3, infer R> ? Function1<T1, R> :
804
+ T extends Function4<infer T1, T2, T3, infer T4, infer R> ? Function2<T1, T4, R> :
805
+ any
806
+ >;
807
+ /**
808
+ * @see _.partial
809
+ */
810
+ partial<T3>(plc1: __, plc2: __, arg3: T3): FunctionChain<
811
+ T extends Function4<infer T1, infer T2, T3, infer T4, infer R> ? Function3<T1, T2, T4, R> :
812
+ any
813
+ >;
814
+ /**
815
+ * @see _.partial
816
+ */
817
+ partial<T1, T4>(arg1: T1, plc2: __, plc3: __, arg4: T4): FunctionChain<
818
+ T extends Function4<T1, infer T2, infer T3, T4, infer R> ? Function2<T2, T3, R> :
819
+ any
820
+ >;
821
+ /**
822
+ * @see _.partial
823
+ */
824
+ partial<T2, T4>(plc1: __, arg2: T2, plc3: __, arg4: T4): FunctionChain<
825
+ T extends Function4<infer T1, T2, infer T3, T4, infer R> ? Function2<T1, T3, R> :
826
+ any
827
+ >;
828
+ /**
829
+ * @see _.partial
830
+ */
831
+ partial<T1, T2, T4>(arg1: T1, arg2: T2, plc3: __, arg4: T4): FunctionChain<
832
+ T extends Function4<T1, T2, infer T3, T4, infer R> ? Function1<T3, R> :
833
+ any
834
+ >;
835
+ /**
836
+ * @see _.partial
837
+ */
838
+ partial<T3, T4>(plc1: __, plc2: __, arg3: T3, arg4: T4): FunctionChain<
839
+ T extends Function4<infer T1, infer T2, T3, T4, infer R> ? Function2<T1, T2, R> :
840
+ any
841
+ >;
842
+ /**
843
+ * @see _.partial
844
+ */
845
+ partial<T1, T3, T4>(arg1: T1, plc2: __, arg3: T3, arg4: T4): FunctionChain<
846
+ T extends Function4<T1, infer T2, T3, T4, infer R> ? Function1<T2, R> :
847
+ any
848
+ >;
849
+ /**
850
+ * @see _.partial
851
+ */
852
+ partial<T2, T3, T4>(plc1: __, arg2: T2, arg3: T3, arg4: T4): FunctionChain<
853
+ T extends Function4<infer T1, T2, T3, T4, infer R> ? Function1<T1, R> :
854
+ any
855
+ >;
856
+ /**
857
+ * @see _.partial
858
+ */
859
+ partial<T1, T2, T3, T4>(arg1: T1, arg2: T2, arg3: T3, arg4: T4): FunctionChain<
860
+ T extends (t1: T1, t2: T2, t3: T3, t4: T4, ...ts: infer TS) => infer R ? (...ts: TS) => R :
861
+ any
862
+ >;
863
+ /**
864
+ * @see _.partial
865
+ */
866
+ partial<T1, T2, T3>(arg1: T1, arg2: T2, arg3: T3): FunctionChain<
867
+ T extends (t1: T1, t2: T2, t3: T3, ...ts: infer TS) => infer R ? (...ts: TS) => R :
868
+ any
869
+ >;
870
+ /**
871
+ * @see _.partial
872
+ */
873
+ partial<T1, T2>(arg1: T1, arg2: T2): FunctionChain<
874
+ T extends (t1: T1, t2: T2, ...ts: infer TS) => infer R ? (...ts: TS) => R :
875
+ any
876
+ >;
877
+ /**
878
+ * @see _.partial
879
+ */
880
+ partial<T1>(arg1: T1): FunctionChain<
881
+ T extends (t1: T1, ...ts: infer TS) => infer R ? (...ts: TS) => R :
882
+ any
883
+ >;
884
+ /**
885
+ * @see _.partial
886
+ */
887
+ partial(): FunctionChain<T extends (...ts: any[]) => any ? T : any>;
888
+ }
889
+ interface LoDashStatic {
890
+ /**
891
+ * This method is like _.partial except that partial arguments are appended to those provided
892
+ * to the new function.
893
+ * @param func The function to partially apply arguments to.
894
+ * @param args Arguments to be partially applied.
895
+ * @return The new partially applied function.
896
+ */
897
+ partialRight: PartialRight;
898
+ }
899
+ interface PartialRight {
900
+ <R>(func: Function0<R>): Function0<R>;
901
+ <T1, R>(func: Function1<T1, R>): Function1<T1, R>;
902
+ <T1, R>(func: Function1<T1, R>, arg1: T1): Function0<R>;
903
+ <T1, T2, R>(func: Function2<T1, T2, R>): Function2<T1, T2, R>;
904
+ <T1, T2, R>(func: Function2<T1, T2, R>, arg1: T1, plc2: __): Function1<T2, R>;
905
+ <T1, T2, R>(func: Function2<T1, T2, R>, arg2: T2): Function1<T1, R>;
906
+ <T1, T2, R>(func: Function2<T1, T2, R>, arg1: T1, arg2: T2): Function0<R>;
907
+ <T1, T2, T3, R>(func: Function3<T1, T2, T3, R>): Function3<T1, T2, T3, R>;
908
+ <T1, T2, T3, R>(func: Function3<T1, T2, T3, R>, arg1: T1, plc2: __, plc3: __): Function2<T2, T3, R>;
909
+ <T1, T2, T3, R>(func: Function3<T1, T2, T3, R>, arg2: T2, plc3: __): Function2<T1, T3, R>;
910
+ <T1, T2, T3, R>(func: Function3<T1, T2, T3, R>, arg1: T1, arg2: T2, plc3: __): Function1<T3, R>;
911
+ <T1, T2, T3, R>(func: Function3<T1, T2, T3, R>, arg3: T3): Function2<T1, T2, R>;
912
+ <T1, T2, T3, R>(func: Function3<T1, T2, T3, R>, arg1: T1, plc2: __, arg3: T3): Function1<T2, R>;
913
+ <T1, T2, T3, R>(func: Function3<T1, T2, T3, R>, arg2: T2, arg3: T3): Function1<T1, R>;
914
+ <T1, T2, T3, R>(func: Function3<T1, T2, T3, R>, arg1: T1, arg2: T2, arg3: T3): Function0<R>;
915
+ <T1, T2, T3, T4, R>(func: Function4<T1, T2, T3, T4, R>): Function4<T1, T2, T3, T4, R>;
916
+ <T1, T2, T3, T4, R>(func: Function4<T1, T2, T3, T4, R>, arg1: T1, plc2: __, plc3: __, plc4: __): Function3<T2, T3, T4, R>;
917
+ <T1, T2, T3, T4, R>(func: Function4<T1, T2, T3, T4, R>, arg2: T2, plc3: __, plc4: __): Function3<T1, T3, T4, R>;
918
+ <T1, T2, T3, T4, R>(func: Function4<T1, T2, T3, T4, R>, arg1: T1, arg2: T2, plc3: __, plc4: __): Function2<T3, T4, R>;
919
+ <T1, T2, T3, T4, R>(func: Function4<T1, T2, T3, T4, R>, arg3: T3, plc4: __): Function3<T1, T2, T4, R>;
920
+ <T1, T2, T3, T4, R>(func: Function4<T1, T2, T3, T4, R>, arg1: T1, plc2: __, arg3: T3, plc4: __): Function2<T2, T4, R>;
921
+ <T1, T2, T3, T4, R>(func: Function4<T1, T2, T3, T4, R>, arg2: T2, arg3: T3, plc4: __): Function2<T1, T4, R>;
922
+ <T1, T2, T3, T4, R>(func: Function4<T1, T2, T3, T4, R>, arg1: T1, arg2: T2, arg3: T3, plc4: __): Function1<T4, R>;
923
+ <T1, T2, T3, T4, R>(func: Function4<T1, T2, T3, T4, R>, arg4: T4): Function3<T1, T2, T3, R>;
924
+ <T1, T2, T3, T4, R>(func: Function4<T1, T2, T3, T4, R>, arg1: T1, plc2: __, plc3: __, arg4: T4): Function2<T2, T3, R>;
925
+ <T1, T2, T3, T4, R>(func: Function4<T1, T2, T3, T4, R>, arg2: T2, plc3: __, arg4: T4): Function2<T1, T3, R>;
926
+ <T1, T2, T3, T4, R>(func: Function4<T1, T2, T3, T4, R>, arg1: T1, arg2: T2, plc3: __, arg4: T4): Function1<T3, R>;
927
+ <T1, T2, T3, T4, R>(func: Function4<T1, T2, T3, T4, R>, arg3: T3, arg4: T4): Function2<T1, T2, R>;
928
+ <T1, T2, T3, T4, R>(func: Function4<T1, T2, T3, T4, R>, arg1: T1, plc2: __, arg3: T3, arg4: T4): Function1<T2, R>;
929
+ <T1, T2, T3, T4, R>(func: Function4<T1, T2, T3, T4, R>, arg2: T2, arg3: T3, arg4: T4): Function1<T1, R>;
930
+ <T1, T2, T3, T4, R>(func: Function4<T1, T2, T3, T4, R>, arg1: T1, arg2: T2, arg3: T3, arg4: T4): Function0<R>;
931
+ (func: (...args: any[]) => any, ...args: any[]): (...args: any[]) => any;
932
+ placeholder: __;
933
+ }
934
+ interface Function<T extends (...args: any) => any> {
935
+ /**
936
+ * @see _.partialRight
937
+ */
938
+ partialRight<T1>(arg1: T1, plc2: __): Function<
939
+ T extends Function2<T1, infer T2, infer R> ? Function1<T2, R> :
940
+ any
941
+ >;
942
+ /**
943
+ * @see _.partialRight
944
+ */
945
+ partialRight<T2>(arg2: T2): Function<
946
+ T extends Function2<infer T1, T2, infer R> ? Function1<T1, R> : any
947
+ >;
948
+ /**
949
+ * @see _.partialRight
950
+ */
951
+ partialRight<T1>(arg1: T1, plc2: __, plc3: __): Function<
952
+ T extends Function3<T1, infer T2, infer T3, infer R> ? Function2<T2, T3, R> :
953
+ any
954
+ >;
955
+ /**
956
+ * @see _.partialRight
957
+ */
958
+ partialRight<T2>(arg2: T2, plc3: __): Function<
959
+ T extends Function3<infer T1, T2, infer T3, infer R> ? Function2<T1, T3, R> :
960
+ any
961
+ >;
962
+ /**
963
+ * @see _.partialRight
964
+ */
965
+ partialRight<T1, T2>(arg1: T1, arg2: T2, plc3: __): Function<
966
+ T extends Function3<T1, T2, infer T3, infer R> ? Function1<T3, R> :
967
+ any
968
+ >;
969
+ /**
970
+ * @see _.partialRight
971
+ */
972
+ partialRight<T3>(arg3: T3): Function<
973
+ T extends Function3<infer T1, infer T2, T3, infer R> ? Function2<T1, T2, R> :
974
+ any
975
+ >;
976
+ /**
977
+ * @see _.partialRight
978
+ */
979
+ partialRight<T1, T3>(arg1: T1, plc2: __, arg3: T3): Function<
980
+ T extends Function3<T1, infer T2, T3, infer R> ? Function1<T2, R> :
981
+ any
982
+ >;
983
+ /**
984
+ * @see _.partialRight
985
+ */
986
+ partialRight<T2, T3>(arg2: T2, arg3: T3): Function<
987
+ T extends Function3<infer T1, T2, T3, infer R> ? Function1<T1, R> :
988
+ any
989
+ >;
990
+ /**
991
+ * @see _.partialRight
992
+ */
993
+ partialRight<T1>(arg1: T1, plc2: __, plc3: __, plc4: __): Function<
994
+ T extends Function4<T1, infer T2, infer T3, infer T4, infer R> ? Function3<T2, T3, T4, R> :
995
+ any
996
+ >;
997
+ /**
998
+ * @see _.partialRight
999
+ */
1000
+ partialRight<T2>(arg2: T2, plc3: __, plc4: __): Function<
1001
+ T extends Function4<infer T1, T2, infer T3, infer T4, infer R> ? Function3<T1, T3, T4, R> :
1002
+ any
1003
+ >;
1004
+ /**
1005
+ * @see _.partialRight
1006
+ */
1007
+ partialRight<T1, T2>(arg1: T1, arg2: T2, plc3: __, plc4: __): Function<
1008
+ T extends Function4<T1, T2, infer T3, infer T4, infer R> ? Function2<T3, T4, R> :
1009
+ any
1010
+ >;
1011
+ /**
1012
+ * @see _.partialRight
1013
+ */
1014
+ partialRight<T3>(arg3: T3, plc4: __): Function<
1015
+ T extends Function4<infer T1, infer T2, T3, infer T4, infer R> ? Function3<T1, T2, T4, R> :
1016
+ any
1017
+ >;
1018
+ /**
1019
+ * @see _.partialRight
1020
+ */
1021
+ partialRight<T1, T3>(arg1: T1, plc2: __, arg3: T3, plc4: __): Function<
1022
+ T extends Function4<T1, infer T2, infer T3, infer T4, infer R> ? Function2<T2, T4, R> :
1023
+ any
1024
+ >;
1025
+ /**
1026
+ * @see _.partialRight
1027
+ */
1028
+ partialRight<T2, T3>(arg2: T2, arg3: T3, plc4: __): Function<
1029
+ T extends Function4<infer T1, T2, T3, infer T4, infer R> ? Function2<T1, T4, R> :
1030
+ any
1031
+ >;
1032
+ /**
1033
+ * @see _.partialRight
1034
+ */
1035
+ partialRight<T1, T2, T3>(arg1: T1, arg2: T2, arg3: T3, plc4: __): Function<
1036
+ T extends Function4<T1, T2, T3, infer T4, infer R> ? Function1<T4, R> :
1037
+ any
1038
+ >;
1039
+ /**
1040
+ * @see _.partialRight
1041
+ */
1042
+ partialRight<T4>(arg4: T4): Function<
1043
+ T extends Function4<infer T1, infer T2, infer T3, T4, infer R> ? Function3<T1, T2, T3, R> :
1044
+ any
1045
+ >;
1046
+ /**
1047
+ * @see _.partialRight
1048
+ */
1049
+ partialRight<T1, T4>(arg1: T1, plc2: __, plc3: __, arg4: T4): Function<
1050
+ T extends Function4<T1, infer T2, infer T3, T4, infer R> ? Function2<T2, T3, R> :
1051
+ any
1052
+ >;
1053
+ /**
1054
+ * @see _.partialRight
1055
+ */
1056
+ partialRight<T2, T4>(arg2: T2, plc3: __, arg4: T4): Function<
1057
+ T extends Function4<infer T1, T2, infer T3, T4, infer R> ? Function2<T1, T3, R> :
1058
+ any
1059
+ >;
1060
+ /**
1061
+ * @see _.partialRight
1062
+ */
1063
+ partialRight<T1, T2, T4>(arg1: T1, arg2: T2, plc3: __, arg4: T4): Function<
1064
+ T extends Function4<T1, T2, infer T3, T4, infer R> ? Function1<T3, R> :
1065
+ any
1066
+ >;
1067
+ /**
1068
+ * @see _.partialRight
1069
+ */
1070
+ partialRight<T3, T4>(arg3: T3, arg4: T4): Function<
1071
+ T extends Function4<infer T1, infer T2, T3, T4, infer R> ? Function2<T1, T2, R> :
1072
+ any
1073
+ >;
1074
+ /**
1075
+ * @see _.partialRight
1076
+ */
1077
+ partialRight<T1, T3, T4>(arg1: T1, plc2: __, arg3: T3, arg4: T4): Function<
1078
+ T extends Function4<T1, infer T2, T3, T4, infer R> ? Function1<T2, R> :
1079
+ any
1080
+ >;
1081
+ /**
1082
+ * @see _.partialRight
1083
+ */
1084
+ partialRight<T2, T3, T4>(arg2: T2, arg3: T3, arg4: T4): Function<
1085
+ T extends Function4<infer T1, T2, T3, T4, infer R> ? Function1<T1, R> :
1086
+ any
1087
+ >;
1088
+ /**
1089
+ * @see _.partialRight
1090
+ */
1091
+ partialRight<TS extends any[]>(...ts: TS): Function<T extends (...args: TS) => infer R ? () => R : any>;
1092
+ /**
1093
+ * @see _.partialRight
1094
+ */
1095
+ partialRight(): Function<T extends (...ts: any[]) => any ? T : any>;
1096
+ }
1097
+ interface FunctionChain<T extends (...args: any) => any> {
1098
+ /**
1099
+ * @see _.partialRight
1100
+ */
1101
+ partialRight<T1>(arg1: T1, plc2: __): FunctionChain<
1102
+ T extends Function2<T1, infer T2, infer R> ? Function1<T2, R> :
1103
+ any
1104
+ >;
1105
+ /**
1106
+ * @see _.partialRight
1107
+ */
1108
+ partialRight<T2>(arg2: T2): FunctionChain<
1109
+ T extends Function2<infer T1, T2, infer R> ? Function1<T1, R> : any
1110
+ >;
1111
+ /**
1112
+ * @see _.partialRight
1113
+ */
1114
+ partialRight<T1>(arg1: T1, plc2: __, plc3: __): FunctionChain<
1115
+ T extends Function3<T1, infer T2, infer T3, infer R> ? Function2<T2, T3, R> :
1116
+ any
1117
+ >;
1118
+ /**
1119
+ * @see _.partialRight
1120
+ */
1121
+ partialRight<T2>(arg2: T2, plc3: __): FunctionChain<
1122
+ T extends Function3<infer T1, T2, infer T3, infer R> ? Function2<T1, T3, R> :
1123
+ any
1124
+ >;
1125
+ /**
1126
+ * @see _.partialRight
1127
+ */
1128
+ partialRight<T1, T2>(arg1: T1, arg2: T2, plc3: __): FunctionChain<
1129
+ T extends Function3<T1, T2, infer T3, infer R> ? Function1<T3, R> :
1130
+ any
1131
+ >;
1132
+ /**
1133
+ * @see _.partialRight
1134
+ */
1135
+ partialRight<T3>(arg3: T3): FunctionChain<
1136
+ T extends Function3<infer T1, infer T2, T3, infer R> ? Function2<T1, T2, R> :
1137
+ any
1138
+ >;
1139
+ /**
1140
+ * @see _.partialRight
1141
+ */
1142
+ partialRight<T1, T3>(arg1: T1, plc2: __, arg3: T3): FunctionChain<
1143
+ T extends Function3<T1, infer T2, T3, infer R> ? Function1<T2, R> :
1144
+ any
1145
+ >;
1146
+ /**
1147
+ * @see _.partialRight
1148
+ */
1149
+ partialRight<T2, T3>(arg2: T2, arg3: T3): FunctionChain<
1150
+ T extends Function3<infer T1, T2, T3, infer R> ? Function1<T1, R> :
1151
+ any
1152
+ >;
1153
+ /**
1154
+ * @see _.partialRight
1155
+ */
1156
+ partialRight<T1>(arg1: T1, plc2: __, plc3: __, plc4: __): FunctionChain<
1157
+ T extends Function4<T1, infer T2, infer T3, infer T4, infer R> ? Function3<T2, T3, T4, R> :
1158
+ any
1159
+ >;
1160
+ /**
1161
+ * @see _.partialRight
1162
+ */
1163
+ partialRight<T2>(arg2: T2, plc3: __, plc4: __): FunctionChain<
1164
+ T extends Function4<infer T1, T2, infer T3, infer T4, infer R> ? Function3<T1, T3, T4, R> :
1165
+ any
1166
+ >;
1167
+ /**
1168
+ * @see _.partialRight
1169
+ */
1170
+ partialRight<T1, T2>(arg1: T1, arg2: T2, plc3: __, plc4: __): FunctionChain<
1171
+ T extends Function4<T1, T2, infer T3, infer T4, infer R> ? Function2<T3, T4, R> :
1172
+ any
1173
+ >;
1174
+ /**
1175
+ * @see _.partialRight
1176
+ */
1177
+ partialRight<T3>(arg3: T3, plc4: __): FunctionChain<
1178
+ T extends Function4<infer T1, infer T2, T3, infer T4, infer R> ? Function3<T1, T2, T4, R> :
1179
+ any
1180
+ >;
1181
+ /**
1182
+ * @see _.partialRight
1183
+ */
1184
+ partialRight<T1, T3>(arg1: T1, plc2: __, arg3: T3, plc4: __): FunctionChain<
1185
+ T extends Function4<T1, infer T2, infer T3, infer T4, infer R> ? Function2<T2, T4, R> :
1186
+ any
1187
+ >;
1188
+ /**
1189
+ * @see _.partialRight
1190
+ */
1191
+ partialRight<T2, T3>(arg2: T2, arg3: T3, plc4: __): FunctionChain<
1192
+ T extends Function4<infer T1, T2, T3, infer T4, infer R> ? Function2<T1, T4, R> :
1193
+ any
1194
+ >;
1195
+ /**
1196
+ * @see _.partialRight
1197
+ */
1198
+ partialRight<T1, T2, T3>(arg1: T1, arg2: T2, arg3: T3, plc4: __): FunctionChain<
1199
+ T extends Function4<T1, T2, T3, infer T4, infer R> ? Function1<T4, R> :
1200
+ any
1201
+ >;
1202
+ /**
1203
+ * @see _.partialRight
1204
+ */
1205
+ partialRight<T4>(arg4: T4): FunctionChain<
1206
+ T extends Function4<infer T1, infer T2, infer T3, T4, infer R> ? Function3<T1, T2, T3, R> :
1207
+ any
1208
+ >;
1209
+ /**
1210
+ * @see _.partialRight
1211
+ */
1212
+ partialRight<T1, T4>(arg1: T1, plc2: __, plc3: __, arg4: T4): FunctionChain<
1213
+ T extends Function4<T1, infer T2, infer T3, T4, infer R> ? Function2<T2, T3, R> :
1214
+ any
1215
+ >;
1216
+ /**
1217
+ * @see _.partialRight
1218
+ */
1219
+ partialRight<T2, T4>(arg2: T2, plc3: __, arg4: T4): FunctionChain<
1220
+ T extends Function4<infer T1, T2, infer T3, T4, infer R> ? Function2<T1, T3, R> :
1221
+ any
1222
+ >;
1223
+ /**
1224
+ * @see _.partialRight
1225
+ */
1226
+ partialRight<T1, T2, T4>(arg1: T1, arg2: T2, plc3: __, arg4: T4): FunctionChain<
1227
+ T extends Function4<T1, T2, infer T3, T4, infer R> ? Function1<T3, R> :
1228
+ any
1229
+ >;
1230
+ /**
1231
+ * @see _.partialRight
1232
+ */
1233
+ partialRight<T3, T4>(arg3: T3, arg4: T4): FunctionChain<
1234
+ T extends Function4<infer T1, infer T2, T3, T4, infer R> ? Function2<T1, T2, R> :
1235
+ any
1236
+ >;
1237
+ /**
1238
+ * @see _.partialRight
1239
+ */
1240
+ partialRight<T1, T3, T4>(arg1: T1, plc2: __, arg3: T3, arg4: T4): FunctionChain<
1241
+ T extends Function4<T1, infer T2, T3, T4, infer R> ? Function1<T2, R> :
1242
+ any
1243
+ >;
1244
+ /**
1245
+ * @see _.partialRight
1246
+ */
1247
+ partialRight<T2, T3, T4>(arg2: T2, arg3: T3, arg4: T4): FunctionChain<
1248
+ T extends Function4<infer T1, T2, T3, T4, infer R> ? Function1<T1, R> :
1249
+ any
1250
+ >;
1251
+ /**
1252
+ * @see _.partialRight
1253
+ */
1254
+ partialRight<TS extends any[]>(...ts: TS): FunctionChain<T extends (...args: TS) => infer R ? () => R : any>;
1255
+ /**
1256
+ * @see _.partialRight
1257
+ */
1258
+ partialRight(): FunctionChain<T extends (...ts: any[]) => any ? T : any>;
1259
+ }
1260
+ interface LoDashStatic {
1261
+ /**
1262
+ * Creates a function that invokes func with arguments arranged according to the specified indexes where the
1263
+ * argument value at the first index is provided as the first argument, the argument value at the second index
1264
+ * is provided as the second argument, and so on.
1265
+ * @param func The function to rearrange arguments for.
1266
+ * @param indexes The arranged argument indexes, specified as individual indexes or arrays of indexes.
1267
+ * @return Returns the new function.
1268
+ */
1269
+ rearg(func: (...args: any[]) => any, ...indexes: Array<Many<number>>): (...args: any[]) => any;
1270
+ }
1271
+ interface Function<T extends (...args: any) => any> {
1272
+ /**
1273
+ * @see _.rearg
1274
+ */
1275
+ rearg(...indexes: Array<Many<number>>): Function<(...args: any[]) => any>;
1276
+ }
1277
+ interface FunctionChain<T extends (...args: any) => any> {
1278
+ /**
1279
+ * @see _.rearg
1280
+ */
1281
+ rearg(...indexes: Array<Many<number>>): FunctionChain<(...args: any[]) => any>;
1282
+ }
1283
+ interface LoDashStatic {
1284
+ /**
1285
+ * Creates a function that invokes func with the this binding of the created function and arguments from start
1286
+ * and beyond provided as an array.
1287
+ *
1288
+ * Note: This method is based on the rest parameter.
1289
+ *
1290
+ * @param func The function to apply a rest parameter to.
1291
+ * @param start The start position of the rest parameter.
1292
+ * @return Returns the new function.
1293
+ */
1294
+ rest(func: (...args: any[]) => any, start?: number): (...args: any[]) => any;
1295
+ }
1296
+ interface Function<T extends (...args: any) => any> {
1297
+ /**
1298
+ * @see _.rest
1299
+ */
1300
+ rest(start?: number): Function<(...args: any[]) => any>;
1301
+ }
1302
+ interface FunctionChain<T extends (...args: any) => any> {
1303
+ /**
1304
+ * @see _.rest
1305
+ */
1306
+ rest(start?: number): FunctionChain<(...args: any[]) => any>;
1307
+ }
1308
+ interface LoDashStatic {
1309
+ /**
1310
+ * Creates a function that invokes func with the this binding of the created function and an array of arguments
1311
+ * much like Function#apply.
1312
+ *
1313
+ * Note: This method is based on the spread operator.
1314
+ *
1315
+ * @param func The function to spread arguments over.
1316
+ * @return Returns the new function.
1317
+ */
1318
+ spread<TResult>(func: (...args: any[]) => TResult, start?: number): (...args: any[]) => TResult;
1319
+ }
1320
+ interface Function<T extends (...args: any) => any> {
1321
+ /**
1322
+ * @see _.spread
1323
+ */
1324
+ spread(start?: number): Function<(...args: any[]) => ReturnType<T>>;
1325
+ }
1326
+ interface FunctionChain<T extends (...args: any) => any> {
1327
+ /**
1328
+ * @see _.spread
1329
+ */
1330
+ spread(start?: number): FunctionChain<(...args: any[]) => ReturnType<T>>;
1331
+ }
1332
+ interface ThrottleSettings {
1333
+ /**
1334
+ * @see _.leading
1335
+ */
1336
+ leading?: boolean | undefined;
1337
+ /**
1338
+ * @see _.trailing
1339
+ */
1340
+ trailing?: boolean | undefined;
1341
+ }
1342
+ interface LoDashStatic {
1343
+ /**
1344
+ * Creates a throttled function that only invokes func at most once per every wait milliseconds. The throttled
1345
+ * function comes with a cancel method to cancel delayed invocations and a flush method to immediately invoke
1346
+ * them. Provide an options object to indicate that func should be invoked on the leading and/or trailing edge
1347
+ * of the wait timeout. Subsequent calls to the throttled function return the result of the last func call.
1348
+ *
1349
+ * Note: If leading and trailing options are true, func is invoked on the trailing edge of the timeout only if
1350
+ * the the throttled function is invoked more than once during the wait timeout.
1351
+ *
1352
+ * @param func The function to throttle.
1353
+ * @param wait The number of milliseconds to throttle invocations to.
1354
+ * @param options The options object.
1355
+ * @param options.leading Specify invoking on the leading edge of the timeout.
1356
+ * @param options.trailing Specify invoking on the trailing edge of the timeout.
1357
+ * @return Returns the new throttled function.
1358
+ */
1359
+ throttle<T extends (...args: any) => any>(func: T, wait?: number, options?: ThrottleSettings): DebouncedFunc<T>;
1360
+ }
1361
+ interface Function<T extends (...args: any) => any> {
1362
+ /**
1363
+ * @see _.throttle
1364
+ */
1365
+ throttle(
1366
+ wait?: number,
1367
+ options?: ThrottleSettings
1368
+ ): T extends (...args: any[]) => any ? Function<DebouncedFunc<T>> : never;
1369
+ }
1370
+ interface FunctionChain<T extends (...args: any) => any> {
1371
+ /**
1372
+ * @see _.throttle
1373
+ */
1374
+ throttle(
1375
+ wait?: number,
1376
+ options?: ThrottleSettings
1377
+ ): T extends (...args: any[]) => any ? FunctionChain<DebouncedFunc<T>> : never;
1378
+ }
1379
+ interface LoDashStatic {
1380
+ /**
1381
+ * Creates a function that accepts up to one argument, ignoring any
1382
+ * additional arguments.
1383
+ *
1384
+ * @category Function
1385
+ * @param func The function to cap arguments for.
1386
+ * @returns Returns the new function.
1387
+ * @example
1388
+ *
1389
+ * _.map(['6', '8', '10'], _.unary(parseInt));
1390
+ * // => [6, 8, 10]
1391
+ */
1392
+ unary<T, TResult>(func: (arg1: T, ...args: any[]) => TResult): (arg1: T) => TResult;
1393
+ }
1394
+ interface Function<T extends (...args: any) => any> {
1395
+ /**
1396
+ * @see _.unary
1397
+ */
1398
+ unary(): Function<(arg1: Parameters<T>['0']) => ReturnType<T>>;
1399
+ }
1400
+ interface FunctionChain<T extends (...args: any) => any> {
1401
+ /**
1402
+ * @see _.unary
1403
+ */
1404
+ unary(): FunctionChain<(arg1: Parameters<T>['0']) => ReturnType<T>>;
1405
+ }
1406
+ interface LoDashStatic {
1407
+ /**
1408
+ * Creates a function that provides value to the wrapper function as its first argument. Any additional
1409
+ * arguments provided to the function are appended to those provided to the wrapper function. The wrapper is
1410
+ * invoked with the this binding of the created function.
1411
+ *
1412
+ * @param value The value to wrap.
1413
+ * @param wrapper The wrapper function.
1414
+ * @return Returns the new function.
1415
+ */
1416
+ wrap<T, TArgs, TResult>(value: T, wrapper: (value: T, ...args: TArgs[]) => TResult): (...args: TArgs[]) => TResult;
1417
+ }
1418
+ interface LoDashImplicitWrapper<TValue> {
1419
+ /**
1420
+ * @see _.wrap
1421
+ */
1422
+ wrap<TArgs, TResult>(wrapper: (value: TValue, ...args: TArgs[]) => TResult): Function<(...args: TArgs[]) => TResult>;
1423
+ }
1424
+ interface LoDashExplicitWrapper<TValue> {
1425
+ /**
1426
+ * @see _.wrap
1427
+ */
1428
+ wrap<TArgs, TResult>(wrapper: (value: TValue, ...args: TArgs[]) => TResult): FunctionChain<(...args: TArgs[]) => TResult>;
1429
+ }
1430
+ }