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