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