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, Result1 extends T, Result2 extends T>(...predicates: [
|
756 | (arg: T) => arg is Result1,
|
757 | (arg: T) => arg is Result2
|
758 | ]): (arg: T) => arg is Result1 & Result2;
|
759 | overEvery<T>(...predicates: Array<Many<(...args: T[]) => boolean>>): (...args: T[]) => boolean;
|
760 | }
|
761 | interface Collection<T> {
|
762 | |
763 |
|
764 |
|
765 | overEvery<TArgs>(...iteratees: Array<Many<(...args: TArgs[]) => boolean>>): Function<(...args: TArgs[]) => boolean>;
|
766 | }
|
767 | interface Function<T> {
|
768 | |
769 |
|
770 |
|
771 | overEvery<TArgs>(...iteratees: Array<Many<(...args: TArgs[]) => boolean>>): Function<(...args: Parameters<T> | TArgs[]) => boolean>;
|
772 | }
|
773 | interface CollectionChain<T> {
|
774 | |
775 |
|
776 |
|
777 | overEvery<TArgs>(...iteratees: Array<Many<(...args: TArgs[]) => boolean>>): FunctionChain<(...args: TArgs[]) => boolean>;
|
778 | }
|
779 | interface FunctionChain<T> {
|
780 | |
781 |
|
782 |
|
783 | overEvery<TArgs>(...iteratees: Array<Many<(...args: TArgs[]) => boolean>>): FunctionChain<(...args: Parameters<T> | TArgs[]) => boolean>;
|
784 | }
|
785 |
|
786 | interface LoDashStatic {
|
787 | |
788 |
|
789 |
|
790 |
|
791 |
|
792 |
|
793 |
|
794 | overSome<T, Result1 extends T, Result2 extends T>(...predicates: [
|
795 | (arg: T) => arg is Result1,
|
796 | (arg: T) => arg is Result2
|
797 | ]): (arg: T) => arg is Result1 | Result2;
|
798 | overSome<T>(...predicates: Array<Many<(...args: T[]) => boolean>>): (...args: T[]) => boolean;
|
799 | }
|
800 | interface Collection<T> {
|
801 | |
802 |
|
803 |
|
804 | overSome<TArgs>(...iteratees: Array<Many<(...args: TArgs[]) => boolean>>): Function<(...args: TArgs[]) => boolean>;
|
805 | }
|
806 | interface Function<T> {
|
807 | |
808 |
|
809 |
|
810 | overSome<TArgs>(...iteratees: Array<Many<(...args: TArgs[]) => boolean>>): Function<(...args: Parameters<T> | TArgs[]) => boolean>;
|
811 | }
|
812 | interface CollectionChain<T> {
|
813 | |
814 |
|
815 |
|
816 | overSome<TArgs>(...iteratees: Array<Many<(...args: TArgs[]) => boolean>>): FunctionChain<(...args: TArgs[]) => boolean>;
|
817 | }
|
818 | interface FunctionChain<T> {
|
819 | |
820 |
|
821 |
|
822 | overSome<TArgs>(...iteratees: Array<Many<(...args: TArgs[]) => boolean>>): FunctionChain<(...args: Parameters<T> | TArgs[]) => boolean>;
|
823 | }
|
824 |
|
825 | interface LoDashStatic {
|
826 | |
827 |
|
828 |
|
829 |
|
830 |
|
831 |
|
832 | property<TObj, TResult>(path: PropertyPath): (obj: TObj) => TResult;
|
833 | }
|
834 | interface LoDashImplicitWrapper<TValue> {
|
835 | |
836 |
|
837 |
|
838 | property<TObj, TResult>(): Function<(obj: TObj) => TResult>;
|
839 | }
|
840 | interface LoDashExplicitWrapper<TValue> {
|
841 | |
842 |
|
843 |
|
844 | property<TObj, TResult>(): FunctionChain<(obj: TObj) => TResult>;
|
845 | }
|
846 |
|
847 | interface LoDashStatic {
|
848 | |
849 |
|
850 |
|
851 |
|
852 |
|
853 |
|
854 |
|
855 | propertyOf<T extends {}>(object: T): (path: PropertyPath) => any;
|
856 | }
|
857 | interface LoDashImplicitWrapper<TValue> {
|
858 | |
859 |
|
860 |
|
861 | propertyOf(): LoDashImplicitWrapper<(path: PropertyPath) => any>;
|
862 | }
|
863 | interface LoDashExplicitWrapper<TValue> {
|
864 | |
865 |
|
866 |
|
867 | propertyOf(): LoDashExplicitWrapper<(path: PropertyPath) => any>;
|
868 | }
|
869 |
|
870 | interface LoDashStatic {
|
871 | |
872 |
|
873 |
|
874 |
|
875 |
|
876 |
|
877 |
|
878 |
|
879 |
|
880 |
|
881 | range(start: number, end?: number, step?: number): number[];
|
882 | |
883 |
|
884 |
|
885 | range(end: number, index: string | number, guard: object): number[];
|
886 | }
|
887 | interface LoDashImplicitWrapper<TValue> {
|
888 | |
889 |
|
890 |
|
891 | range(end?: number, step?: number): Collection<number>;
|
892 | }
|
893 | interface LoDashExplicitWrapper<TValue> {
|
894 | |
895 |
|
896 |
|
897 | range(end?: number, step?: number): CollectionChain<number>;
|
898 | }
|
899 |
|
900 | interface LoDashStatic {
|
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 |
|
926 |
|
927 |
|
928 |
|
929 |
|
930 |
|
931 |
|
932 |
|
933 | rangeRight(start: number, end?: number, step?: number): number[];
|
934 | |
935 |
|
936 |
|
937 | rangeRight(end: number, index: string | number, guard: object): number[];
|
938 | }
|
939 | interface LoDashImplicitWrapper<TValue> {
|
940 | |
941 |
|
942 |
|
943 | rangeRight(end?: number, step?: number): Collection<number>;
|
944 | }
|
945 | interface LoDashExplicitWrapper<TValue> {
|
946 | |
947 |
|
948 |
|
949 | rangeRight(end?: number, step?: number): CollectionChain<number>;
|
950 | }
|
951 |
|
952 | interface LoDashStatic {
|
953 | |
954 |
|
955 |
|
956 |
|
957 |
|
958 |
|
959 | runInContext(context?: object): LoDashStatic;
|
960 | }
|
961 | interface LoDashImplicitWrapper<TValue> {
|
962 | |
963 |
|
964 |
|
965 | runInContext(): LoDashStatic;
|
966 | }
|
967 |
|
968 | interface LoDashStatic {
|
969 | |
970 |
|
971 |
|
972 |
|
973 |
|
974 | stubArray(): any[];
|
975 | }
|
976 | interface LoDashImplicitWrapper<TValue> {
|
977 | |
978 |
|
979 |
|
980 | stubArray(): any[];
|
981 | }
|
982 | interface LoDashExplicitWrapper<TValue> {
|
983 | |
984 |
|
985 |
|
986 | stubArray(): CollectionChain<any>;
|
987 | }
|
988 |
|
989 | interface LoDashStatic {
|
990 | |
991 |
|
992 |
|
993 |
|
994 |
|
995 | stubFalse(): false;
|
996 | }
|
997 | interface LoDashImplicitWrapper<TValue> {
|
998 | |
999 |
|
1000 |
|
1001 | stubFalse(): false;
|
1002 | }
|
1003 | interface LoDashExplicitWrapper<TValue> {
|
1004 | |
1005 |
|
1006 |
|
1007 | stubFalse(): PrimitiveChain<false>;
|
1008 | }
|
1009 |
|
1010 | interface LoDashStatic {
|
1011 | |
1012 |
|
1013 |
|
1014 |
|
1015 |
|
1016 | stubObject(): any;
|
1017 | }
|
1018 | interface LoDashImplicitWrapper<TValue> {
|
1019 | |
1020 |
|
1021 |
|
1022 | stubObject(): any;
|
1023 | }
|
1024 | interface LoDashExplicitWrapper<TValue> {
|
1025 | |
1026 |
|
1027 |
|
1028 | stubObject(): LoDashExplicitWrapper<any>;
|
1029 | }
|
1030 |
|
1031 | interface LoDashStatic {
|
1032 | |
1033 |
|
1034 |
|
1035 |
|
1036 |
|
1037 | stubString(): string;
|
1038 | }
|
1039 | interface LoDashImplicitWrapper<TValue> {
|
1040 | |
1041 |
|
1042 |
|
1043 | stubString(): string;
|
1044 | }
|
1045 | interface LoDashExplicitWrapper<TValue> {
|
1046 | |
1047 |
|
1048 |
|
1049 | stubString(): StringChain;
|
1050 | }
|
1051 |
|
1052 | interface LoDashStatic {
|
1053 | |
1054 |
|
1055 |
|
1056 |
|
1057 |
|
1058 | stubTrue(): true;
|
1059 | }
|
1060 | interface LoDashImplicitWrapper<TValue> {
|
1061 | |
1062 |
|
1063 |
|
1064 | stubTrue(): true;
|
1065 | }
|
1066 | interface LoDashExplicitWrapper<TValue> {
|
1067 | |
1068 |
|
1069 |
|
1070 | stubTrue(): PrimitiveChain<true>;
|
1071 | }
|
1072 |
|
1073 | interface LoDashStatic {
|
1074 | |
1075 |
|
1076 |
|
1077 |
|
1078 |
|
1079 |
|
1080 |
|
1081 |
|
1082 | times<TResult>(n: number, iteratee: (num: number) => TResult): TResult[];
|
1083 | /**
|
1084 | * @see _.times
|
1085 | */
|
1086 | times(n: number): number[];
|
1087 | }
|
1088 | interface LoDashImplicitWrapper<TValue> {
|
1089 | /**
|
1090 | * @see _.times
|
1091 | */
|
1092 | times<TResult>(iteratee: (num: number) => TResult): TResult[];
|
1093 | /**
|
1094 | * @see _.times
|
1095 | */
|
1096 | times(): number[];
|
1097 | }
|
1098 | interface LoDashExplicitWrapper<TValue> {
|
1099 | /**
|
1100 | * @see _.times
|
1101 | */
|
1102 | times<TResult>(iteratee: (num: number) => TResult): CollectionChain<TResult>;
|
1103 | /**
|
1104 | * @see _.times
|
1105 | */
|
1106 | times(): CollectionChain<number>;
|
1107 | }
|
1108 |
|
1109 | interface LoDashStatic {
|
1110 | /**
|
1111 | * Converts `value` to a property path array.
|
1112 | *
|
1113 | * @category Util
|
1114 | * @param value The value to convert.
|
1115 | * @returns Returns the new property path array.
|
1116 | * @example
|
1117 | *
|
1118 | * _.toPath('a.b.c');
|
1119 | * // => ['a', 'b', 'c']
|
1120 | *
|
1121 | * _.toPath('a[0].b.c');
|
1122 | *
|
1123 | *
|
1124 | * var path = ['a', 'b', 'c'],
|
1125 | * newPath = _.toPath(path);
|
1126 | *
|
1127 | * console.log(newPath);
|
1128 | *
|
1129 | *
|
1130 | * console.log(path === newPath);
|
1131 | *
|
1132 | */
|
1133 | toPath(value: any): string[];
|
1134 | }
|
1135 | interface LoDashImplicitWrapper<TValue> {
|
1136 | |
1137 |
|
1138 |
|
1139 | toPath(): Collection<string>;
|
1140 | }
|
1141 | interface LoDashExplicitWrapper<TValue> {
|
1142 | |
1143 |
|
1144 |
|
1145 | toPath(): CollectionChain<string>;
|
1146 | }
|
1147 |
|
1148 | interface LoDashStatic {
|
1149 | |
1150 |
|
1151 |
|
1152 |
|
1153 |
|
1154 |
|
1155 | uniqueId(prefix?: string): string;
|
1156 | }
|
1157 | interface LoDashImplicitWrapper<TValue> {
|
1158 | |
1159 |
|
1160 |
|
1161 | uniqueId(): string;
|
1162 | }
|
1163 | interface LoDashExplicitWrapper<TValue> {
|
1164 | |
1165 |
|
1166 |
|
1167 | uniqueId(): StringChain;
|
1168 | }
|
1169 |
|
1170 |
|
1171 |
|
1172 | interface LoDashStatic {
|
1173 | |
1174 |
|
1175 |
|
1176 |
|
1177 |
|
1178 | stubTrue(): true;
|
1179 | }
|
1180 |
|
1181 | interface LoDashImplicitWrapper<TValue> {
|
1182 | |
1183 |
|
1184 |
|
1185 | stubTrue(): true;
|
1186 | }
|
1187 |
|
1188 | interface LoDashExplicitWrapper<TValue> {
|
1189 | |
1190 |
|
1191 |
|
1192 | stubTrue(): LoDashExplicitWrapper<true>;
|
1193 | }
|
1194 |
|
1195 |
|
1196 |
|
1197 | interface LoDashStatic {
|
1198 | |
1199 |
|
1200 |
|
1201 |
|
1202 |
|
1203 | stubFalse(): false;
|
1204 | }
|
1205 |
|
1206 | interface LoDashImplicitWrapper<TValue> {
|
1207 | |
1208 |
|
1209 |
|
1210 | stubFalse(): false;
|
1211 | }
|
1212 |
|
1213 | interface LoDashExplicitWrapper<TValue> {
|
1214 | |
1215 |
|
1216 |
|
1217 | stubFalse(): LoDashExplicitWrapper<false>;
|
1218 | }
|
1219 | }
|