1 | import _ = require("../index");
|
2 | declare module "../index" {
|
3 | interface LoDashStatic {
|
4 | |
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 | after<TFunc extends (...args: any[]) => any>(n: number, func: TFunc): TFunc;
|
12 | }
|
13 | interface Primitive<T> {
|
14 | |
15 |
|
16 |
|
17 | after<TFunc extends (...args: any[]) => any>(func: TFunc): Function<TFunc>;
|
18 | }
|
19 | interface PrimitiveChain<T> {
|
20 | |
21 |
|
22 |
|
23 | after<TFunc extends (...args: any[]) => any>(func: TFunc): FunctionChain<TFunc>;
|
24 | }
|
25 | interface LoDashStatic {
|
26 | |
27 |
|
28 |
|
29 |
|
30 |
|
31 |
|
32 |
|
33 | ary(func: (...args: any[]) => any, n?: number): (...args: any[]) => any;
|
34 | }
|
35 | interface Function<T extends (...args: any) => any> {
|
36 | |
37 |
|
38 |
|
39 | ary(n?: number): Function<(...args: any[]) => any>;
|
40 | }
|
41 | interface FunctionChain<T extends (...args: any) => any> {
|
42 | |
43 |
|
44 |
|
45 | ary(n?: number): FunctionChain<(...args: any[]) => any>;
|
46 | }
|
47 | interface LoDashStatic {
|
48 | |
49 |
|
50 |
|
51 |
|
52 |
|
53 |
|
54 |
|
55 |
|
56 |
|
57 | before<TFunc extends (...args: any[]) => any>(n: number, func: TFunc): TFunc;
|
58 | }
|
59 | interface Primitive<T> {
|
60 | |
61 |
|
62 |
|
63 | before<TFunc extends (...args: any[]) => any>(func: TFunc): Function<TFunc>;
|
64 | }
|
65 | interface PrimitiveChain<T> {
|
66 | |
67 |
|
68 |
|
69 | before<TFunc extends (...args: any[]) => any>(func: TFunc): FunctionChain<TFunc>;
|
70 | }
|
71 | interface FunctionBind {
|
72 | |
73 |
|
74 |
|
75 | placeholder: __;
|
76 | (func: (...args: any[]) => any, thisArg: any, ...partials: any[]): (...args: any[]) => any;
|
77 | }
|
78 | interface LoDashStatic {
|
79 | |
80 |
|
81 |
|
82 |
|
83 |
|
84 |
|
85 |
|
86 |
|
87 |
|
88 |
|
89 |
|
90 |
|
91 |
|
92 |
|
93 | bind: FunctionBind;
|
94 | }
|
95 | interface LoDashImplicitWrapper<TValue> {
|
96 | |
97 |
|
98 |
|
99 | bind(thisArg: any, ...partials: any[]): Function<(...args: any[]) => any>;
|
100 | }
|
101 | interface LoDashExplicitWrapper<TValue> {
|
102 | |
103 |
|
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 |
|
114 |
|
115 |
|
116 |
|
117 |
|
118 |
|
119 |
|
120 |
|
121 |
|
122 |
|
123 |
|
124 |
|
125 |
|
126 |
|
127 | bindKey: FunctionBindKey;
|
128 | }
|
129 | interface LoDashImplicitWrapper<TValue> {
|
130 | |
131 |
|
132 |
|
133 | bindKey(key: string, ...partials: any[]): Function<(...args: any[]) => any>;
|
134 | }
|
135 | interface LoDashExplicitWrapper<TValue> {
|
136 | |
137 |
|
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 |
|
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 |
|
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 |
|
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 |
|
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 |
|
360 |
|
361 | leading?: boolean | undefined;
|
362 | |
363 |
|
364 |
|
365 | maxWait?: number | undefined;
|
366 | |
367 |
|
368 |
|
369 | trailing?: boolean | undefined;
|
370 | }
|
371 | interface DebounceSettingsLeading extends DebounceSettings {
|
372 | leading: true;
|
373 | }
|
374 | interface DebouncedFunc<T extends (...args: any[]) => any> {
|
375 | |
376 |
|
377 |
|
378 |
|
379 |
|
380 |
|
381 |
|
382 |
|
383 |
|
384 | (...args: Parameters<T>): ReturnType<T> | undefined;
|
385 |
|
386 | |
387 |
|
388 |
|
389 | cancel(): void;
|
390 |
|
391 | |
392 |
|
393 |
|
394 |
|
395 |
|
396 |
|
397 |
|
398 | flush(): ReturnType<T> | undefined;
|
399 | }
|
400 | interface DebouncedFuncLeading<T extends (...args: any[]) => any> extends DebouncedFunc<T> {
|
401 | (...args: Parameters<T>): ReturnType<T>;
|
402 | flush(): ReturnType<T>;
|
403 | }
|
404 | interface LoDashStatic {
|
405 | |
406 |
|
407 |
|
408 |
|
409 |
|
410 |
|
411 |
|
412 |
|
413 |
|
414 |
|
415 |
|
416 |
|
417 |
|
418 |
|
419 |
|
420 |
|
421 |
|
422 |
|
423 |
|
424 |
|
425 | debounce<T extends (...args: any) => any>(func: T, wait: number | undefined, options: DebounceSettingsLeading): DebouncedFuncLeading<T>;
|
426 | debounce<T extends (...args: any) => any>(func: T, wait?: number, options?: DebounceSettings): DebouncedFunc<T>;
|
427 | }
|
428 | interface Function<T extends (...args: any) => any> {
|
429 | |
430 |
|
431 |
|
432 | debounce(
|
433 | wait: number | undefined,
|
434 | options: DebounceSettingsLeading
|
435 | ): T extends (...args: any[]) => any ? Function<DebouncedFuncLeading<T>> : never;
|
436 | debounce(
|
437 | wait?: number,
|
438 | options?: DebounceSettings
|
439 | ): T extends (...args: any[]) => any ? Function<DebouncedFunc<T>> : never;
|
440 | }
|
441 | interface FunctionChain<T extends (...args: any) => any> {
|
442 | |
443 |
|
444 |
|
445 | debounce(
|
446 | wait: number | undefined,
|
447 | options: DebounceSettingsLeading
|
448 | ): T extends (...args: any[]) => any ? FunctionChain<DebouncedFuncLeading<T>> : never;
|
449 | debounce(
|
450 | wait?: number,
|
451 | options?: DebounceSettings
|
452 | ): T extends (...args: any[]) => any ? FunctionChain<DebouncedFunc<T>> : never;
|
453 | }
|
454 | interface LoDashStatic {
|
455 | |
456 |
|
457 |
|
458 |
|
459 |
|
460 |
|
461 |
|
462 |
|
463 | defer(func: (...args: any[]) => any, ...args: any[]): number;
|
464 | }
|
465 | interface LoDashImplicitWrapper<TValue> {
|
466 | |
467 |
|
468 |
|
469 | defer(...args: any[]): Primitive<number>;
|
470 | }
|
471 | interface LoDashExplicitWrapper<TValue> {
|
472 | |
473 |
|
474 |
|
475 | defer(...args: any[]): PrimitiveChain<number>;
|
476 | }
|
477 | interface LoDashStatic {
|
478 | |
479 |
|
480 |
|
481 |
|
482 |
|
483 |
|
484 |
|
485 |
|
486 | delay(func: (...args: any[]) => any, wait: number, ...args: any[]): number;
|
487 | }
|
488 | interface LoDashImplicitWrapper<TValue> {
|
489 | |
490 |
|
491 |
|
492 | delay(wait: number, ...args: any[]): Primitive<number>;
|
493 | }
|
494 | interface LoDashExplicitWrapper<TValue> {
|
495 | |
496 |
|
497 |
|
498 | delay(wait: number, ...args: any[]): PrimitiveChain<number>;
|
499 | }
|
500 | interface LoDashStatic {
|
501 | |
502 |
|
503 |
|
504 |
|
505 |
|
506 |
|
507 |
|
508 |
|
509 |
|
510 |
|
511 |
|
512 |
|
513 |
|
514 |
|
515 |
|
516 | flip<T extends (...args: any) => any>(func: T): T;
|
517 | }
|
518 | interface Function<T extends (...args: any) => any> {
|
519 | |
520 |
|
521 |
|
522 | flip(): this;
|
523 | }
|
524 | interface FunctionChain<T extends (...args: any) => any> {
|
525 | |
526 |
|
527 |
|
528 | flip(): this;
|
529 | }
|
530 | interface MemoizedFunction {
|
531 | |
532 |
|
533 |
|
534 | cache: MapCache;
|
535 | }
|
536 | interface LoDashStatic {
|
537 | |
538 |
|
539 |
|
540 |
|
541 |
|
542 |
|
543 |
|
544 |
|
545 |
|
546 |
|
547 | memoize: {
|
548 | <T extends (...args: any) => any>(func: T, resolver?: (...args: Parameters<T>) => any): T & MemoizedFunction;
|
549 | Cache: MapCacheConstructor;
|
550 | };
|
551 | }
|
552 | interface Function<T extends (...args: any) => any> {
|
553 | |
554 |
|
555 |
|
556 | memoize(resolver?: (...args: any[]) => any): Function<T & MemoizedFunction>;
|
557 | }
|
558 | interface FunctionChain<T extends (...args: any) => any> {
|
559 | |
560 |
|
561 |
|
562 | memoize(resolver?: (...args: any[]) => any): FunctionChain<T & MemoizedFunction>;
|
563 | }
|
564 | interface LoDashStatic {
|
565 | |
566 |
|
567 |
|
568 |
|
569 |
|
570 |
|
571 |
|
572 | negate<T extends any[]>(predicate: (...args: T) => boolean): (...args: T) => boolean;
|
573 | }
|
574 | interface Function<T extends (...args: any) => any> {
|
575 | |
576 |
|
577 |
|
578 | negate(): Function<(...args: Parameters<T>) => boolean>;
|
579 | }
|
580 | interface FunctionChain<T extends (...args: any) => any> {
|
581 | |
582 |
|
583 |
|
584 | negate(): FunctionChain<(...args: Parameters<T>) => boolean>;
|
585 | }
|
586 | interface LoDashStatic {
|
587 | |
588 |
|
589 |
|
590 |
|
591 |
|
592 |
|
593 |
|
594 | once<T extends (...args: any) => any>(func: T): T;
|
595 | }
|
596 | interface Function<T extends (...args: any) => any> {
|
597 | |
598 |
|
599 |
|
600 | once(): Function<T>;
|
601 | }
|
602 | interface FunctionChain<T extends (...args: any) => any> {
|
603 | |
604 |
|
605 |
|
606 | once(): FunctionChain<T>;
|
607 | }
|
608 | interface LoDashStatic {
|
609 | |
610 |
|
611 |
|
612 |
|
613 |
|
614 |
|
615 |
|
616 |
|
617 | overArgs(func: (...args: any[]) => any, ...transforms: Array<Many<(...args: any[]) => any>>): (...args: any[]) => any;
|
618 | }
|
619 | interface Function<T extends (...args: any) => any> {
|
620 | |
621 |
|
622 |
|
623 | overArgs(...transforms: Array<Many<(...args: any[]) => any>>): Function<(...args: any[]) => any>;
|
624 | }
|
625 | interface FunctionChain<T extends (...args: any) => any> {
|
626 | |
627 |
|
628 |
|
629 | overArgs(...transforms: Array<Many<(...args: any[]) => any>>): FunctionChain<(...args: any[]) => any>;
|
630 | }
|
631 | interface LoDashStatic {
|
632 | |
633 |
|
634 |
|
635 |
|
636 |
|
637 |
|
638 |
|
639 |
|
640 | partial: Partial;
|
641 | }
|
642 | type __ = LoDashStatic;
|
643 | type Function0<R> = () => R;
|
644 | type Function1<T1, R> = (t1: T1) => R;
|
645 | type Function2<T1, T2, R> = (t1: T1, t2: T2) => R;
|
646 | type Function3<T1, T2, T3, R> = (t1: T1, t2: T2, t3: T3) => R;
|
647 | type Function4<T1, T2, T3, T4, R> = (t1: T1, t2: T2, t3: T3, t4: T4) => R;
|
648 | interface Partial {
|
649 | <T1, T2, R>(func: Function2<T1, T2, R>, plc1: __, arg2: T2): Function1<T1, R>;
|
650 | <T1, T2, T3, R>(func: Function3<T1, T2, T3, R>, plc1: __, arg2: T2): Function2<T1, T3, R>;
|
651 | <T1, T2, T3, R>(func: Function3<T1, T2, T3, R>, plc1: __, plc2: __, arg3: T3): Function2<T1, T2, R>;
|
652 | <T1, T2, T3, R>(func: Function3<T1, T2, T3, R>, arg1: T1, plc2: __, arg3: T3): Function1<T2, R>;
|
653 | <T1, T2, T3, R>(func: Function3<T1, T2, T3, R>, plc1: __, arg2: T2, arg3: T3): Function1<T1, R>;
|
654 | <T1, T2, T3, T4, R>(func: Function4<T1, T2, T3, T4, R>, plc1: __, arg2: T2): Function3<T1, T3, T4, R>;
|
655 | <T1, T2, T3, T4, R>(func: Function4<T1, T2, T3, T4, R>, plc1: __, plc2: __, arg3: T3): Function3<T1, T2, T4, R>;
|
656 | <T1, T2, T3, T4, R>(func: Function4<T1, T2, T3, T4, R>, arg1: T1, plc2: __, arg3: T3): Function2<T2, T4, R>;
|
657 | <T1, T2, T3, T4, R>(func: Function4<T1, T2, T3, T4, R>, plc1: __, arg2: T2, arg3: T3): Function2<T1, T4, R>;
|
658 | <T1, T2, T3, T4, R>(func: Function4<T1, T2, T3, T4, R>, plc1: __, plc2: __, plc3: __, arg4: T4): Function3<T1, T2, T3, R>;
|
659 | <T1, T2, T3, T4, R>(func: Function4<T1, T2, T3, T4, R>, arg1: T1, plc2: __, plc3: __, arg4: T4): Function2<T2, T3, R>;
|
660 | <T1, T2, T3, T4, R>(func: Function4<T1, T2, T3, T4, R>, plc1: __, arg2: T2, plc3: __, arg4: T4): Function2<T1, T3, R>;
|
661 | <T1, T2, T3, T4, R>(func: Function4<T1, T2, T3, T4, R>, arg1: T1, arg2: T2, plc3: __, arg4: T4): Function1<T3, R>;
|
662 | <T1, T2, T3, T4, R>(func: Function4<T1, T2, T3, T4, R>, plc1: __, plc2: __, arg3: T3, arg4: T4): Function2<T1, T2, R>;
|
663 | <T1, T2, T3, T4, R>(func: Function4<T1, T2, T3, T4, R>, arg1: T1, plc2: __, arg3: T3, arg4: T4): Function1<T2, R>;
|
664 | <T1, T2, T3, T4, R>(func: Function4<T1, T2, T3, T4, R>, plc1: __, arg2: T2, arg3: T3, arg4: T4): Function1<T1, R>;
|
665 | <TS extends any[], R>(func: (...ts: TS) => R): (...ts: TS) => R;
|
666 | <TS extends any[], T1, R>(func: (t1: T1, ...ts: TS) => R, arg1: T1): (...ts: TS) => R;
|
667 | <TS extends any[], T1, T2, R>(func: (t1: T1, t2: T2, ...ts: TS) => R, t1: T1, t2: T2): (...ts: TS) => R;
|
668 | <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;
|
669 | <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;
|
670 | placeholder: __;
|
671 | }
|
672 | interface Function<T extends (...args: any) => any> {
|
673 | |
674 |
|
675 |
|
676 | partial<T2>(plc1: __, arg2: T2): Function<
|
677 | T extends Function2<infer T1, T2, infer R> ? Function1<T1, R> :
|
678 | T extends Function3<infer T1, T2, infer T3, infer R> ? Function2<T1, T3, R> :
|
679 | T extends Function4<infer T1, T2, infer T3, infer T4, infer R> ? Function3<T1, T3, T4, R> :
|
680 | any
|
681 | >;
|
682 | |
683 |
|
684 |
|
685 | partial<T3>(plc1: __, plc2: __, arg3: T3): Function<
|
686 | T extends Function3<infer T1, infer T2, T3, infer R> ? Function2<T1, T2, R> :
|
687 | T extends Function4<infer T1, infer T2, T3, infer T4, infer R> ? Function3<T1, T2, T4, R> :
|
688 | any
|
689 | >;
|
690 | |
691 |
|
692 |
|
693 | partial<T1, T3>(arg1: T1, plc2: __, arg3: T3): Function<
|
694 | T extends Function3<T1, infer T2, T3, infer R> ? Function1<T2, R> :
|
695 | T extends Function4<T1, infer T2, T3, infer T4, infer R> ? Function2<T2, T4, R> :
|
696 | any
|
697 | >;
|
698 | |
699 |
|
700 |
|
701 | partial<T2, T3>(plc1: __, arg2: T2, arg3: T3): Function<
|
702 | T extends Function3<infer T1, T2, T3, infer R> ? Function1<T1, R> :
|
703 | T extends Function4<infer T1, T2, T3, infer T4, infer R> ? Function2<T1, T4, R> :
|
704 | any
|
705 | >;
|
706 | |
707 |
|
708 |
|
709 | partial<T3>(plc1: __, plc2: __, arg3: T3): Function<
|
710 | T extends Function4<infer T1, infer T2, T3, infer T4, infer R> ? Function3<T1, T2, T4, R> :
|
711 | any
|
712 | >;
|
713 | |
714 |
|
715 |
|
716 | partial<T1, T4>(arg1: T1, plc2: __, plc3: __, arg4: T4): Function<
|
717 | T extends Function4<T1, infer T2, infer T3, T4, infer R> ? Function2<T2, T3, R> :
|
718 | any
|
719 | >;
|
720 | |
721 |
|
722 |
|
723 | partial<T2, T4>(plc1: __, arg2: T2, plc3: __, arg4: T4): Function<
|
724 | T extends Function4<infer T1, T2, infer T3, T4, infer R> ? Function2<T1, T3, R> :
|
725 | any
|
726 | >;
|
727 | |
728 |
|
729 |
|
730 | partial<T1, T2, T4>(arg1: T1, arg2: T2, plc3: __, arg4: T4): Function<
|
731 | T extends Function4<T1, T2, infer T3, T4, infer R> ? Function1<T3, R> :
|
732 | any
|
733 | >;
|
734 | |
735 |
|
736 |
|
737 | partial<T3, T4>(plc1: __, plc2: __, arg3: T3, arg4: T4): Function<
|
738 | T extends Function4<infer T1, infer T2, T3, T4, infer R> ? Function2<T1, T2, R> :
|
739 | any
|
740 | >;
|
741 | |
742 |
|
743 |
|
744 | partial<T1, T3, T4>(arg1: T1, plc2: __, arg3: T3, arg4: T4): Function<
|
745 | T extends Function4<T1, infer T2, T3, T4, infer R> ? Function1<T2, R> :
|
746 | any
|
747 | >;
|
748 | |
749 |
|
750 |
|
751 | partial<T2, T3, T4>(plc1: __, arg2: T2, arg3: T3, arg4: T4): Function<
|
752 | T extends Function4<infer T1, T2, T3, T4, infer R> ? Function1<T1, R> :
|
753 | any
|
754 | >;
|
755 | |
756 |
|
757 |
|
758 | partial<T1, T2, T3, T4>(arg1: T1, arg2: T2, arg3: T3, arg4: T4): Function<
|
759 | T extends (t1: T1, t2: T2, t3: T3, t4: T4, ...ts: infer TS) => infer R ? (...ts: TS) => R :
|
760 | any
|
761 | >;
|
762 | |
763 |
|
764 |
|
765 | partial<T1, T2, T3>(arg1: T1, arg2: T2, arg3: T3): Function<
|
766 | T extends (t1: T1, t2: T2, t3: T3, ...ts: infer TS) => infer R ? (...ts: TS) => R :
|
767 | any
|
768 | >;
|
769 | |
770 |
|
771 |
|
772 | partial<T1, T2>(arg1: T1, arg2: T2): Function<
|
773 | T extends (t1: T1, t2: T2, ...ts: infer TS) => infer R ? (...ts: TS) => R :
|
774 | any
|
775 | >;
|
776 | |
777 |
|
778 |
|
779 | partial<T1>(arg1: T1): Function<
|
780 | T extends (t1: T1, ...ts: infer TS) => infer R ? (...ts: TS) => R :
|
781 | any
|
782 | >;
|
783 | |
784 |
|
785 |
|
786 | partial(): Function<T extends (...ts: any[]) => any ? T : any>;
|
787 | }
|
788 | interface FunctionChain<T extends (...args: any) => any> {
|
789 | |
790 |
|
791 |
|
792 | partial<T2>(plc1: __, arg2: T2): FunctionChain<
|
793 | T extends Function2<infer T1, T2, infer R> ? Function1<T1, R> :
|
794 | T extends Function3<infer T1, T2, infer T3, infer R> ? Function2<T1, T3, R> :
|
795 | T extends Function4<infer T1, T2, infer T3, infer T4, infer R> ? Function3<T1, T3, T4, R> :
|
796 | any
|
797 | >;
|
798 | |
799 |
|
800 |
|
801 | partial<T3>(plc1: __, plc2: __, arg3: T3): FunctionChain<
|
802 | T extends Function3<infer T1, infer T2, T3, infer R> ? Function2<T1, T2, R> :
|
803 | T extends Function4<infer T1, infer T2, T3, infer T4, infer R> ? Function3<T1, T2, T4, R> :
|
804 | any
|
805 | >;
|
806 | |
807 |
|
808 |
|
809 | partial<T1, T3>(arg1: T1, plc2: __, arg3: T3): FunctionChain<
|
810 | T extends Function3<T1, infer T2, T3, infer R> ? Function1<T2, R> :
|
811 | T extends Function4<T1, infer T2, T3, infer T4, infer R> ? Function2<T2, T4, R> :
|
812 | any
|
813 | >;
|
814 | |
815 |
|
816 |
|
817 | partial<T2, T3>(plc1: __, arg2: T2, arg3: T3): FunctionChain<
|
818 | T extends Function3<infer T1, T2, T3, infer R> ? Function1<T1, R> :
|
819 | T extends Function4<infer T1, T2, T3, infer T4, infer R> ? Function2<T1, T4, R> :
|
820 | any
|
821 | >;
|
822 | |
823 |
|
824 |
|
825 | partial<T3>(plc1: __, plc2: __, arg3: T3): FunctionChain<
|
826 | T extends Function4<infer T1, infer T2, T3, infer T4, infer R> ? Function3<T1, T2, T4, R> :
|
827 | any
|
828 | >;
|
829 | |
830 |
|
831 |
|
832 | partial<T1, T4>(arg1: T1, plc2: __, plc3: __, arg4: T4): FunctionChain<
|
833 | T extends Function4<T1, infer T2, infer T3, T4, infer R> ? Function2<T2, T3, R> :
|
834 | any
|
835 | >;
|
836 | |
837 |
|
838 |
|
839 | partial<T2, T4>(plc1: __, arg2: T2, plc3: __, arg4: T4): FunctionChain<
|
840 | T extends Function4<infer T1, T2, infer T3, T4, infer R> ? Function2<T1, T3, R> :
|
841 | any
|
842 | >;
|
843 | |
844 |
|
845 |
|
846 | partial<T1, T2, T4>(arg1: T1, arg2: T2, plc3: __, arg4: T4): FunctionChain<
|
847 | T extends Function4<T1, T2, infer T3, T4, infer R> ? Function1<T3, R> :
|
848 | any
|
849 | >;
|
850 | |
851 |
|
852 |
|
853 | partial<T3, T4>(plc1: __, plc2: __, arg3: T3, arg4: T4): FunctionChain<
|
854 | T extends Function4<infer T1, infer T2, T3, T4, infer R> ? Function2<T1, T2, R> :
|
855 | any
|
856 | >;
|
857 | |
858 |
|
859 |
|
860 | partial<T1, T3, T4>(arg1: T1, plc2: __, arg3: T3, arg4: T4): FunctionChain<
|
861 | T extends Function4<T1, infer T2, T3, T4, infer R> ? Function1<T2, R> :
|
862 | any
|
863 | >;
|
864 | |
865 |
|
866 |
|
867 | partial<T2, T3, T4>(plc1: __, arg2: T2, arg3: T3, arg4: T4): FunctionChain<
|
868 | T extends Function4<infer T1, T2, T3, T4, infer R> ? Function1<T1, R> :
|
869 | any
|
870 | >;
|
871 | |
872 |
|
873 |
|
874 | partial<T1, T2, T3, T4>(arg1: T1, arg2: T2, arg3: T3, arg4: T4): FunctionChain<
|
875 | T extends (t1: T1, t2: T2, t3: T3, t4: T4, ...ts: infer TS) => infer R ? (...ts: TS) => R :
|
876 | any
|
877 | >;
|
878 | |
879 |
|
880 |
|
881 | partial<T1, T2, T3>(arg1: T1, arg2: T2, arg3: T3): FunctionChain<
|
882 | T extends (t1: T1, t2: T2, t3: T3, ...ts: infer TS) => infer R ? (...ts: TS) => R :
|
883 | any
|
884 | >;
|
885 | |
886 |
|
887 |
|
888 | partial<T1, T2>(arg1: T1, arg2: T2): FunctionChain<
|
889 | T extends (t1: T1, t2: T2, ...ts: infer TS) => infer R ? (...ts: TS) => R :
|
890 | any
|
891 | >;
|
892 | |
893 |
|
894 |
|
895 | partial<T1>(arg1: T1): FunctionChain<
|
896 | T extends (t1: T1, ...ts: infer TS) => infer R ? (...ts: TS) => R :
|
897 | any
|
898 | >;
|
899 | |
900 |
|
901 |
|
902 | partial(): FunctionChain<T extends (...ts: any[]) => any ? T : any>;
|
903 | }
|
904 | interface LoDashStatic {
|
905 | |
906 |
|
907 |
|
908 |
|
909 |
|
910 |
|
911 |
|
912 | partialRight: PartialRight;
|
913 | }
|
914 | interface PartialRight {
|
915 | <R>(func: Function0<R>): Function0<R>;
|
916 | <T1, R>(func: Function1<T1, R>): Function1<T1, R>;
|
917 | <T1, R>(func: Function1<T1, R>, arg1: T1): Function0<R>;
|
918 | <T1, T2, R>(func: Function2<T1, T2, R>): Function2<T1, T2, R>;
|
919 | <T1, T2, R>(func: Function2<T1, T2, R>, arg1: T1, plc2: __): Function1<T2, R>;
|
920 | <T1, T2, R>(func: Function2<T1, T2, R>, arg2: T2): Function1<T1, R>;
|
921 | <T1, T2, R>(func: Function2<T1, T2, R>, arg1: T1, arg2: T2): Function0<R>;
|
922 | <T1, T2, T3, R>(func: Function3<T1, T2, T3, R>): Function3<T1, T2, T3, R>;
|
923 | <T1, T2, T3, R>(func: Function3<T1, T2, T3, R>, arg1: T1, plc2: __, plc3: __): Function2<T2, T3, R>;
|
924 | <T1, T2, T3, R>(func: Function3<T1, T2, T3, R>, arg2: T2, plc3: __): Function2<T1, T3, R>;
|
925 | <T1, T2, T3, R>(func: Function3<T1, T2, T3, R>, arg1: T1, arg2: T2, plc3: __): Function1<T3, R>;
|
926 | <T1, T2, T3, R>(func: Function3<T1, T2, T3, R>, arg3: T3): Function2<T1, T2, R>;
|
927 | <T1, T2, T3, R>(func: Function3<T1, T2, T3, R>, arg1: T1, plc2: __, arg3: T3): Function1<T2, R>;
|
928 | <T1, T2, T3, R>(func: Function3<T1, T2, T3, R>, arg2: T2, arg3: T3): Function1<T1, R>;
|
929 | <T1, T2, T3, R>(func: Function3<T1, T2, T3, R>, arg1: T1, arg2: T2, arg3: T3): Function0<R>;
|
930 | <T1, T2, T3, T4, R>(func: Function4<T1, T2, T3, T4, R>): Function4<T1, T2, T3, T4, R>;
|
931 | <T1, T2, T3, T4, R>(func: Function4<T1, T2, T3, T4, R>, arg1: T1, plc2: __, plc3: __, plc4: __): Function3<T2, T3, T4, R>;
|
932 | <T1, T2, T3, T4, R>(func: Function4<T1, T2, T3, T4, R>, arg2: T2, plc3: __, plc4: __): Function3<T1, T3, T4, R>;
|
933 | <T1, T2, T3, T4, R>(func: Function4<T1, T2, T3, T4, R>, arg1: T1, arg2: T2, plc3: __, plc4: __): Function2<T3, T4, R>;
|
934 | <T1, T2, T3, T4, R>(func: Function4<T1, T2, T3, T4, R>, arg3: T3, plc4: __): Function3<T1, T2, T4, R>;
|
935 | <T1, T2, T3, T4, R>(func: Function4<T1, T2, T3, T4, R>, arg1: T1, plc2: __, arg3: T3, plc4: __): Function2<T2, T4, R>;
|
936 | <T1, T2, T3, T4, R>(func: Function4<T1, T2, T3, T4, R>, arg2: T2, arg3: T3, plc4: __): Function2<T1, T4, R>;
|
937 | <T1, T2, T3, T4, R>(func: Function4<T1, T2, T3, T4, R>, arg1: T1, arg2: T2, arg3: T3, plc4: __): Function1<T4, R>;
|
938 | <T1, T2, T3, T4, R>(func: Function4<T1, T2, T3, T4, R>, arg4: T4): Function3<T1, T2, T3, R>;
|
939 | <T1, T2, T3, T4, R>(func: Function4<T1, T2, T3, T4, R>, arg1: T1, plc2: __, plc3: __, arg4: T4): Function2<T2, T3, R>;
|
940 | <T1, T2, T3, T4, R>(func: Function4<T1, T2, T3, T4, R>, arg2: T2, plc3: __, arg4: T4): Function2<T1, T3, R>;
|
941 | <T1, T2, T3, T4, R>(func: Function4<T1, T2, T3, T4, R>, arg1: T1, arg2: T2, plc3: __, arg4: T4): Function1<T3, R>;
|
942 | <T1, T2, T3, T4, R>(func: Function4<T1, T2, T3, T4, R>, arg3: T3, arg4: T4): Function2<T1, T2, R>;
|
943 | <T1, T2, T3, T4, R>(func: Function4<T1, T2, T3, T4, R>, arg1: T1, plc2: __, arg3: T3, arg4: T4): Function1<T2, R>;
|
944 | <T1, T2, T3, T4, R>(func: Function4<T1, T2, T3, T4, R>, arg2: T2, arg3: T3, arg4: T4): Function1<T1, R>;
|
945 | <T1, T2, T3, T4, R>(func: Function4<T1, T2, T3, T4, R>, arg1: T1, arg2: T2, arg3: T3, arg4: T4): Function0<R>;
|
946 | (func: (...args: any[]) => any, ...args: any[]): (...args: any[]) => any;
|
947 | placeholder: __;
|
948 | }
|
949 | interface Function<T extends (...args: any) => any> {
|
950 | |
951 |
|
952 |
|
953 | partialRight<T1>(arg1: T1, plc2: __): Function<
|
954 | T extends Function2<T1, infer T2, infer R> ? Function1<T2, R> :
|
955 | any
|
956 | >;
|
957 | |
958 |
|
959 |
|
960 | partialRight<T2>(arg2: T2): Function<
|
961 | T extends Function2<infer T1, T2, infer R> ? Function1<T1, R> : any
|
962 | >;
|
963 | |
964 |
|
965 |
|
966 | partialRight<T1>(arg1: T1, plc2: __, plc3: __): Function<
|
967 | T extends Function3<T1, infer T2, infer T3, infer R> ? Function2<T2, T3, R> :
|
968 | any
|
969 | >;
|
970 | |
971 |
|
972 |
|
973 | partialRight<T2>(arg2: T2, plc3: __): Function<
|
974 | T extends Function3<infer T1, T2, infer T3, infer R> ? Function2<T1, T3, R> :
|
975 | any
|
976 | >;
|
977 | |
978 |
|
979 |
|
980 | partialRight<T1, T2>(arg1: T1, arg2: T2, plc3: __): Function<
|
981 | T extends Function3<T1, T2, infer T3, infer R> ? Function1<T3, R> :
|
982 | any
|
983 | >;
|
984 | |
985 |
|
986 |
|
987 | partialRight<T3>(arg3: T3): Function<
|
988 | T extends Function3<infer T1, infer T2, T3, infer R> ? Function2<T1, T2, R> :
|
989 | any
|
990 | >;
|
991 | |
992 |
|
993 |
|
994 | partialRight<T1, T3>(arg1: T1, plc2: __, arg3: T3): Function<
|
995 | T extends Function3<T1, infer T2, T3, infer R> ? Function1<T2, R> :
|
996 | any
|
997 | >;
|
998 | |
999 |
|
1000 |
|
1001 | partialRight<T2, T3>(arg2: T2, arg3: T3): Function<
|
1002 | T extends Function3<infer T1, T2, T3, infer R> ? Function1<T1, R> :
|
1003 | any
|
1004 | >;
|
1005 | |
1006 |
|
1007 |
|
1008 | partialRight<T1>(arg1: T1, plc2: __, plc3: __, plc4: __): Function<
|
1009 | T extends Function4<T1, infer T2, infer T3, infer T4, infer R> ? Function3<T2, T3, T4, R> :
|
1010 | any
|
1011 | >;
|
1012 | |
1013 |
|
1014 |
|
1015 | partialRight<T2>(arg2: T2, plc3: __, plc4: __): Function<
|
1016 | T extends Function4<infer T1, T2, infer T3, infer T4, infer R> ? Function3<T1, T3, T4, R> :
|
1017 | any
|
1018 | >;
|
1019 | |
1020 |
|
1021 |
|
1022 | partialRight<T1, T2>(arg1: T1, arg2: T2, plc3: __, plc4: __): Function<
|
1023 | T extends Function4<T1, T2, infer T3, infer T4, infer R> ? Function2<T3, T4, R> :
|
1024 | any
|
1025 | >;
|
1026 | |
1027 |
|
1028 |
|
1029 | partialRight<T3>(arg3: T3, plc4: __): Function<
|
1030 | T extends Function4<infer T1, infer T2, T3, infer T4, infer R> ? Function3<T1, T2, T4, R> :
|
1031 | any
|
1032 | >;
|
1033 | |
1034 |
|
1035 |
|
1036 | partialRight<T1, T3>(arg1: T1, plc2: __, arg3: T3, plc4: __): Function<
|
1037 | T extends Function4<T1, infer T2, infer T3, infer T4, infer R> ? Function2<T2, T4, R> :
|
1038 | any
|
1039 | >;
|
1040 | |
1041 |
|
1042 |
|
1043 | partialRight<T2, T3>(arg2: T2, arg3: T3, plc4: __): Function<
|
1044 | T extends Function4<infer T1, T2, T3, infer T4, infer R> ? Function2<T1, T4, R> :
|
1045 | any
|
1046 | >;
|
1047 | |
1048 |
|
1049 |
|
1050 | partialRight<T1, T2, T3>(arg1: T1, arg2: T2, arg3: T3, plc4: __): Function<
|
1051 | T extends Function4<T1, T2, T3, infer T4, infer R> ? Function1<T4, R> :
|
1052 | any
|
1053 | >;
|
1054 | |
1055 |
|
1056 |
|
1057 | partialRight<T4>(arg4: T4): Function<
|
1058 | T extends Function4<infer T1, infer T2, infer T3, T4, infer R> ? Function3<T1, T2, T3, R> :
|
1059 | any
|
1060 | >;
|
1061 | |
1062 |
|
1063 |
|
1064 | partialRight<T1, T4>(arg1: T1, plc2: __, plc3: __, arg4: T4): Function<
|
1065 | T extends Function4<T1, infer T2, infer T3, T4, infer R> ? Function2<T2, T3, R> :
|
1066 | any
|
1067 | >;
|
1068 | |
1069 |
|
1070 |
|
1071 | partialRight<T2, T4>(arg2: T2, plc3: __, arg4: T4): Function<
|
1072 | T extends Function4<infer T1, T2, infer T3, T4, infer R> ? Function2<T1, T3, R> :
|
1073 | any
|
1074 | >;
|
1075 | |
1076 |
|
1077 |
|
1078 | partialRight<T1, T2, T4>(arg1: T1, arg2: T2, plc3: __, arg4: T4): Function<
|
1079 | T extends Function4<T1, T2, infer T3, T4, infer R> ? Function1<T3, R> :
|
1080 | any
|
1081 | >;
|
1082 | |
1083 |
|
1084 |
|
1085 | partialRight<T3, T4>(arg3: T3, arg4: T4): Function<
|
1086 | T extends Function4<infer T1, infer T2, T3, T4, infer R> ? Function2<T1, T2, R> :
|
1087 | any
|
1088 | >;
|
1089 | |
1090 |
|
1091 |
|
1092 | partialRight<T1, T3, T4>(arg1: T1, plc2: __, arg3: T3, arg4: T4): Function<
|
1093 | T extends Function4<T1, infer T2, T3, T4, infer R> ? Function1<T2, R> :
|
1094 | any
|
1095 | >;
|
1096 | |
1097 |
|
1098 |
|
1099 | partialRight<T2, T3, T4>(arg2: T2, arg3: T3, arg4: T4): Function<
|
1100 | T extends Function4<infer T1, T2, T3, T4, infer R> ? Function1<T1, R> :
|
1101 | any
|
1102 | >;
|
1103 | |
1104 |
|
1105 |
|
1106 | partialRight<TS extends any[]>(...ts: TS): Function<T extends (...args: TS) => infer R ? () => R : any>;
|
1107 | |
1108 |
|
1109 |
|
1110 | partialRight(): Function<T extends (...ts: any[]) => any ? T : any>;
|
1111 | }
|
1112 | interface FunctionChain<T extends (...args: any) => any> {
|
1113 | |
1114 |
|
1115 |
|
1116 | partialRight<T1>(arg1: T1, plc2: __): FunctionChain<
|
1117 | T extends Function2<T1, infer T2, infer R> ? Function1<T2, R> :
|
1118 | any
|
1119 | >;
|
1120 | |
1121 |
|
1122 |
|
1123 | partialRight<T2>(arg2: T2): FunctionChain<
|
1124 | T extends Function2<infer T1, T2, infer R> ? Function1<T1, R> : any
|
1125 | >;
|
1126 | |
1127 |
|
1128 |
|
1129 | partialRight<T1>(arg1: T1, plc2: __, plc3: __): FunctionChain<
|
1130 | T extends Function3<T1, infer T2, infer T3, infer R> ? Function2<T2, T3, R> :
|
1131 | any
|
1132 | >;
|
1133 | |
1134 |
|
1135 |
|
1136 | partialRight<T2>(arg2: T2, plc3: __): FunctionChain<
|
1137 | T extends Function3<infer T1, T2, infer T3, infer R> ? Function2<T1, T3, R> :
|
1138 | any
|
1139 | >;
|
1140 | |
1141 |
|
1142 |
|
1143 | partialRight<T1, T2>(arg1: T1, arg2: T2, plc3: __): FunctionChain<
|
1144 | T extends Function3<T1, T2, infer T3, infer R> ? Function1<T3, R> :
|
1145 | any
|
1146 | >;
|
1147 | |
1148 |
|
1149 |
|
1150 | partialRight<T3>(arg3: T3): FunctionChain<
|
1151 | T extends Function3<infer T1, infer T2, T3, infer R> ? Function2<T1, T2, R> :
|
1152 | any
|
1153 | >;
|
1154 | |
1155 |
|
1156 |
|
1157 | partialRight<T1, T3>(arg1: T1, plc2: __, arg3: T3): FunctionChain<
|
1158 | T extends Function3<T1, infer T2, T3, infer R> ? Function1<T2, R> :
|
1159 | any
|
1160 | >;
|
1161 | |
1162 |
|
1163 |
|
1164 | partialRight<T2, T3>(arg2: T2, arg3: T3): FunctionChain<
|
1165 | T extends Function3<infer T1, T2, T3, infer R> ? Function1<T1, R> :
|
1166 | any
|
1167 | >;
|
1168 | |
1169 |
|
1170 |
|
1171 | partialRight<T1>(arg1: T1, plc2: __, plc3: __, plc4: __): FunctionChain<
|
1172 | T extends Function4<T1, infer T2, infer T3, infer T4, infer R> ? Function3<T2, T3, T4, R> :
|
1173 | any
|
1174 | >;
|
1175 | |
1176 |
|
1177 |
|
1178 | partialRight<T2>(arg2: T2, plc3: __, plc4: __): FunctionChain<
|
1179 | T extends Function4<infer T1, T2, infer T3, infer T4, infer R> ? Function3<T1, T3, T4, R> :
|
1180 | any
|
1181 | >;
|
1182 | |
1183 |
|
1184 |
|
1185 | partialRight<T1, T2>(arg1: T1, arg2: T2, plc3: __, plc4: __): FunctionChain<
|
1186 | T extends Function4<T1, T2, infer T3, infer T4, infer R> ? Function2<T3, T4, R> :
|
1187 | any
|
1188 | >;
|
1189 | |
1190 |
|
1191 |
|
1192 | partialRight<T3>(arg3: T3, plc4: __): FunctionChain<
|
1193 | T extends Function4<infer T1, infer T2, T3, infer T4, infer R> ? Function3<T1, T2, T4, R> :
|
1194 | any
|
1195 | >;
|
1196 | |
1197 |
|
1198 |
|
1199 | partialRight<T1, T3>(arg1: T1, plc2: __, arg3: T3, plc4: __): FunctionChain<
|
1200 | T extends Function4<T1, infer T2, infer T3, infer T4, infer R> ? Function2<T2, T4, R> :
|
1201 | any
|
1202 | >;
|
1203 | |
1204 |
|
1205 |
|
1206 | partialRight<T2, T3>(arg2: T2, arg3: T3, plc4: __): FunctionChain<
|
1207 | T extends Function4<infer T1, T2, T3, infer T4, infer R> ? Function2<T1, T4, R> :
|
1208 | any
|
1209 | >;
|
1210 | |
1211 |
|
1212 |
|
1213 | partialRight<T1, T2, T3>(arg1: T1, arg2: T2, arg3: T3, plc4: __): FunctionChain<
|
1214 | T extends Function4<T1, T2, T3, infer T4, infer R> ? Function1<T4, R> :
|
1215 | any
|
1216 | >;
|
1217 | |
1218 |
|
1219 |
|
1220 | partialRight<T4>(arg4: T4): FunctionChain<
|
1221 | T extends Function4<infer T1, infer T2, infer T3, T4, infer R> ? Function3<T1, T2, T3, R> :
|
1222 | any
|
1223 | >;
|
1224 | |
1225 |
|
1226 |
|
1227 | partialRight<T1, T4>(arg1: T1, plc2: __, plc3: __, arg4: T4): FunctionChain<
|
1228 | T extends Function4<T1, infer T2, infer T3, T4, infer R> ? Function2<T2, T3, R> :
|
1229 | any
|
1230 | >;
|
1231 | |
1232 |
|
1233 |
|
1234 | partialRight<T2, T4>(arg2: T2, plc3: __, arg4: T4): FunctionChain<
|
1235 | T extends Function4<infer T1, T2, infer T3, T4, infer R> ? Function2<T1, T3, R> :
|
1236 | any
|
1237 | >;
|
1238 | |
1239 |
|
1240 |
|
1241 | partialRight<T1, T2, T4>(arg1: T1, arg2: T2, plc3: __, arg4: T4): FunctionChain<
|
1242 | T extends Function4<T1, T2, infer T3, T4, infer R> ? Function1<T3, R> :
|
1243 | any
|
1244 | >;
|
1245 | |
1246 |
|
1247 |
|
1248 | partialRight<T3, T4>(arg3: T3, arg4: T4): FunctionChain<
|
1249 | T extends Function4<infer T1, infer T2, T3, T4, infer R> ? Function2<T1, T2, R> :
|
1250 | any
|
1251 | >;
|
1252 | |
1253 |
|
1254 |
|
1255 | partialRight<T1, T3, T4>(arg1: T1, plc2: __, arg3: T3, arg4: T4): FunctionChain<
|
1256 | T extends Function4<T1, infer T2, T3, T4, infer R> ? Function1<T2, R> :
|
1257 | any
|
1258 | >;
|
1259 | |
1260 |
|
1261 |
|
1262 | partialRight<T2, T3, T4>(arg2: T2, arg3: T3, arg4: T4): FunctionChain<
|
1263 | T extends Function4<infer T1, T2, T3, T4, infer R> ? Function1<T1, R> :
|
1264 | any
|
1265 | >;
|
1266 | |
1267 |
|
1268 |
|
1269 | partialRight<TS extends any[]>(...ts: TS): FunctionChain<T extends (...args: TS) => infer R ? () => R : any>;
|
1270 | |
1271 |
|
1272 |
|
1273 | partialRight(): FunctionChain<T extends (...ts: any[]) => any ? T : any>;
|
1274 | }
|
1275 | interface LoDashStatic {
|
1276 | |
1277 |
|
1278 |
|
1279 |
|
1280 |
|
1281 |
|
1282 |
|
1283 |
|
1284 | rearg(func: (...args: any[]) => any, ...indexes: Array<Many<number>>): (...args: any[]) => any;
|
1285 | }
|
1286 | interface Function<T extends (...args: any) => any> {
|
1287 | |
1288 |
|
1289 |
|
1290 | rearg(...indexes: Array<Many<number>>): Function<(...args: any[]) => any>;
|
1291 | }
|
1292 | interface FunctionChain<T extends (...args: any) => any> {
|
1293 | |
1294 |
|
1295 |
|
1296 | rearg(...indexes: Array<Many<number>>): FunctionChain<(...args: any[]) => any>;
|
1297 | }
|
1298 | interface LoDashStatic {
|
1299 | |
1300 |
|
1301 |
|
1302 |
|
1303 |
|
1304 |
|
1305 |
|
1306 |
|
1307 |
|
1308 |
|
1309 | rest(func: (...args: any[]) => any, start?: number): (...args: any[]) => any;
|
1310 | }
|
1311 | interface Function<T extends (...args: any) => any> {
|
1312 | |
1313 |
|
1314 |
|
1315 | rest(start?: number): Function<(...args: any[]) => any>;
|
1316 | }
|
1317 | interface FunctionChain<T extends (...args: any) => any> {
|
1318 | |
1319 |
|
1320 |
|
1321 | rest(start?: number): FunctionChain<(...args: any[]) => any>;
|
1322 | }
|
1323 | interface LoDashStatic {
|
1324 | |
1325 |
|
1326 |
|
1327 |
|
1328 |
|
1329 |
|
1330 |
|
1331 |
|
1332 |
|
1333 | spread<TResult>(func: (...args: any[]) => TResult, start?: number): (...args: any[]) => TResult;
|
1334 | }
|
1335 | interface Function<T extends (...args: any) => any> {
|
1336 | |
1337 |
|
1338 |
|
1339 | spread(start?: number): Function<(...args: any[]) => ReturnType<T>>;
|
1340 | }
|
1341 | interface FunctionChain<T extends (...args: any) => any> {
|
1342 | |
1343 |
|
1344 |
|
1345 | spread(start?: number): FunctionChain<(...args: any[]) => ReturnType<T>>;
|
1346 | }
|
1347 | interface ThrottleSettings {
|
1348 | |
1349 |
|
1350 |
|
1351 | leading?: boolean | undefined;
|
1352 | |
1353 |
|
1354 |
|
1355 | trailing?: boolean | undefined;
|
1356 | }
|
1357 | type ThrottleSettingsLeading = (ThrottleSettings & { leading: true }) | Omit<ThrottleSettings, 'leading'>
|
1358 | interface LoDashStatic {
|
1359 | |
1360 |
|
1361 |
|
1362 |
|
1363 |
|
1364 |
|
1365 |
|
1366 |
|
1367 |
|
1368 |
|
1369 |
|
1370 |
|
1371 |
|
1372 |
|
1373 |
|
1374 |
|
1375 | throttle<T extends (...args: any) => any>(func: T, wait?: number, options?: ThrottleSettingsLeading): DebouncedFuncLeading<T>;
|
1376 | throttle<T extends (...args: any) => any>(func: T, wait?: number, options?: ThrottleSettings): DebouncedFunc<T>;
|
1377 | }
|
1378 | interface Function<T extends (...args: any) => any> {
|
1379 | |
1380 |
|
1381 |
|
1382 | throttle(
|
1383 | wait?: number,
|
1384 | options?: ThrottleSettingsLeading
|
1385 | ): T extends (...args: any[]) => any ? Function<DebouncedFuncLeading<T>> : never;
|
1386 | throttle(
|
1387 | wait?: number,
|
1388 | options?: ThrottleSettings
|
1389 | ): T extends (...args: any[]) => any ? Function<DebouncedFunc<T>> : never;
|
1390 | }
|
1391 | interface FunctionChain<T extends (...args: any) => any> {
|
1392 | |
1393 |
|
1394 |
|
1395 | throttle(
|
1396 | wait?: number,
|
1397 | options?: ThrottleSettingsLeading
|
1398 | ): T extends (...args: any[]) => any ? FunctionChain<DebouncedFuncLeading<T>> : never;
|
1399 | throttle(
|
1400 | wait?: number,
|
1401 | options?: ThrottleSettings
|
1402 | ): T extends (...args: any[]) => any ? FunctionChain<DebouncedFunc<T>> : never;
|
1403 | }
|
1404 | interface LoDashStatic {
|
1405 | |
1406 |
|
1407 |
|
1408 |
|
1409 |
|
1410 |
|
1411 |
|
1412 |
|
1413 |
|
1414 |
|
1415 |
|
1416 |
|
1417 | unary<T, TResult>(func: (arg1: T, ...args: any[]) => TResult): (arg1: T) => TResult;
|
1418 | }
|
1419 | interface Function<T extends (...args: any) => any> {
|
1420 | |
1421 |
|
1422 |
|
1423 | unary(): Function<(arg1: Parameters<T>['0']) => ReturnType<T>>;
|
1424 | }
|
1425 | interface FunctionChain<T extends (...args: any) => any> {
|
1426 | |
1427 |
|
1428 |
|
1429 | unary(): FunctionChain<(arg1: Parameters<T>['0']) => ReturnType<T>>;
|
1430 | }
|
1431 | interface LoDashStatic {
|
1432 | |
1433 |
|
1434 |
|
1435 |
|
1436 |
|
1437 |
|
1438 |
|
1439 |
|
1440 |
|
1441 | wrap<T, TArgs, TResult>(value: T, wrapper: (value: T, ...args: TArgs[]) => TResult): (...args: TArgs[]) => TResult;
|
1442 | }
|
1443 | interface LoDashImplicitWrapper<TValue> {
|
1444 | |
1445 |
|
1446 |
|
1447 | wrap<TArgs, TResult>(wrapper: (value: TValue, ...args: TArgs[]) => TResult): Function<(...args: TArgs[]) => TResult>;
|
1448 | }
|
1449 | interface LoDashExplicitWrapper<TValue> {
|
1450 | |
1451 |
|
1452 |
|
1453 | wrap<TArgs, TResult>(wrapper: (value: TValue, ...args: TArgs[]) => TResult): FunctionChain<(...args: TArgs[]) => TResult>;
|
1454 | }
|
1455 | }
|