UNPKG

102 kBTypeScriptView Raw
1import _ = require("../index");
2import { uniqueSymbol } from "./common";
3declare module "../index" {
4 interface LoDashStatic {
5 /**
6 * Assigns own enumerable properties of source objects to the destination
7 * object. Source objects are applied from left to right. Subsequent sources
8 * overwrite property assignments of previous sources.
9 *
10 * **Note:** This method mutates `object` and is loosely based on
11 * [`Object.assign`](https://mdn.io/Object/assign).
12 *
13 * @category Object
14 * @param object The destination object.
15 * @param [sources] The source objects.
16 * @returns Returns `object`.
17 * @example
18 *
19 * function Foo() {
20 * this.c = 3;
21 * }
22 *
23 * function Bar() {
24 * this.e = 5;
25 * }
26 *
27 * Foo.prototype.d = 4;
28 * Bar.prototype.f = 6;
29 *
30 * _.assign({ 'a': 1 }, new Foo, new Bar);
31 * // => { 'a': 1, 'c': 3, 'e': 5 }
32 */
33 assign<TObject, TSource>(object: TObject, source: TSource): TObject & TSource;
34 /**
35 * @see _.assign
36 */
37 assign<TObject, TSource1, TSource2>(object: TObject, source1: TSource1, source2: TSource2): TObject & TSource1 & TSource2;
38 /**
39 * @see _.assign
40 */
41 assign<TObject, TSource1, TSource2, TSource3>(object: TObject, source1: TSource1, source2: TSource2, source3: TSource3): TObject & TSource1 & TSource2 & TSource3;
42 /**
43 * @see _.assign
44 */
45 assign<TObject, TSource1, TSource2, TSource3, TSource4>(object: TObject, source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4): TObject & TSource1 & TSource2 & TSource3 & TSource4;
46 /**
47 * @see _.assign
48 */
49 assign<TObject>(object: TObject): TObject;
50 /**
51 * @see _.assign
52 */
53 assign(object: any, ...otherArgs: any[]): any;
54 }
55 interface Object<T> {
56 /**
57 * @see _.assign
58 */
59 assign<TSource>(source: TSource): Object<T & TSource>;
60 /**
61 * @see _.assign
62 */
63 assign<TSource1, TSource2>(source1: TSource1, source2: TSource2): Object<T & TSource1 & TSource2>;
64 /**
65 * @see _.assign
66 */
67 assign<TSource1, TSource2, TSource3>(source1: TSource1, source2: TSource2, source3: TSource3): Object<T & TSource1 & TSource2 & TSource3>;
68 /**
69 * @see _.assign
70 */
71 assign<TSource1, TSource2, TSource3, TSource4>(source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4): Object<T & TSource1 & TSource2 & TSource3 & TSource4>;
72 /**
73 * @see _.assign
74 */
75 assign(): Object<T>;
76 /**
77 * @see _.assign
78 */
79 assign(...otherArgs: any[]): Object<any>;
80 }
81 interface ObjectChain<T> {
82 /**
83 * @see _.assign
84 */
85 assign<TSource>(source: TSource): ObjectChain<T & TSource>;
86 /**
87 * @see _.assign
88 */
89 assign<TSource1, TSource2>(source1: TSource1, source2: TSource2): ObjectChain<T & TSource1 & TSource2>;
90 /**
91 * @see _.assign
92 */
93 assign<TSource1, TSource2, TSource3>(source1: TSource1, source2: TSource2, source3: TSource3): ObjectChain<T & TSource1 & TSource2 & TSource3>;
94 /**
95 * @see _.assign
96 */
97 assign<TSource1, TSource2, TSource3, TSource4>(source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4): ObjectChain<T & TSource1 & TSource2 & TSource3 & TSource4>;
98 /**
99 * @see _.assign
100 */
101 assign(): ObjectChain<T>;
102 /**
103 * @see _.assign
104 */
105 assign(...otherArgs: any[]): ObjectChain<any>;
106 }
107 interface LoDashStatic {
108 /**
109 * This method is like `_.assign` except that it iterates over own and
110 * inherited source properties.
111 *
112 * **Note:** This method mutates `object`.
113 *
114 * @alias extend
115 * @category Object
116 * @param object The destination object.
117 * @param [sources] The source objects.
118 * @returns Returns `object`.
119 * @example
120 *
121 * function Foo() {
122 * this.b = 2;
123 * }
124 *
125 * function Bar() {
126 * this.d = 4;
127 * }
128 *
129 * Foo.prototype.c = 3;
130 * Bar.prototype.e = 5;
131 *
132 * _.assignIn({ 'a': 1 }, new Foo, new Bar);
133 * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4, 'e': 5 }
134 */
135 assignIn<TObject, TSource>(object: TObject, source: TSource): TObject & TSource;
136 /**
137 * @see _.assignIn
138 */
139 assignIn<TObject, TSource1, TSource2>(object: TObject, source1: TSource1, source2: TSource2): TObject & TSource1 & TSource2;
140 /**
141 * @see _.assignIn
142 */
143 assignIn<TObject, TSource1, TSource2, TSource3>(object: TObject, source1: TSource1, source2: TSource2, source3: TSource3): TObject & TSource1 & TSource2 & TSource3;
144 /**
145 * @see _.assignIn
146 */
147 assignIn<TObject, TSource1, TSource2, TSource3, TSource4>(object: TObject, source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4): TObject & TSource1 & TSource2 & TSource3 & TSource4;
148 /**
149 * @see _.assignIn
150 */
151 assignIn<TObject>(object: TObject): TObject;
152 /**
153 * @see _.assignIn
154 */
155 assignIn<TResult>(object: any, ...otherArgs: any[]): TResult;
156 }
157 interface Object<T> {
158 /**
159 * @see _.assignIn
160 */
161 assignIn<TSource>(source: TSource): Object<T & TSource>;
162 /**
163 * @see _.assignIn
164 */
165 assignIn<TSource1, TSource2>(source1: TSource1, source2: TSource2): Object<T & TSource1 & TSource2>;
166 /**
167 * @see _.assignIn
168 */
169 assignIn<TSource1, TSource2, TSource3>(source1: TSource1, source2: TSource2, source3: TSource3): Object<T & TSource1 & TSource2 & TSource3>;
170 /**
171 * @see _.assignIn
172 */
173 assignIn<TSource1, TSource2, TSource3, TSource4>(source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4): Object<T & TSource1 & TSource2 & TSource3 & TSource4>;
174 /**
175 * @see _.assignIn
176 */
177 assignIn(): Object<T>;
178 /**
179 * @see _.assignIn
180 */
181 assignIn<TResult>(...otherArgs: any[]): Object<TResult>;
182 }
183 interface ObjectChain<T> {
184 /**
185 * @see _.assignIn
186 */
187 assignIn<TSource>(source: TSource): ObjectChain<T & TSource>;
188 /**
189 * @see _.assignIn
190 */
191 assignIn<TSource1, TSource2>(source1: TSource1, source2: TSource2): ObjectChain<T & TSource1 & TSource2>;
192 /**
193 * @see _.assignIn
194 */
195 assignIn<TSource1, TSource2, TSource3>(source1: TSource1, source2: TSource2, source3: TSource3): ObjectChain<T & TSource1 & TSource2 & TSource3>;
196 /**
197 * @see _.assignIn
198 */
199 assignIn<TSource1, TSource2, TSource3, TSource4>(source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4): ObjectChain<T & TSource1 & TSource2 & TSource3 & TSource4>;
200 /**
201 * @see _.assignIn
202 */
203 assignIn(): ObjectChain<T>;
204 /**
205 * @see _.assignIn
206 */
207 assignIn(...otherArgs: any[]): ObjectChain<any>;
208 }
209 type AssignCustomizer = (objectValue: any, sourceValue: any, key?: string, object?: {}, source?: {}) => any;
210 interface LoDashStatic {
211 /**
212 * This method is like `_.assignIn` except that it accepts `customizer` which
213 * is invoked to produce the assigned values. If `customizer` returns `undefined`
214 * assignment is handled by the method instead. The `customizer` is invoked
215 * with five arguments: (objValue, srcValue, key, object, source).
216 *
217 * **Note:** This method mutates `object`.
218 *
219 * @alias extendWith
220 * @category Object
221 * @param object The destination object.
222 * @param sources The source objects.
223 * @param [customizer] The function to customize assigned values.
224 * @returns Returns `object`.
225 * @example
226 *
227 * function customizer(objValue, srcValue) {
228 * return _.isUndefined(objValue) ? srcValue : objValue;
229 * }
230 *
231 * var defaults = _.partialRight(_.assignInWith, customizer);
232 *
233 * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
234 * // => { 'a': 1, 'b': 2 }
235 */
236 assignInWith<TObject, TSource>(object: TObject, source: TSource, customizer: AssignCustomizer): TObject & TSource;
237 /**
238 * @see _.assignInWith
239 */
240 assignInWith<TObject, TSource1, TSource2>(object: TObject, source1: TSource1, source2: TSource2, customizer: AssignCustomizer): TObject & TSource1 & TSource2;
241 /**
242 * @see _.assignInWith
243 */
244 assignInWith<TObject, TSource1, TSource2, TSource3>(object: TObject, source1: TSource1, source2: TSource2, source3: TSource3, customizer: AssignCustomizer): TObject & TSource1 & TSource2 & TSource3;
245 /**
246 * @see _.assignInWith
247 */
248 assignInWith<TObject, TSource1, TSource2, TSource3, TSource4>(object: TObject, source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4, customizer: AssignCustomizer): TObject & TSource1 & TSource2 & TSource3 & TSource4;
249 /**
250 * @see _.assignInWith
251 */
252 assignInWith<TObject>(object: TObject): TObject;
253 /**
254 * @see _.assignInWith
255 */
256 assignInWith<TResult>(object: any, ...otherArgs: any[]): TResult;
257 }
258 interface Object<T> {
259 /**
260 * @see _.assignInWith
261 */
262 assignInWith<TSource>(source: TSource, customizer: AssignCustomizer): Object<T & TSource>;
263 /**
264 * @see _.assignInWith
265 */
266 assignInWith<TSource1, TSource2>(source1: TSource1, source2: TSource2, customizer: AssignCustomizer): Object<T & TSource1 & TSource2>;
267 /**
268 * @see _.assignInWith
269 */
270 assignInWith<TSource1, TSource2, TSource3>(source1: TSource1, source2: TSource2, source3: TSource3, customizer: AssignCustomizer): Object<T & TSource1 & TSource2 & TSource3>;
271 /**
272 * @see _.assignInWith
273 */
274 assignInWith<TSource1, TSource2, TSource3, TSource4>(source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4, customizer: AssignCustomizer): Object<T & TSource1 & TSource2 & TSource3 & TSource4>;
275 /**
276 * @see _.assignInWith
277 */
278 assignInWith(): Object<T>;
279 /**
280 * @see _.assignInWith
281 */
282 assignInWith<TResult>(...otherArgs: any[]): Object<TResult>;
283 }
284 interface ObjectChain<T> {
285 /**
286 * @see _.assignInWith
287 */
288 assignInWith<TSource>(source: TSource, customizer: AssignCustomizer): ObjectChain<T & TSource>;
289 /**
290 * @see _.assignInWith
291 */
292 assignInWith<TSource1, TSource2>(source1: TSource1, source2: TSource2, customizer: AssignCustomizer): ObjectChain<T & TSource1 & TSource2>;
293 /**
294 * @see _.assignInWith
295 */
296 assignInWith<TSource1, TSource2, TSource3>(source1: TSource1, source2: TSource2, source3: TSource3, customizer: AssignCustomizer): ObjectChain<T & TSource1 & TSource2 & TSource3>;
297 /**
298 * @see _.assignInWith
299 */
300 assignInWith<TSource1, TSource2, TSource3, TSource4>(source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4, customizer: AssignCustomizer): ObjectChain<T & TSource1 & TSource2 & TSource3 & TSource4>;
301 /**
302 * @see _.assignInWith
303 */
304 assignInWith(): ObjectChain<T>;
305 /**
306 * @see _.assignInWith
307 */
308 assignInWith(...otherArgs: any[]): ObjectChain<any>;
309 }
310 interface LoDashStatic {
311 /**
312 * This method is like `_.assign` except that it accepts `customizer` which
313 * is invoked to produce the assigned values. If `customizer` returns `undefined`
314 * assignment is handled by the method instead. The `customizer` is invoked
315 * with five arguments: (objValue, srcValue, key, object, source).
316 *
317 * **Note:** This method mutates `object`.
318 *
319 * @category Object
320 * @param object The destination object.
321 * @param sources The source objects.
322 * @param [customizer] The function to customize assigned values.
323 * @returns Returns `object`.
324 * @example
325 *
326 * function customizer(objValue, srcValue) {
327 * return _.isUndefined(objValue) ? srcValue : objValue;
328 * }
329 *
330 * var defaults = _.partialRight(_.assignWith, customizer);
331 *
332 * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
333 * // => { 'a': 1, 'b': 2 }
334 */
335 assignWith<TObject, TSource>(object: TObject, source: TSource, customizer: AssignCustomizer): TObject & TSource;
336 /**
337 * @see _.assignWith
338 */
339 assignWith<TObject, TSource1, TSource2>(object: TObject, source1: TSource1, source2: TSource2, customizer: AssignCustomizer): TObject & TSource1 & TSource2;
340 /**
341 * @see _.assignWith
342 */
343 assignWith<TObject, TSource1, TSource2, TSource3>(object: TObject, source1: TSource1, source2: TSource2, source3: TSource3, customizer: AssignCustomizer): TObject & TSource1 & TSource2 & TSource3;
344 /**
345 * @see _.assignWith
346 */
347 assignWith<TObject, TSource1, TSource2, TSource3, TSource4>(object: TObject, source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4, customizer: AssignCustomizer): TObject & TSource1 & TSource2 & TSource3 & TSource4;
348 /**
349 * @see _.assignWith
350 */
351 assignWith<TObject>(object: TObject): TObject;
352 /**
353 * @see _.assignWith
354 */
355 assignWith<TResult>(object: any, ...otherArgs: any[]): TResult;
356 }
357 interface Object<T> {
358 /**
359 * @see _.assignWith
360 */
361 assignWith<TSource>(source: TSource, customizer: AssignCustomizer): Object<T & TSource>;
362 /**
363 * @see _.assignWith
364 */
365 assignWith<TSource1, TSource2>(source1: TSource1, source2: TSource2, customizer: AssignCustomizer): Object<T & TSource1 & TSource2>;
366 /**
367 * @see _.assignWith
368 */
369 assignWith<TSource1, TSource2, TSource3>(source1: TSource1, source2: TSource2, source3: TSource3, customizer: AssignCustomizer): Object<T & TSource1 & TSource2 & TSource3>;
370 /**
371 * @see _.assignWith
372 */
373 assignWith<TSource1, TSource2, TSource3, TSource4>(source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4, customizer: AssignCustomizer): Object<T & TSource1 & TSource2 & TSource3 & TSource4>;
374 /**
375 * @see _.assignWith
376 */
377 assignWith(): Object<T>;
378 /**
379 * @see _.assignWith
380 */
381 assignWith<TResult>(...otherArgs: any[]): Object<TResult>;
382 }
383 interface ObjectChain<T> {
384 /**
385 * @see _.assignWith
386 */
387 assignWith<TSource>(source: TSource, customizer: AssignCustomizer): ObjectChain<T & TSource>;
388 /**
389 * @see _.assignWith
390 */
391 assignWith<TSource1, TSource2>(source1: TSource1, source2: TSource2, customizer: AssignCustomizer): ObjectChain<T & TSource1 & TSource2>;
392 /**
393 * @see _.assignWith
394 */
395 assignWith<TSource1, TSource2, TSource3>(source1: TSource1, source2: TSource2, source3: TSource3, customizer: AssignCustomizer): ObjectChain<T & TSource1 & TSource2 & TSource3>;
396 /**
397 * @see _.assignWith
398 */
399 assignWith<TSource1, TSource2, TSource3, TSource4>(source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4, customizer: AssignCustomizer): ObjectChain<T & TSource1 & TSource2 & TSource3 & TSource4>;
400 /**
401 * @see _.assignWith
402 */
403 assignWith(): ObjectChain<T>;
404 /**
405 * @see _.assignWith
406 */
407 assignWith(...otherArgs: any[]): ObjectChain<any>;
408 }
409 interface LoDashStatic {
410 /**
411 * Creates an array of elements corresponding to the given keys, or indexes, of collection. Keys may be
412 * specified as individual arguments or as arrays of keys.
413 *
414 * @param object The object to iterate over.
415 * @param props The property names or indexes of elements to pick, specified individually or in arrays.
416 * @return Returns the new array of picked elements.
417 */
418 at<T>(object: Dictionary<T> | NumericDictionary<T> | null | undefined, ...props: PropertyPath[]): T[];
419 /**
420 * @see _.at
421 */
422 at<T extends object>(object: T | null | undefined, ...props: Array<Many<keyof T>>): Array<T[keyof T]>;
423 }
424 interface Object<T> {
425 /**
426 * @see _.at
427 */
428 at(...props: Array<Many<keyof T>>): Collection<T[keyof T]>;
429 }
430 interface Collection<T> {
431 /**
432 * @see _.at
433 */
434 at(...props: PropertyPath[]): Collection<T>;
435 }
436 interface ObjectChain<T> {
437 /**
438 * @see _.at
439 */
440 at(...props: Array<Many<keyof T>>): CollectionChain<T[keyof T]>;
441 }
442 interface CollectionChain<T> {
443 /**
444 * @see _.at
445 */
446 at(...props: PropertyPath[]): CollectionChain<T>;
447 }
448 interface LoDashStatic {
449 /**
450 * Creates an object that inherits from the given prototype object. If a properties object is provided its own
451 * enumerable properties are assigned to the created object.
452 *
453 * @param prototype The object to inherit from.
454 * @param properties The properties to assign to the object.
455 * @return Returns the new object.
456 */
457 create<T extends object, U extends object>(prototype: T, properties?: U): T & U;
458 }
459 interface Object<T> {
460 /**
461 * @see _.create
462 */
463 create<U extends object>(properties?: U): Object<T & U>;
464 }
465 interface ObjectChain<T> {
466 /**
467 * @see _.create
468 */
469 create<U extends object>(properties?: U): ObjectChain<T & U>;
470 }
471 interface LoDashStatic {
472 /**
473 * Assigns own enumerable properties of source object(s) to the destination object for all destination
474 * properties that resolve to undefined. Once a property is set, additional values of the same property are
475 * ignored.
476 *
477 * Note: This method mutates object.
478 *
479 * @param object The destination object.
480 * @param sources The source objects.
481 * @return The destination object.
482 */
483 defaults<TObject, TSource>(object: TObject, source: TSource): NonNullable<TSource & TObject>;
484 /**
485 * @see _.defaults
486 */
487 defaults<TObject, TSource1, TSource2>(object: TObject, source1: TSource1, source2: TSource2): NonNullable<TSource2 & TSource1 & TObject>;
488 /**
489 * @see _.defaults
490 */
491 defaults<TObject, TSource1, TSource2, TSource3>(object: TObject, source1: TSource1, source2: TSource2, source3: TSource3): NonNullable<TSource3 & TSource2 & TSource1 & TObject>;
492 /**
493 * @see _.defaults
494 */
495 defaults<TObject, TSource1, TSource2, TSource3, TSource4>(object: TObject, source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4): NonNullable<TSource4 & TSource3 & TSource2 & TSource1 & TObject>;
496 /**
497 * @see _.defaults
498 */
499 defaults<TObject>(object: TObject): NonNullable<TObject>;
500 /**
501 * @see _.defaults
502 */
503 defaults(object: any, ...sources: any[]): any;
504 }
505 interface Object<T> {
506 /**
507 * @see _.defaults
508 */
509 defaults<TSource>(source: TSource): Object<NonNullable<TSource & T>>;
510 /**
511 * @see _.defaults
512 */
513 defaults<TSource1, TSource2>(source1: TSource1, source2: TSource2): Object<NonNullable<TSource2 & TSource1 & T>>;
514 /**
515 * @see _.defaults
516 */
517 defaults<TSource1, TSource2, TSource3>(source1: TSource1, source2: TSource2, source3: TSource3): Object<NonNullable<TSource3 & TSource2 & TSource1 & T>>;
518 /**
519 * @see _.defaults
520 */
521 defaults<TSource1, TSource2, TSource3, TSource4>(source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4): Object<NonNullable<TSource4 & TSource3 & TSource2 & TSource1 & T>>;
522 /**
523 * @see _.defaults
524 */
525 defaults(): Object<NonNullable<T>>;
526 /**
527 * @see _.defaults
528 */
529 defaults(...sources: any[]): Object<any>;
530 }
531 interface ObjectChain<T> {
532 /**
533 * @see _.defaults
534 */
535 defaults<TSource>(source: TSource): ObjectChain<NonNullable<TSource & T>>;
536 /**
537 * @see _.defaults
538 */
539 defaults<TSource1, TSource2>(source1: TSource1, source2: TSource2): ObjectChain<NonNullable<TSource2 & TSource1 & T>>;
540 /**
541 * @see _.defaults
542 */
543 defaults<TSource1, TSource2, TSource3>(source1: TSource1, source2: TSource2, source3: TSource3): ObjectChain<NonNullable<TSource3 & TSource2 & TSource1 & T>>;
544 /**
545 * @see _.defaults
546 */
547 defaults<TSource1, TSource2, TSource3, TSource4>(source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4): ObjectChain<NonNullable<TSource4 & TSource3 & TSource2 & TSource1 & T>>;
548 /**
549 * @see _.defaults
550 */
551 defaults(): ObjectChain<NonNullable<T>>;
552 /**
553 * @see _.defaults
554 */
555 defaults(...sources: any[]): ObjectChain<any>;
556 }
557 interface LoDashStatic {
558 /**
559 * This method is like _.defaults except that it recursively assigns default properties.
560 * @param object The destination object.
561 * @param sources The source objects.
562 * @return Returns object.
563 */
564 defaultsDeep(object: any, ...sources: any[]): any;
565 }
566 interface Object<T> {
567 /**
568 * @see _.defaultsDeep
569 */
570 defaultsDeep(...sources: any[]): Object<any>;
571 }
572 interface ObjectChain<T> {
573 /**
574 * @see _.defaultsDeep
575 */
576 defaultsDeep(...sources: any[]): ObjectChain<any>;
577 }
578 interface LoDashStatic {
579 /**
580 * @see _.toPairs
581 */
582 entries<T>(object?: Dictionary<T> | NumericDictionary<T>): Array<[string, T]>;
583 /**
584 * @see _.entries
585 */
586 entries(object?: object): Array<[string, any]>;
587 }
588 interface Object<T> {
589 /**
590 * @see _.entries
591 */
592 entries(): Collection<[string, T[keyof T]]>;
593 }
594 interface LoDashImplicitWrapper<TValue> {
595 /**
596 * @see _.entries
597 */
598 entries(): Collection<[string, any]>;
599 }
600 interface ObjectChain<T> {
601 /**
602 * @see _.entries
603 */
604 entries(): CollectionChain<[string, T[keyof T]]>;
605 }
606 interface LoDashExplicitWrapper<TValue> {
607 /**
608 * @see _.entries
609 */
610 entries(): CollectionChain<[string, any]>;
611 }
612 interface LoDashStatic {
613 /**
614 * @see _.entriesIn
615 */
616 entriesIn<T>(object?: Dictionary<T> | NumericDictionary<T>): Array<[string, T]>;
617 /**
618 * @see _.entriesIn
619 */
620 entriesIn(object?: object): Array<[string, any]>;
621 }
622 interface Object<T> {
623 /**
624 * @see _.entriesIn
625 */
626 entriesIn(): Collection<[string, T[keyof T]]>;
627 }
628 interface LoDashImplicitWrapper<TValue> {
629 /**
630 * @see _.entriesIn
631 */
632 entriesIn(): Collection<[string, any]>;
633 }
634 interface ObjectChain<T> {
635 /**
636 * @see _.entriesIn
637 */
638 entriesIn(): CollectionChain<[string, T[keyof T]]>;
639 }
640 interface LoDashExplicitWrapper<TValue> {
641 /**
642 * @see _.entriesIn
643 */
644 entriesIn(): CollectionChain<[string, any]>;
645 }
646 interface LoDashStatic {
647 /**
648 * @see _.extend
649 */
650 extend<TObject, TSource>(object: TObject, source: TSource): TObject & TSource;
651 /**
652 * @see _.extend
653 */
654 extend<TObject, TSource1, TSource2>(object: TObject, source1: TSource1, source2: TSource2): TObject & TSource1 & TSource2;
655 /**
656 * @see _.extend
657 */
658 extend<TObject, TSource1, TSource2, TSource3>(object: TObject, source1: TSource1, source2: TSource2, source3: TSource3): TObject & TSource1 & TSource2 & TSource3;
659 /**
660 * @see _.extend
661 */
662 extend<TObject, TSource1, TSource2, TSource3, TSource4>(object: TObject, source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4): TObject & TSource1 & TSource2 & TSource3 & TSource4;
663 /**
664 * @see _.extend
665 */
666 extend<TObject>(object: TObject): TObject;
667 /**
668 * @see _.extend
669 */
670 extend<TResult>(object: any, ...otherArgs: any[]): TResult;
671 }
672 interface Object<T> {
673 /**
674 * @see _.extend
675 */
676 extend<TSource>(source: TSource): Object<T & TSource>;
677 /**
678 * @see _.extend
679 */
680 extend<TSource1, TSource2>(source1: TSource1, source2: TSource2): Object<T & TSource1 & TSource2>;
681 /**
682 * @see _.extend
683 */
684 extend<TSource1, TSource2, TSource3>(source1: TSource1, source2: TSource2, source3: TSource3): Object<T & TSource1 & TSource2 & TSource3>;
685 /**
686 * @see _.extend
687 */
688 extend<TSource1, TSource2, TSource3, TSource4>(source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4): Object<T & TSource1 & TSource2 & TSource3 & TSource4>;
689 /**
690 * @see _.extend
691 */
692 extend(): Object<T>;
693 /**
694 * @see _.extend
695 */
696 extend(...otherArgs: any[]): Object<any>;
697 }
698 interface ObjectChain<T> {
699 /**
700 * @see _.extend
701 */
702 extend<TSource>(source: TSource): ObjectChain<T & TSource>;
703 /**
704 * @see _.extend
705 */
706 extend<TSource1, TSource2>(source1: TSource1, source2: TSource2): ObjectChain<T & TSource1 & TSource2>;
707 /**
708 * @see _.extend
709 */
710 extend<TSource1, TSource2, TSource3>(source1: TSource1, source2: TSource2, source3: TSource3): ObjectChain<T & TSource1 & TSource2 & TSource3>;
711 /**
712 * @see _.extend
713 */
714 extend<TSource1, TSource2, TSource3, TSource4>(source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4): ObjectChain<T & TSource1 & TSource2 & TSource3 & TSource4>;
715 /**
716 * @see _.extend
717 */
718 extend(): ObjectChain<T>;
719 /**
720 * @see _.extend
721 */
722 extend(...otherArgs: any[]): ObjectChain<any>;
723 }
724 interface LoDashStatic {
725 /**
726 * @see _.extendWith
727 */
728 extendWith<TObject, TSource>(object: TObject, source: TSource, customizer: AssignCustomizer): TObject & TSource;
729 /**
730 * @see _.extendWith
731 */
732 extendWith<TObject, TSource1, TSource2>(object: TObject, source1: TSource1, source2: TSource2, customizer: AssignCustomizer): TObject & TSource1 & TSource2;
733 /**
734 * @see _.extendWith
735 */
736 extendWith<TObject, TSource1, TSource2, TSource3>(object: TObject, source1: TSource1, source2: TSource2, source3: TSource3, customizer: AssignCustomizer): TObject & TSource1 & TSource2 & TSource3;
737 /**
738 * @see _.extendWith
739 */
740 extendWith<TObject, TSource1, TSource2, TSource3, TSource4>(object: TObject, source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4, customizer: AssignCustomizer): TObject & TSource1 & TSource2 & TSource3 & TSource4;
741 /**
742 * @see _.extendWith
743 */
744 extendWith<TObject>(object: TObject): TObject;
745 /**
746 * @see _.extendWith
747 */
748 extendWith<TResult>(object: any, ...otherArgs: any[]): TResult;
749 }
750 interface Object<T> {
751 /**
752 * @see _.extendWith
753 */
754 extendWith<TSource>(source: TSource, customizer: AssignCustomizer): Object<T & TSource>;
755 /**
756 * @see _.extendWith
757 */
758 extendWith<TSource1, TSource2>(source1: TSource1, source2: TSource2, customizer: AssignCustomizer): Object<T & TSource1 & TSource2>;
759 /**
760 * @see _.extendWith
761 */
762 extendWith<TSource1, TSource2, TSource3>(source1: TSource1, source2: TSource2, source3: TSource3, customizer: AssignCustomizer): Object<T & TSource1 & TSource2 & TSource3>;
763 /**
764 * @see _.extendWith
765 */
766 extendWith<TSource1, TSource2, TSource3, TSource4>(source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4, customizer: AssignCustomizer): Object<T & TSource1 & TSource2 & TSource3 & TSource4>;
767 /**
768 * @see _.extendWith
769 */
770 extendWith(): Object<T>;
771 /**
772 * @see _.extendWith
773 */
774 extendWith(...otherArgs: any[]): Object<any>;
775 }
776 interface ObjectChain<T> {
777 /**
778 * @see _.extendWith
779 */
780 extendWith<TSource>(source: TSource, customizer: AssignCustomizer): ObjectChain<T & TSource>;
781 /**
782 * @see _.extendWith
783 */
784 extendWith<TSource1, TSource2>(source1: TSource1, source2: TSource2, customizer: AssignCustomizer): ObjectChain<T & TSource1 & TSource2>;
785 /**
786 * @see _.extendWith
787 */
788 extendWith<TSource1, TSource2, TSource3>(source1: TSource1, source2: TSource2, source3: TSource3, customizer: AssignCustomizer): ObjectChain<T & TSource1 & TSource2 & TSource3>;
789 /**
790 * @see _.extendWith
791 */
792 extendWith<TSource1, TSource2, TSource3, TSource4>(source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4, customizer: AssignCustomizer): ObjectChain<T & TSource1 & TSource2 & TSource3 & TSource4>;
793 /**
794 * @see _.extendWith
795 */
796 extendWith(): ObjectChain<T>;
797 /**
798 * @see _.extendWith
799 */
800 extendWith(...otherArgs: any[]): ObjectChain<any>;
801 }
802 interface LoDashStatic {
803 /**
804 * This method is like _.find except that it returns the key of the first element predicate returns truthy for
805 * instead of the element itself.
806 *
807 * @param object The object to search.
808 * @param predicate The function invoked per iteration.
809 * @return Returns the key of the matched element, else undefined.
810 */
811 findKey<T>(object: T | null | undefined, predicate?: ObjectIteratee<T>): string | undefined;
812 }
813 interface LoDashImplicitWrapper<TValue> {
814 /**
815 * @see _.findKey
816 */
817 findKey(predicate?: ObjectIteratee<TValue>): string | undefined;
818 }
819 interface LoDashExplicitWrapper<TValue> {
820 /**
821 * @see _.findKey
822 */
823 findKey(predicate?: ObjectIteratee<TValue>): StringNullableChain;
824 }
825 interface LoDashStatic {
826 /**
827 * This method is like _.findKey except that it iterates over elements of a collection in the opposite order.
828 *
829 * @param object The object to search.
830 * @param predicate The function invoked per iteration.
831 * @return Returns the key of the matched element, else undefined.
832 */
833 findLastKey<T>(object: T | null | undefined, predicate?: ObjectIteratee<T>): string | undefined;
834 }
835 interface LoDashImplicitWrapper<TValue> {
836 /**
837 * @see _.findLastKey
838 */
839 findLastKey(predicate?: ObjectIteratee<TValue>): string | undefined;
840 }
841 interface LoDashExplicitWrapper<TValue> {
842 /**
843 * @see _.findLastKey
844 */
845 findLastKey(predicate?: ObjectIteratee<TValue>): StringNullableChain;
846 }
847 interface LoDashStatic {
848 /**
849 * Iterates over own and inherited enumerable properties of an object invoking iteratee for each property. The
850 * iteratee is invoked with three arguments: (value, key, object). Iteratee functions may
851 * exit iteration early by explicitly returning false.
852 *
853 * @param object The object to iterate over.
854 * @param iteratee The function invoked per iteration.
855 * @return Returns object.
856 */
857 forIn<T>(object: T, iteratee?: ObjectIterator<T, any>): T;
858 /**
859 * @see _.forIn
860 */
861 forIn<T>(object: T | null | undefined, iteratee?: ObjectIterator<T, any>): T | null | undefined;
862 }
863 interface LoDashImplicitWrapper<TValue> {
864 /**
865 * @see _.forIn
866 */
867 forIn(iteratee?: ObjectIterator<TValue, any>): this;
868 }
869 interface LoDashExplicitWrapper<TValue> {
870 /**
871 * @see _.forIn
872 */
873 forIn(iteratee?: ObjectIterator<TValue, any>): this;
874 }
875 interface LoDashStatic {
876 /**
877 * This method is like _.forIn except that it iterates over properties of object in the opposite order.
878 *
879 * @param object The object to iterate over.
880 * @param iteratee The function invoked per iteration.
881 * @return Returns object.
882 */
883 forInRight<T>(object: T, iteratee?: ObjectIterator<T, any>): T;
884 /**
885 * @see _.forInRight
886 */
887 forInRight<T>(object: T | null | undefined, iteratee?: ObjectIterator<T, any>): T | null | undefined;
888 }
889 interface LoDashImplicitWrapper<TValue> {
890 /**
891 * @see _.forInRight
892 */
893 forInRight(iteratee?: ObjectIterator<TValue, any>): this;
894 }
895 interface LoDashExplicitWrapper<TValue> {
896 /**
897 * @see _.forInRight
898 */
899 forInRight(iteratee?: ObjectIterator<TValue, any>): this;
900 }
901 interface LoDashStatic {
902 /**
903 * Iterates over own enumerable properties of an object invoking iteratee for each property. The iteratee is
904 * invoked with three arguments: (value, key, object). Iteratee functions may exit
905 * iteration early by explicitly returning false.
906 *
907 * @param object The object to iterate over.
908 * @param iteratee The function invoked per iteration.
909 * @return Returns object.
910 */
911 forOwn<T>(object: T, iteratee?: ObjectIterator<T, any>): T;
912 /**
913 * @see _.forOwn
914 */
915 forOwn<T>(object: T | null | undefined, iteratee?: ObjectIterator<T, any>): T | null | undefined;
916 }
917 interface LoDashImplicitWrapper<TValue> {
918 /**
919 * @see _.forOwn
920 */
921 forOwn(iteratee?: ObjectIterator<TValue, any>): this;
922 }
923 interface LoDashExplicitWrapper<TValue> {
924 /**
925 * @see _.forOwn
926 */
927 forOwn(iteratee?: ObjectIterator<TValue, any>): this;
928 }
929 interface LoDashStatic {
930 /**
931 * This method is like _.forOwn except that it iterates over properties of object in the opposite order.
932 *
933 * @param object The object to iterate over.
934 * @param iteratee The function invoked per iteration.
935 * @return Returns object.
936 */
937 forOwnRight<T>(object: T, iteratee?: ObjectIterator<T, any>): T;
938 /**
939 * @see _.forOwnRight
940 */
941 forOwnRight<T>(object: T | null | undefined, iteratee?: ObjectIterator<T, any>): T | null | undefined;
942 }
943 interface LoDashImplicitWrapper<TValue> {
944 /**
945 * @see _.forOwnRight
946 */
947 forOwnRight(iteratee?: ObjectIterator<TValue, any>): this;
948 }
949 interface LoDashExplicitWrapper<TValue> {
950 /**
951 * @see _.forOwnRight
952 */
953 forOwnRight(iteratee?: ObjectIterator<TValue, any>): this;
954 }
955 interface LoDashStatic {
956 /**
957 * Creates an array of function property names from own enumerable properties
958 * of `object`.
959 *
960 * @category Object
961 * @param object The object to inspect.
962 * @returns Returns the new array of property names.
963 * @example
964 *
965 * function Foo() {
966 * this.a = _.constant('a');
967 * this.b = _.constant('b');
968 * }
969 *
970 * Foo.prototype.c = _.constant('c');
971 *
972 * _.functions(new Foo);
973 * // => ['a', 'b']
974 */
975 functions(object: any): string[];
976 }
977 interface LoDashImplicitWrapper<TValue> {
978 /**
979 * @see _.functions
980 */
981 functions(): Collection<string>;
982 }
983 interface LoDashExplicitWrapper<TValue> {
984 /**
985 * @see _.functions
986 */
987 functions(): CollectionChain<string>;
988 }
989 interface LoDashStatic {
990 /**
991 * Creates an array of function property names from own and inherited
992 * enumerable properties of `object`.
993 *
994 * @category Object
995 * @param object The object to inspect.
996 * @returns Returns the new array of property names.
997 * @example
998 *
999 * function Foo() {
1000 * this.a = _.constant('a');
1001 * this.b = _.constant('b');
1002 * }
1003 *
1004 * Foo.prototype.c = _.constant('c');
1005 *
1006 * _.functionsIn(new Foo);
1007 * // => ['a', 'b', 'c']
1008 */
1009 functionsIn<T extends {}>(object: any): string[];
1010 }
1011 interface LoDashImplicitWrapper<TValue> {
1012 /**
1013 * @see _.functionsIn
1014 */
1015 functionsIn(): Collection<string>;
1016 }
1017 interface LoDashExplicitWrapper<TValue> {
1018 /**
1019 * @see _.functionsIn
1020 */
1021 functionsIn(): CollectionChain<string>;
1022 }
1023
1024 type GetFieldTypeOfArrayLikeByKey<T extends unknown[], K> =
1025 K extends number ? T[K]
1026 : K extends `${infer N extends number}` ? T[N]
1027 : K extends keyof T ? T[K] : undefined;
1028
1029 type GetFieldTypeOfStringByKey<T extends string, K> =
1030 K extends number ? T[K]
1031 : K extends `${infer N extends number}` ? T[N]
1032 : K extends keyof T ? T[K]
1033 : undefined;
1034
1035 type GetFieldTypeOfNarrowedByKey<T, K> =
1036 T extends unknown[] ? GetFieldTypeOfArrayLikeByKey<T, K>
1037 : T extends string ? GetFieldTypeOfStringByKey<T, K>
1038 : K extends keyof T ? T[K]
1039 : K extends number
1040 ? `${K}` extends keyof T ? T[`${K}`] : undefined
1041 : K extends `${infer N extends number}`
1042 ? N extends keyof T ? T[N] : undefined
1043 : undefined;
1044
1045 /** Internal. Assumes P is a dot-delimited path. */
1046 type GetFieldTypeOfNarrowedByDotPath<T, P> =
1047 P extends `${infer L}.${infer R}`
1048 ? GetFieldType<GetFieldTypeOfNarrowedByKey<T, L>, R, 'DotPath'>
1049 : GetFieldTypeOfNarrowedByKey<T, P>;
1050
1051 /** Internal. This is a piece of GetFieldTypeOfNarrowedByLKR logic,
1052 * assuming that Lc isn't to be ignored, and does not end with dot. */
1053 type GetFieldTypeOfNarrowedByLcKR<T, Lc, K, R> =
1054 '' extends R
1055 ? GetFieldType<GetFieldTypeOfNarrowedByDotPath<T, Lc>, K, 'Key'>
1056 : R extends `.${infer Rc}`
1057 ? GetFieldType<GetFieldType<GetFieldTypeOfNarrowedByDotPath<T, Lc>, K, 'Key'>, Rc>
1058 : GetFieldType<GetFieldType<GetFieldTypeOfNarrowedByDotPath<T, Lc>, K, 'Key'>, R>
1059
1060 /** Internal. Assumes T has been narrowed; L is a dot-delimited path,
1061 * and should be ignored if an empty string; K is a key name; and R is
1062 * a dot-delimetered path, to be ignored if an empty string. Also if
1063 * L has a tail dot, or R has a front dot, these dots should be discarded,
1064 * however when L or R is just a dot, they should be interpreted as empty
1065 * key name (rather than ignored). */
1066 type GetFieldTypeOfNarrowedByLKR<T, L, K, R> =
1067 '' extends L
1068 ? '' extends R
1069 ? GetFieldTypeOfNarrowedByKey<T, K>
1070 : R extends `.${infer Rc}`
1071 ? GetFieldType<GetFieldTypeOfNarrowedByKey<T, K>, Rc>
1072 : GetFieldType<GetFieldTypeOfNarrowedByKey<T, K>, R>
1073 : L extends `${infer Lc}.`
1074 ? GetFieldTypeOfNarrowedByLcKR<T, Lc, K, R>
1075 : GetFieldTypeOfNarrowedByLcKR<T, L, K, R>
1076
1077 /** Internal. Assumes T has been narrowed. */
1078 type GetFieldTypeOfNarrowed<T, X, XT extends 'DotPath' | 'Key' | 'Path'> =
1079 XT extends 'Key' ? GetFieldTypeOfNarrowedByKey<T, X>
1080 : XT extends 'DotPath' ? GetFieldTypeOfNarrowedByDotPath<T, X>
1081 : X extends `${infer L}['${infer K}']${infer R}`
1082 ? GetFieldTypeOfNarrowedByLKR<T, L, K, R>
1083 : X extends `${infer L}["${infer K}"]${infer R}`
1084 ? GetFieldTypeOfNarrowedByLKR<T, L, K, R>
1085 : X extends `${infer L}[${infer K}]${infer R}`
1086 ? GetFieldTypeOfNarrowedByLKR<T, L, K, R>
1087 : GetFieldTypeOfNarrowedByDotPath<T, X>;
1088
1089 /** Internal. Assumes T has been narrowed to an object type. */
1090 type GetFieldTypeOfObject<T, X, XT extends 'DotPath' | 'Key' | 'Path'> =
1091 Extract<T, unknown[]> extends never
1092 ? GetFieldTypeOfNarrowed<T, X, XT>
1093 : GetFieldTypeOfNarrowed<Exclude<T, unknown[]>, X, XT>
1094 | GetFieldTypeOfNarrowed<Extract<T, unknown[]>, X, XT>;
1095
1096 /** Internal. Assumes T has been narrowed to a primitive type. */
1097 type GetFieldTypeOfPrimitive<T, X, XT extends 'DotPath' | 'Key' | 'Path'> =
1098 Extract<T, string> extends never
1099 ? T extends never ? never : undefined
1100 : (Exclude<T, string> extends never ? never : undefined)
1101 | GetFieldTypeOfNarrowed<Extract<T, string>, X, XT>;
1102
1103 /**
1104 * Deduces the type of value at the path P of type T,
1105 * so that _.get<T, P>(t: T, p: P): GetFieldType<T, P>.
1106 * XT specifies the exact meaning of X:
1107 * - 'Path' (default) - X is a path type to be fully parsed;
1108 * - 'DotPath - X is a dot-delimitered path, without square (indexing) brackets;
1109 * - 'Key' - X is a simple key, and needs no parsing.
1110 */
1111 type GetFieldType<T, X, XT extends 'DotPath' | 'Key' | 'Path' = 'Path'> =
1112 Extract<T, object> extends never
1113 ? GetFieldTypeOfPrimitive<T, X, XT>
1114 : GetFieldTypeOfPrimitive<Exclude<T, object>, X, XT>
1115 | GetFieldTypeOfObject<Extract<T, object>, X, XT>;
1116
1117 interface LoDashStatic {
1118 /**
1119 * Gets the property value at path of object. If the resolved value is undefined the defaultValue is used
1120 * in its place.
1121 *
1122 * @param object The object to query.
1123 * @param path The path of the property to get.
1124 * @param defaultValue The value returned if the resolved value is undefined.
1125 * @return Returns the resolved value.
1126 */
1127 get<TObject extends object, TKey extends keyof TObject>(object: TObject, path: TKey | [TKey]): TObject[TKey];
1128 /**
1129 * @see _.get
1130 */
1131 get<TObject extends object, TKey extends keyof TObject>(object: TObject | null | undefined, path: TKey | [TKey]): TObject[TKey] | undefined;
1132 /**
1133 * @see _.get
1134 */
1135 get<TObject extends object, TKey extends keyof TObject, TDefault>(object: TObject | null | undefined, path: TKey | [TKey], defaultValue: TDefault): Exclude<TObject[TKey], undefined> | TDefault;
1136 /**
1137 * @see _.get
1138 */
1139 get<TObject extends object, TKey1 extends keyof TObject, TKey2 extends keyof TObject[TKey1]>(object: TObject, path: [TKey1, TKey2]): TObject[TKey1][TKey2];
1140 /**
1141 * @see _.get
1142 */
1143 get<TObject extends object, TKey1 extends keyof TObject, TKey2 extends keyof NonNullable<TObject[TKey1]>>(object: TObject | null | undefined, path: [TKey1, TKey2]): NonNullable<TObject[TKey1]>[TKey2] | undefined;
1144 /**
1145 * @see _.get
1146 */
1147 get<TObject extends object, TKey1 extends keyof TObject, TKey2 extends keyof NonNullable<TObject[TKey1]>, TDefault>(object: TObject | null | undefined, path: [TKey1, TKey2], defaultValue: TDefault): Exclude<NonNullable<TObject[TKey1]>[TKey2], undefined> | TDefault;
1148 /**
1149 * @see _.get
1150 */
1151 get<TObject extends object, TKey1 extends keyof TObject, TKey2 extends keyof TObject[TKey1], TKey3 extends keyof TObject[TKey1][TKey2]>(object: TObject, path: [TKey1, TKey2, TKey3]): TObject[TKey1][TKey2][TKey3];
1152 /**
1153 * @see _.get
1154 */
1155 get<TObject extends object, TKey1 extends keyof TObject, TKey2 extends keyof NonNullable<TObject[TKey1]>, TKey3 extends keyof NonNullable<NonNullable<TObject[TKey1]>[TKey2]>>(object: TObject | null | undefined, path: [TKey1, TKey2, TKey3]): NonNullable<NonNullable<TObject[TKey1]>[TKey2]>[TKey3] | undefined;
1156 /**
1157 * @see _.get
1158 */
1159 get<TObject extends object, TKey1 extends keyof TObject, TKey2 extends keyof NonNullable<TObject[TKey1]>, TKey3 extends keyof NonNullable<NonNullable<TObject[TKey1]>[TKey2]>, TDefault>(object: TObject | null | undefined, path: [TKey1, TKey2, TKey3], defaultValue: TDefault): Exclude<NonNullable<NonNullable<TObject[TKey1]>[TKey2]>[TKey3], undefined> | TDefault;
1160 /**
1161 * @see _.get
1162 */
1163 get<TObject extends object, TKey1 extends keyof TObject, TKey2 extends keyof TObject[TKey1], TKey3 extends keyof TObject[TKey1][TKey2], TKey4 extends keyof TObject[TKey1][TKey2][TKey3]>(object: TObject, path: [TKey1, TKey2, TKey3, TKey4]): TObject[TKey1][TKey2][TKey3][TKey4];
1164 /**
1165 * @see _.get
1166 */
1167 get<TObject extends object, TKey1 extends keyof TObject, TKey2 extends keyof NonNullable<TObject[TKey1]>, TKey3 extends keyof NonNullable<NonNullable<TObject[TKey1]>[TKey2]>, TKey4 extends keyof NonNullable<NonNullable<NonNullable<TObject[TKey1]>[TKey2]>[TKey3]>>(object: TObject | null | undefined, path: [TKey1, TKey2, TKey3, TKey4]): NonNullable<NonNullable<NonNullable<TObject[TKey1]>[TKey2]>[TKey3]>[TKey4] | undefined;
1168 /**
1169 * @see _.get
1170 */
1171 get<TObject extends object, TKey1 extends keyof TObject, TKey2 extends keyof NonNullable<TObject[TKey1]>, TKey3 extends keyof NonNullable<NonNullable<TObject[TKey1]>[TKey2]>, TKey4 extends keyof NonNullable<NonNullable<NonNullable<TObject[TKey1]>[TKey2]>[TKey3]>, TDefault>(object: TObject | null | undefined, path: [TKey1, TKey2, TKey3, TKey4], defaultValue: TDefault): Exclude<NonNullable<NonNullable<NonNullable<TObject[TKey1]>[TKey2]>[TKey3]>[TKey4], undefined> | TDefault;
1172 /**
1173 * @see _.get
1174 */
1175 get<T>(object: NumericDictionary<T>, path: number): T;
1176 /**
1177 * @see _.get
1178 */
1179 get<T>(object: NumericDictionary<T> | null | undefined, path: number): T | undefined;
1180 /**
1181 * @see _.get
1182 */
1183 get<T, TDefault>(object: NumericDictionary<T> | null | undefined, path: number, defaultValue: TDefault): T | TDefault;
1184 /**
1185 * @see _.get
1186 */
1187 get<TDefault>(object: null | undefined, path: PropertyPath, defaultValue: TDefault): TDefault;
1188 /**
1189 * @see _.get
1190 */
1191 get(object: null | undefined, path: PropertyPath): undefined;
1192 /**
1193 * @see _.get
1194 */
1195 get<TObject, TPath extends string>(data: TObject, path: TPath): string extends TPath ? any : GetFieldType<TObject, TPath>;
1196 /**
1197 * @see _.get
1198 */
1199 get<TObject, TPath extends string, TDefault = GetFieldType<TObject, TPath>>(data: TObject, path: TPath, defaultValue: TDefault): Exclude<GetFieldType<TObject, TPath>, null | undefined> | TDefault;
1200 /**
1201 * @see _.get
1202 */
1203 get(object: any, path: PropertyPath, defaultValue?: any): any;
1204 }
1205 interface String {
1206 /**
1207 * @see _.get
1208 */
1209 get(path: number | number[]): string;
1210 /**
1211 * @see _.get
1212 */
1213 get(path: number | number[], defaultValue: string): string;
1214 }
1215 interface Object<T> {
1216 /**
1217 * @see _.get
1218 */
1219 get<TKey extends keyof T>(path: TKey | [TKey]): T[TKey];
1220 /**
1221 * @see _.get
1222 */
1223 get<TKey extends keyof T, TDefault>(path: TKey | [TKey], defaultValue: TDefault): Exclude<T[TKey], undefined> | TDefault;
1224 /**
1225 * @see _.get
1226 */
1227 get<TKey1 extends keyof T, TKey2 extends keyof T[TKey1]>(path: [TKey1, TKey2]): T[TKey1][TKey2];
1228 /**
1229 * @see _.get
1230 */
1231 get<TKey1 extends keyof T, TKey2 extends keyof T[TKey1], TDefault>(path: [TKey1, TKey2], defaultValue: TDefault): Exclude<T[TKey1][TKey2], undefined> | TDefault;
1232 /**
1233 * @see _.get
1234 */
1235 get<TKey1 extends keyof T, TKey2 extends keyof T[TKey1], TKey3 extends keyof T[TKey1][TKey2]>(path: [TKey1, TKey2, TKey3]): T[TKey1][TKey2][TKey3];
1236 /**
1237 * @see _.get
1238 */
1239 get<TKey1 extends keyof T, TKey2 extends keyof T[TKey1], TKey3 extends keyof T[TKey1][TKey2], TDefault>(path: [TKey1, TKey2, TKey3], defaultValue: TDefault): Exclude<T[TKey1][TKey2][TKey3], undefined> | TDefault;
1240 /**
1241 * @see _.get
1242 */
1243 get<TKey1 extends keyof T, TKey2 extends keyof T[TKey1], TKey3 extends keyof T[TKey1][TKey2], TKey4 extends keyof T[TKey1][TKey2][TKey3]>(path: [TKey1, TKey2, TKey3, TKey4]): T[TKey1][TKey2][TKey3][TKey4];
1244 /**
1245 * @see _.get
1246 */
1247 get<TKey1 extends keyof T, TKey2 extends keyof T[TKey1], TKey3 extends keyof T[TKey1][TKey2], TKey4 extends keyof T[TKey1][TKey2][TKey3], TDefault>(path: [TKey1, TKey2, TKey3, TKey4], defaultValue: TDefault): Exclude<T[TKey1][TKey2][TKey3][TKey4], undefined> | TDefault;
1248 /**
1249 * @see _.get
1250 */
1251 get<TPath extends string>(path: TPath): string extends TPath ? any : GetFieldType<T, TPath>;
1252 /**
1253 * @see _.get
1254 */
1255 get<TPath extends string, TDefault = GetFieldType<T, TPath>>(path: TPath, defaultValue: TDefault): Exclude<GetFieldType<T, TPath>, null | undefined> | TDefault;
1256 /**
1257 * @see _.get
1258 */
1259 get(path: PropertyPath, defaultValue?: any): any;
1260 }
1261 interface Collection<T> {
1262 /**
1263 * @see _.get
1264 */
1265 get(path: number): T;
1266 /**
1267 * @see _.get
1268 */
1269 get<TDefault>(path: number, defaultValue: TDefault): T | TDefault;
1270 }
1271 interface StringChain {
1272 /**
1273 * @see _.get
1274 */
1275 get(path: number | number[]): StringChain;
1276 /**
1277 * @see _.get
1278 */
1279 get(path: number | number[], defaultValue: string): StringChain;
1280 }
1281 interface StringNullableChain {
1282 /**
1283 * @see _.get
1284 */
1285 get(path: number | number[]): StringNullableChain;
1286 /**
1287 * @see _.get
1288 */
1289 get(path: number | number[], defaultValue: string): StringChain;
1290 }
1291 interface ObjectChain<T> {
1292 /**
1293 * @see _.get
1294 */
1295 get<TKey extends keyof T>(path: TKey | [TKey]): ExpChain<T[TKey]>;
1296 /**
1297 * @see _.get
1298 */
1299 get<TKey extends keyof T>(path: TKey | [TKey], defaultValue: never[]): T[TKey] extends any[] ? ExpChain<Exclude<T[TKey], undefined>> : ExpChain<Exclude<T[TKey], undefined> | never[]>;
1300 /**
1301 * @see _.get
1302 */
1303 get<TKey extends keyof T, TDefault>(path: TKey | [TKey], defaultValue: TDefault): ExpChain<Exclude<T[TKey], undefined> | TDefault>;
1304 /**
1305 * @see _.get
1306 */
1307 get<TKey1 extends keyof T, TKey2 extends keyof T[TKey1]>(path: [TKey1, TKey2]): ExpChain<T[TKey1][TKey2]>;
1308 /**
1309 * @see _.get
1310 */
1311 get<TKey1 extends keyof T, TKey2 extends keyof T[TKey1]>(path: [TKey1, TKey2], defaultValue: never[]): T[TKey1][TKey2] extends any[] ? ExpChain<Exclude<T[TKey1][TKey2], undefined>> : ExpChain<Exclude<T[TKey1][TKey2], undefined> | never[]>;
1312 /**
1313 * @see _.get
1314 */
1315 get<TKey1 extends keyof T, TKey2 extends keyof T[TKey1], TDefault>(path: [TKey1, TKey2], defaultValue: TDefault): ExpChain<Exclude<T[TKey1][TKey2], undefined> | TDefault>;
1316 /**
1317 * @see _.get
1318 */
1319 get<TKey1 extends keyof T, TKey2 extends keyof T[TKey1], TKey3 extends keyof T[TKey1][TKey2]>(path: [TKey1, TKey2, TKey3]): ExpChain<T[TKey1][TKey2][TKey3]>;
1320 /**
1321 * @see _.get
1322 */
1323 get<TKey1 extends keyof T, TKey2 extends keyof T[TKey1], TKey3 extends keyof T[TKey1][TKey2]>(path: [TKey1, TKey2, TKey3], defaultValue: never[]): T[TKey1][TKey2][TKey3] extends any[] ? ExpChain<Exclude<T[TKey1][TKey2][TKey3], undefined>> : ExpChain<Exclude<T[TKey1][TKey2][TKey3], undefined> | never[]>;
1324 /**
1325 * @see _.get
1326 */
1327 get<TKey1 extends keyof T, TKey2 extends keyof T[TKey1], TKey3 extends keyof T[TKey1][TKey2], TDefault>(path: [TKey1, TKey2, TKey3], defaultValue: TDefault): ExpChain<Exclude<T[TKey1][TKey2][TKey3], undefined> | TDefault>;
1328 /**
1329 * @see _.get
1330 */
1331 get<TKey1 extends keyof T, TKey2 extends keyof T[TKey1], TKey3 extends keyof T[TKey1][TKey2], TKey4 extends keyof T[TKey1][TKey2][TKey3]>(path: [TKey1, TKey2, TKey3, TKey4]): ExpChain<T[TKey1][TKey2][TKey3][TKey4]>;
1332 /**
1333 * @see _.get
1334 */
1335 get<TKey1 extends keyof T, TKey2 extends keyof T[TKey1], TKey3 extends keyof T[TKey1][TKey2], TKey4 extends keyof T[TKey1][TKey2][TKey3]>(path: [TKey1, TKey2, TKey3, TKey4], defaultValue: never[]): T[TKey1][TKey2][TKey3][TKey4] extends any[] ? ExpChain<Exclude<T[TKey1][TKey2][TKey3][TKey4], undefined>> : ExpChain<Exclude<T[TKey1][TKey2][TKey3][TKey4], undefined> | never[]>;
1336 /**
1337 * @see _.get
1338 */
1339 get<TKey1 extends keyof T, TKey2 extends keyof T[TKey1], TKey3 extends keyof T[TKey1][TKey2], TKey4 extends keyof T[TKey1][TKey2][TKey3], TDefault>(path: [TKey1, TKey2, TKey3, TKey4], defaultValue: TDefault): ExpChain<Exclude<T[TKey1][TKey2][TKey3][TKey4], undefined> | TDefault>;
1340 /**
1341 * @see _.get
1342 */
1343 get<TPath extends string>(path: TPath): string extends TPath ? LoDashExplicitWrapper<any> : ExpChain<GetFieldType<T, TPath>>;
1344 /**
1345 * @see _.get
1346 */
1347 get<TPath extends string, TDefault = GetFieldType<T, TPath>>(path: TPath, defaultValue: TDefault): ExpChain<Exclude<GetFieldType<T, TPath>, null | undefined> | TDefault>;
1348 /**
1349 * @see _.get
1350 */
1351 get(path: PropertyPath, defaultValue?: any): LoDashExplicitWrapper<any>;
1352 }
1353 interface CollectionChain<T> {
1354 /**
1355 * @see _.get
1356 */
1357 get(path: number): ExpChain<T>;
1358 /**
1359 * @see _.get
1360 */
1361 get<TDefault>(path: number, defaultValue: TDefault): ExpChain<T | TDefault>;
1362 }
1363 interface LoDashStatic {
1364 /**
1365 * Checks if `path` is a direct property of `object`.
1366 *
1367 * @category Object
1368 * @param object The object to query.
1369 * @param path The path to check.
1370 * @returns Returns `true` if `path` exists, else `false`.
1371 * @example
1372 *
1373 * var object = { 'a': { 'b': { 'c': 3 } } };
1374 * var other = _.create({ 'a': _.create({ 'b': _.create({ 'c': 3 }) }) });
1375 *
1376 * _.has(object, 'a');
1377 * // => true
1378 *
1379 * _.has(object, 'a.b.c');
1380 * // => true
1381 *
1382 * _.has(object, ['a', 'b', 'c']);
1383 * // => true
1384 *
1385 * _.has(other, 'a');
1386 * // => false
1387 */
1388 has<T, K extends PropertyName>(object: T, path: K): object is T & { [P in K]: P extends keyof T ? T[P] : Record<string, unknown> extends T ? T[keyof T] : unknown} & {[uniqueSymbol]: unknown};
1389 has<T>(object: T, path: PropertyPath): boolean;
1390 }
1391 interface LoDashImplicitWrapper<TValue> {
1392 /**
1393 * @see _.has
1394 */
1395 has(path: PropertyPath): boolean;
1396 }
1397 interface LoDashExplicitWrapper<TValue> {
1398 /**
1399 * @see _.has
1400 */
1401 has(path: PropertyPath): PrimitiveChain<boolean>;
1402 }
1403 interface LoDashStatic {
1404 /**
1405 * Checks if `path` is a direct or inherited property of `object`.
1406 *
1407 * @category Object
1408 * @param object The object to query.
1409 * @param path The path to check.
1410 * @returns Returns `true` if `path` exists, else `false`.
1411 * @example
1412 *
1413 * var object = _.create({ 'a': _.create({ 'b': _.create({ 'c': 3 }) }) });
1414 *
1415 * _.hasIn(object, 'a');
1416 * // => true
1417 *
1418 * _.hasIn(object, 'a.b.c');
1419 * // => true
1420 *
1421 * _.hasIn(object, ['a', 'b', 'c']);
1422 * // => true
1423 *
1424 * _.hasIn(object, 'b');
1425 * // => false
1426 */
1427 hasIn<T>(object: T, path: PropertyPath): boolean;
1428 }
1429 interface LoDashImplicitWrapper<TValue> {
1430 /**
1431 * @see _.hasIn
1432 */
1433 hasIn(path: PropertyPath): boolean;
1434 }
1435 interface LoDashExplicitWrapper<TValue> {
1436 /**
1437 * @see _.hasIn
1438 */
1439 hasIn(path: PropertyPath): PrimitiveChain<boolean>;
1440 }
1441 interface LoDashStatic {
1442 /**
1443 * Creates an object composed of the inverted keys and values of object. If object contains duplicate values,
1444 * subsequent values overwrite property assignments of previous values unless multiValue is true.
1445 *
1446 * @param object The object to invert.
1447 * @param multiValue Allow multiple values per key.
1448 * @return Returns the new inverted object.
1449 */
1450 invert(object: object): Dictionary<string>;
1451 }
1452 interface LoDashImplicitWrapper<TValue> {
1453 /**
1454 * @see _.invert
1455 */
1456 invert(): Object<Dictionary<string>>;
1457 }
1458 interface LoDashExplicitWrapper<TValue> {
1459 /**
1460 * @see _.invert
1461 */
1462 invert(): ObjectChain<Dictionary<string>>;
1463 }
1464 interface LoDashStatic {
1465 /**
1466 * This method is like _.invert except that the inverted object is generated from the results of running each
1467 * element of object through iteratee. The corresponding inverted value of each inverted key is an array of
1468 * keys responsible for generating the inverted value. The iteratee is invoked with one argument: (value).
1469 *
1470 * @param object The object to invert.
1471 * @param interatee The iteratee invoked per element.
1472 * @return Returns the new inverted object.
1473 */
1474 invertBy<T>(object: Dictionary<T> | NumericDictionary<T> | null | undefined, interatee?: ValueIteratee<T>): Dictionary<string[]>;
1475 /**
1476 * @see _.invertBy
1477 */
1478 invertBy<T extends object>(object: T | null | undefined, interatee?: ValueIteratee<T[keyof T]>): Dictionary<string[]>;
1479 }
1480 interface String {
1481 /**
1482 * @see _.invertBy
1483 */
1484 invertBy(iteratee?: ValueIteratee<string>): Object<Dictionary<string[]>>;
1485 }
1486 interface Collection<T> {
1487 /**
1488 * @see _.invertBy
1489 */
1490 invertBy(iteratee?: ValueIteratee<T>): Object<Dictionary<string[]>>;
1491 }
1492 interface Object<T> {
1493 /**
1494 * @see _.invertBy
1495 */
1496 invertBy(iteratee?: ValueIteratee<T[keyof T]>): Object<Dictionary<string[]>>;
1497 }
1498 interface StringChain {
1499 /**
1500 * @see _.invertBy
1501 */
1502 invertBy(iteratee?: ValueIteratee<string>): ObjectChain<Dictionary<string[]>>;
1503 }
1504 interface StringNullableChain {
1505 /**
1506 * @see _.invertBy
1507 */
1508 invertBy(iteratee?: ValueIteratee<string>): ObjectChain<Dictionary<string[]>>;
1509 }
1510 interface CollectionChain<T> {
1511 /**
1512 * @see _.invertBy
1513 */
1514 invertBy(iteratee?: ValueIteratee<T>): ObjectChain<Dictionary<string[]>>;
1515 }
1516 interface ObjectChain<T> {
1517 /**
1518 * @see _.invertBy
1519 */
1520 invertBy(iteratee?: ValueIteratee<T[keyof T]>): ObjectChain<Dictionary<string[]>>;
1521 }
1522 interface LoDashStatic {
1523 /**
1524 * Invokes the method at path of object.
1525 * @param object The object to query.
1526 * @param path The path of the method to invoke.
1527 * @param args The arguments to invoke the method with.
1528 */
1529 invoke(object: any, path: PropertyPath, ...args: any[]): any;
1530 }
1531 interface LoDashImplicitWrapper<TValue> {
1532 /**
1533 * @see _.invoke
1534 */
1535 invoke(path: PropertyPath, ...args: any[]): any;
1536 }
1537 interface LoDashExplicitWrapper<TValue> {
1538 /**
1539 * @see _.invoke
1540 */
1541 invoke(path: PropertyPath, ...args: any[]): LoDashExplicitWrapper<any>;
1542 }
1543 interface LoDashStatic {
1544 /**
1545 * Creates an array of the own enumerable property names of object.
1546 *
1547 * Note: Non-object values are coerced to objects. See the ES spec for more details.
1548 *
1549 * @param object The object to query.
1550 * @return Returns the array of property names.
1551 */
1552 keys(object?: any): string[];
1553 }
1554 interface LoDashImplicitWrapper<TValue> {
1555 /**
1556 * @see _.keys
1557 */
1558 keys(): Collection<string>;
1559 }
1560 interface LoDashExplicitWrapper<TValue> {
1561 /**
1562 * @see _.keys
1563 */
1564 keys(): CollectionChain<string>;
1565 }
1566 interface LoDashStatic {
1567 /**
1568 * Creates an array of the own and inherited enumerable property names of object.
1569 *
1570 * Note: Non-object values are coerced to objects.
1571 *
1572 * @param object The object to query.
1573 * @return An array of property names.
1574 */
1575 keysIn(object?: any): string[];
1576 }
1577 interface LoDashImplicitWrapper<TValue> {
1578 /**
1579 * @see _.keysIn
1580 */
1581 keysIn(): Collection<string>;
1582 }
1583 interface LoDashExplicitWrapper<TValue> {
1584 /**
1585 * @see _.keysIn
1586 */
1587 keysIn(): CollectionChain<string>;
1588 }
1589 interface LoDashStatic {
1590 /**
1591 * The opposite of _.mapValues; this method creates an object with the same values as object and keys generated
1592 * by running each own enumerable property of object through iteratee.
1593 *
1594 * @param object The object to iterate over.
1595 * @param iteratee The function invoked per iteration.
1596 * @return Returns the new mapped object.
1597 */
1598 mapKeys<T>(object: List<T> | null | undefined, iteratee?: ListIteratee<T>): Dictionary<T>;
1599 /**
1600 * @see _.mapKeys
1601 */
1602 mapKeys<T extends object>(object: T | null | undefined, iteratee?: ObjectIteratee<T>): Dictionary<T[keyof T]>;
1603 }
1604 interface Collection<T> {
1605 /**
1606 * @see _.mapKeys
1607 */
1608 mapKeys(iteratee?: ListIteratee<T>): Object<Dictionary<T>>;
1609 }
1610 interface Object<T> {
1611 /**
1612 * @see _.mapKeys
1613 */
1614 mapKeys(iteratee?: ObjectIteratee<T>): Object<Dictionary<T[keyof T]>>;
1615 }
1616 interface CollectionChain<T> {
1617 /**
1618 * @see _.mapKeys
1619 */
1620 mapKeys(iteratee?: ListIteratee<T>): ObjectChain<Dictionary<T>>;
1621 }
1622 interface ObjectChain<T> {
1623 /**
1624 * @see _.mapKeys
1625 */
1626 mapKeys(iteratee?: ObjectIteratee<T>): ObjectChain<Dictionary<T[keyof T]>>;
1627 }
1628 interface LoDashStatic {
1629 /**
1630 * Creates an object with the same keys as object and values generated by running each own
1631 * enumerable property of object through iteratee. The iteratee function is
1632 * invoked with three arguments: (value, key, object).
1633 *
1634 * @param object The object to iterate over.
1635 * @param iteratee The function invoked per iteration.
1636 * @return Returns the new mapped object.
1637 */
1638 mapValues<TResult>(obj: string | null | undefined, callback: StringIterator<TResult>): NumericDictionary<TResult>;
1639 /**
1640 * @see _.mapValues
1641 */
1642 mapValues<T, TResult>(array: T[], callback: ArrayIterator<T, TResult>): NumericDictionary<TResult>;
1643 /**
1644 * @see _.mapValues
1645 */
1646 mapValues<T extends object, TResult>(obj: T | null | undefined, callback: ObjectIterator<T, TResult>): { [P in keyof T]: TResult };
1647 /**
1648 * @see _.mapValues
1649 */
1650 mapValues<T>(obj: Dictionary<T> | NumericDictionary<T> | null | undefined, iteratee: object): Dictionary<boolean>;
1651 /**
1652 * @see _.mapValues
1653 */
1654 mapValues<T extends object>(obj: T | null | undefined, iteratee: object): { [P in keyof T]: boolean };
1655 /**
1656 * @see _.mapValues
1657 */
1658 mapValues<T, TKey extends keyof T>(obj: Dictionary<T> | NumericDictionary<T> | null | undefined, iteratee: TKey): Dictionary<T[TKey]>;
1659 /**
1660 * @see _.mapValues
1661 */
1662 mapValues<T>(obj: Dictionary<T> | NumericDictionary<T> | null | undefined, iteratee: string): Dictionary<any>;
1663 /**
1664 * @see _.mapValues
1665 */
1666 mapValues<T extends object>(obj: T | null | undefined, iteratee: string): { [P in keyof T]: any };
1667 /**
1668 * @see _.mapValues
1669 */
1670 mapValues(obj: string | null | undefined): NumericDictionary<string>;
1671 /**
1672 * @see _.mapValues
1673 */
1674 mapValues<T>(obj: Dictionary<T> | NumericDictionary<T> | null | undefined): Dictionary<T>;
1675 /**
1676 * @see _.mapValues
1677 */
1678 mapValues<T extends object>(obj: T): T;
1679 /**
1680 * @see _.mapValues
1681 */
1682 mapValues<T extends object>(obj: T | null | undefined): PartialObject<T>;
1683 }
1684 interface String {
1685 /**
1686 * @see _.mapValues
1687 */
1688 mapValues<TResult>(callback: StringIterator<TResult>): Object<NumericDictionary<TResult>>;
1689 /**
1690 * @see _.mapValues
1691 */
1692 mapValues(): Object<NumericDictionary<string>>;
1693 }
1694 interface Collection<T> {
1695 /**
1696 * @see _.mapValues
1697 */
1698 mapValues<TResult>(callback: ArrayIterator<T, TResult>): NumericDictionary<TResult>;
1699 /**
1700 * @see _.mapValues
1701 */
1702 mapValues<TKey extends keyof T>(iteratee: TKey): Object<Dictionary<T[TKey]>>;
1703 /**
1704 * @see _.mapValues
1705 */
1706 mapValues(iteratee: object): Object<Dictionary<boolean>>;
1707 /**
1708 * @see _.mapValues
1709 */
1710 mapValues(iteratee: string): Object<Dictionary<any>>;
1711 /**
1712 * @see _.mapValues
1713 */
1714 mapValues(): Object<Dictionary<T>>;
1715 }
1716 interface Object<T> {
1717 /**
1718 * @see _.mapValues
1719 */
1720 mapValues<TResult>(callback: ObjectIterator<T, TResult>): Object<{ [P in keyof T]: TResult }>;
1721 /**
1722 * @see _.mapValues
1723 */
1724 mapValues<TResult>(callback: DictionaryIterator<T[keyof T], TResult>): Object<Dictionary<TResult>>;
1725 /**
1726 * @see _.mapValues
1727 */
1728 mapValues(iteratee: object): Object<{ [P in keyof T]: boolean }>;
1729 /**
1730 * @see _.mapValues
1731 */
1732 mapValues<TKey extends keyof T[keyof T]>(iteratee: TKey): Object<Dictionary<T[keyof T][TKey]>>;
1733 /**
1734 * @see _.mapValues
1735 */
1736 mapValues(iteratee: string): Object<{ [P in keyof T]: any }>;
1737 /**
1738 * @see _.mapValues
1739 */
1740 mapValues(): Object<T>;
1741 }
1742 interface StringChain {
1743 /**
1744 * @see _.mapValues
1745 */
1746 mapValues<TResult>(callback: StringIterator<TResult>): ObjectChain<NumericDictionary<TResult>>;
1747 /**
1748 * @see _.mapValues
1749 */
1750 mapValues(): ObjectChain<NumericDictionary<string>>;
1751 }
1752 interface StringNullableChain {
1753 /**
1754 * @see _.mapValues
1755 */
1756 mapValues<TResult>(callback: StringIterator<TResult>): ObjectChain<NumericDictionary<TResult>>;
1757 /**
1758 * @see _.mapValues
1759 */
1760 mapValues(): ObjectChain<NumericDictionary<string>>;
1761 }
1762 interface CollectionChain<T> {
1763 /**
1764 * @see _.mapValues
1765 */
1766 mapValues<TResult>(callback: ArrayIterator<T, TResult>): ObjectChain<NumericDictionary<TResult>>;
1767 /**
1768 * @see _.mapValues
1769 */
1770 mapValues<TKey extends keyof T>(iteratee: TKey): ObjectChain<Dictionary<T[TKey]>>;
1771 /**
1772 * @see _.mapValues
1773 */
1774 mapValues(iteratee: object): ObjectChain<Dictionary<boolean>>;
1775 /**
1776 * @see _.mapValues
1777 */
1778 mapValues(iteratee: string): ObjectChain<Dictionary<any>>;
1779 /**
1780 * @see _.mapValues
1781 */
1782 mapValues(): ObjectChain<Dictionary<T>>;
1783 }
1784 interface ObjectChain<T> {
1785 /**
1786 * @see _.mapValues
1787 */
1788 mapValues<TResult>(callback: ObjectIterator<T, TResult>): ObjectChain<{ [P in keyof T]: TResult }>;
1789 /**
1790 * @see _.mapValues
1791 */
1792 mapValues<TResult>(callback: DictionaryIterator<T[keyof T], TResult>): ObjectChain<Dictionary<TResult>>;
1793 /**
1794 * @see _.mapValues
1795 */
1796 mapValues(iteratee: object): ObjectChain<{ [P in keyof T]: boolean }>;
1797 /**
1798 * @see _.mapValues
1799 */
1800 mapValues<TKey extends keyof T[keyof T]>(iteratee: TKey): ObjectChain<Dictionary<T[keyof T][TKey]>>;
1801 /**
1802 * @see _.mapValues
1803 */
1804 mapValues(iteratee: string): ObjectChain<{ [P in keyof T]: any }>;
1805 /**
1806 * @see _.mapValues
1807 */
1808 mapValues(): ObjectChain<T>;
1809 }
1810 interface LoDashStatic {
1811 /**
1812 * Recursively merges own and inherited enumerable properties of source
1813 * objects into the destination object, skipping source properties that resolve
1814 * to `undefined`. Array and plain object properties are merged recursively.
1815 * Other objects and value types are overridden by assignment. Source objects
1816 * are applied from left to right. Subsequent sources overwrite property
1817 * assignments of previous sources.
1818 *
1819 * **Note:** This method mutates `object`.
1820 *
1821 * @category Object
1822 * @param object The destination object.
1823 * @param [sources] The source objects.
1824 * @returns Returns `object`.
1825 * @example
1826 *
1827 * var users = {
1828 * 'data': [{ 'user': 'barney' }, { 'user': 'fred' }]
1829 * };
1830 *
1831 * var ages = {
1832 * 'data': [{ 'age': 36 }, { 'age': 40 }]
1833 * };
1834 *
1835 * _.merge(users, ages);
1836 * // => { 'data': [{ 'user': 'barney', 'age': 36 }, { 'user': 'fred', 'age': 40 }] }
1837 */
1838 merge<TObject, TSource>(object: TObject, source: TSource): TObject & TSource;
1839 /**
1840 * @see _.merge
1841 */
1842 merge<TObject, TSource1, TSource2>(object: TObject, source1: TSource1, source2: TSource2): TObject & TSource1 & TSource2;
1843 /**
1844 * @see _.merge
1845 */
1846 merge<TObject, TSource1, TSource2, TSource3>(object: TObject, source1: TSource1, source2: TSource2, source3: TSource3): TObject & TSource1 & TSource2 & TSource3;
1847 /**
1848 * @see _.merge
1849 */
1850 merge<TObject, TSource1, TSource2, TSource3, TSource4>(object: TObject, source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4): TObject & TSource1 & TSource2 & TSource3 & TSource4;
1851 /**
1852 * @see _.merge
1853 */
1854 merge(object: any, ...otherArgs: any[]): any;
1855 }
1856 interface Object<T> {
1857 /**
1858 * @see _.merge
1859 */
1860 merge<TSource>(source: TSource): Object<T & TSource>;
1861 /**
1862 * @see _.merge
1863 */
1864 merge<TSource1, TSource2>(source1: TSource1, source2: TSource2): Object<T & TSource1 & TSource2>;
1865 /**
1866 * @see _.merge
1867 */
1868 merge<TSource1, TSource2, TSource3>(source1: TSource1, source2: TSource2, source3: TSource3): Object<T & TSource1 & TSource2 & TSource3>;
1869 /**
1870 * @see _.merge
1871 */
1872 merge<TSource1, TSource2, TSource3, TSource4>(source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4): Object<T & TSource1 & TSource2 & TSource3 & TSource4>;
1873 /**
1874 * @see _.merge
1875 */
1876 merge(...otherArgs: any[]): Object<any>;
1877 }
1878 interface ObjectChain<T> {
1879 /**
1880 * @see _.merge
1881 */
1882 merge<TSource>(source: TSource): ObjectChain<T & TSource>;
1883 /**
1884 * @see _.merge
1885 */
1886 merge<TSource1, TSource2>(source1: TSource1, source2: TSource2): ObjectChain<T & TSource1 & TSource2>;
1887 /**
1888 * @see _.merge
1889 */
1890 merge<TSource1, TSource2, TSource3>(source1: TSource1, source2: TSource2, source3: TSource3): ObjectChain<T & TSource1 & TSource2 & TSource3>;
1891 /**
1892 * @see _.merge
1893 */
1894 merge<TSource1, TSource2, TSource3, TSource4>(source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4): ObjectChain<T & TSource1 & TSource2 & TSource3 & TSource4>;
1895 /**
1896 * @see _.merge
1897 */
1898 merge(...otherArgs: any[]): ObjectChain<any>;
1899 }
1900 type MergeWithCustomizer = { bivariantHack(value: any, srcValue: any, key: string, object: any, source: any): any; }["bivariantHack"];
1901 // TODO: Probably should just put all these methods on Object and forget about it.
1902 // oh, except for Collection<any> I GUESS
1903 interface LoDashStatic {
1904 /**
1905 * This method is like `_.merge` except that it accepts `customizer` which
1906 * is invoked to produce the merged values of the destination and source
1907 * properties. If `customizer` returns `undefined` merging is handled by the
1908 * method instead. The `customizer` is invoked with seven arguments:
1909 * (objValue, srcValue, key, object, source, stack).
1910 *
1911 * @category Object
1912 * @param object The destination object.
1913 * @param sources The source objects.
1914 * @param customizer The function to customize assigned values.
1915 * @returns Returns `object`.
1916 * @example
1917 *
1918 * function customizer(objValue, srcValue) {
1919 * if (_.isArray(objValue)) {
1920 * return objValue.concat(srcValue);
1921 * }
1922 * }
1923 *
1924 * var object = {
1925 * 'fruits': ['apple'],
1926 * 'vegetables': ['beet']
1927 * };
1928 *
1929 * var other = {
1930 * 'fruits': ['banana'],
1931 * 'vegetables': ['carrot']
1932 * };
1933 *
1934 * _.mergeWith(object, other, customizer);
1935 * // => { 'fruits': ['apple', 'banana'], 'vegetables': ['beet', 'carrot'] }
1936 */
1937 mergeWith<TObject, TSource>(object: TObject, source: TSource, customizer: MergeWithCustomizer): TObject & TSource;
1938 /**
1939 * @see _.mergeWith
1940 */
1941 mergeWith<TObject, TSource1, TSource2>(object: TObject, source1: TSource1, source2: TSource2, customizer: MergeWithCustomizer): TObject & TSource1 & TSource2;
1942 /**
1943 * @see _.mergeWith
1944 */
1945 mergeWith<TObject, TSource1, TSource2, TSource3>(object: TObject, source1: TSource1, source2: TSource2, source3: TSource3, customizer: MergeWithCustomizer): TObject & TSource1 & TSource2 & TSource3;
1946 /**
1947 * @see _.mergeWith
1948 */
1949 mergeWith<TObject, TSource1, TSource2, TSource3, TSource4>(object: TObject, source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4, customizer: MergeWithCustomizer): TObject & TSource1 & TSource2 & TSource3 & TSource4;
1950 /**
1951 * @see _.mergeWith
1952 */
1953 mergeWith(object: any, ...otherArgs: any[]): any;
1954 }
1955 interface Object<T> {
1956 /**
1957 * @see _.mergeWith
1958 */
1959 mergeWith<TSource>(source: TSource, customizer: MergeWithCustomizer): Object<T & TSource>;
1960 /**
1961 * @see _.mergeWith
1962 */
1963 mergeWith<TSource1, TSource2>(source1: TSource1, source2: TSource2, customizer: MergeWithCustomizer): Object<T & TSource1 & TSource2>;
1964 /**
1965 * @see _.mergeWith
1966 */
1967 mergeWith<TSource1, TSource2, TSource3>(source1: TSource1, source2: TSource2, source3: TSource3, customizer: MergeWithCustomizer): Object<T & TSource1 & TSource2 & TSource3>;
1968 /**
1969 * @see _.mergeWith
1970 */
1971 mergeWith<TSource1, TSource2, TSource3, TSource4>(source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4, customizer: MergeWithCustomizer): Object<T & TSource1 & TSource2 & TSource3 & TSource4>;
1972 /**
1973 * @see _.mergeWith
1974 */
1975 mergeWith(...otherArgs: any[]): Object<any>;
1976 }
1977 interface ObjectChain<T> {
1978 /**
1979 * @see _.mergeWith
1980 */
1981 mergeWith<TSource>(source: TSource, customizer: MergeWithCustomizer): ObjectChain<T & TSource>;
1982 /**
1983 * @see _.mergeWith
1984 */
1985 mergeWith<TSource1, TSource2>(source1: TSource1, source2: TSource2, customizer: MergeWithCustomizer): ObjectChain<T & TSource1 & TSource2>;
1986 /**
1987 * @see _.mergeWith
1988 */
1989 mergeWith<TSource1, TSource2, TSource3>(source1: TSource1, source2: TSource2, source3: TSource3, customizer: MergeWithCustomizer): ObjectChain<T & TSource1 & TSource2 & TSource3>;
1990 /**
1991 * @see _.mergeWith
1992 */
1993 mergeWith<TSource1, TSource2, TSource3, TSource4>(source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4, customizer: MergeWithCustomizer): ObjectChain<T & TSource1 & TSource2 & TSource3 & TSource4>;
1994 /**
1995 * @see _.mergeWith
1996 */
1997 mergeWith(...otherArgs: any[]): ObjectChain<any>;
1998 }
1999 interface LoDashStatic {
2000 /**
2001 * The opposite of `_.pick`; this method creates an object composed of the
2002 * own and inherited enumerable properties of `object` that are not omitted.
2003 *
2004 * @category Object
2005 * @param object The source object.
2006 * @param [paths] The property names to omit, specified
2007 * individually or in arrays..
2008 * @returns Returns the new object.
2009 * @example
2010 *
2011 * var object = { 'a': 1, 'b': '2', 'c': 3 };
2012 *
2013 * _.omit(object, ['a', 'c']);
2014 * // => { 'b': '2' }
2015 */
2016 omit<T extends object, K extends PropertyName[]>(
2017 object: T | null | undefined,
2018 ...paths: K
2019 ): Pick<T, Exclude<keyof T, K[number]>>;
2020 /**
2021 * @see _.omit
2022 */
2023 omit<T extends object, K extends keyof T>(object: T | null | undefined, ...paths: Array<Many<K>>): Omit<T, K>;
2024 /**
2025 * @see _.omit
2026 */
2027 omit<T extends object>(object: T | null | undefined, ...paths: Array<Many<PropertyName>>): PartialObject<T>;
2028 }
2029 interface Collection<T> {
2030 /**
2031 * @see _.omit
2032 */
2033 omit(...paths: Array<Many<PropertyName>>): Collection<T>;
2034 }
2035 interface Object<T> {
2036 /**
2037 * @see _.omit
2038 */
2039 omit<K extends keyof T>(...paths: Array<Many<K>>): Object<Omit<T, K>>;
2040 /**
2041 * @see _.omit
2042 */
2043 omit(...paths: Array<Many<PropertyName | IterateeShorthand<T>>>): Object<PartialObject<T>>;
2044 }
2045 interface CollectionChain<T> {
2046 /**
2047 * @see _.omit
2048 */
2049 omit(...paths: Array<Many<PropertyName>>): CollectionChain<T>;
2050 }
2051 interface ObjectChain<T> {
2052 /**
2053 * @see _.omit
2054 */
2055 omit<K extends keyof T>(...paths: Array<Many<K>>): ObjectChain<Omit<T, K>>;
2056 /**
2057 * @see _.omit
2058 */
2059 omit(...paths: Array<Many<PropertyName>>): ObjectChain<PartialObject<T>>;
2060 }
2061 interface LoDashStatic {
2062 /**
2063 * The opposite of `_.pickBy`; this method creates an object composed of the
2064 * own and inherited enumerable properties of `object` that `predicate`
2065 * doesn't return truthy for.
2066 *
2067 * @category Object
2068 * @param object The source object.
2069 * @param [predicate=_.identity] The function invoked per property.
2070 * @returns Returns the new object.
2071 * @example
2072 *
2073 * var object = { 'a': 1, 'b': '2', 'c': 3 };
2074 *
2075 * _.omitBy(object, _.isNumber);
2076 * // => { 'b': '2' }
2077 */
2078 omitBy<T>(object: Dictionary<T> | null | undefined, predicate?: ValueKeyIteratee<T>): Dictionary<T>;
2079 /**
2080 * @see _.omitBy
2081 */
2082 omitBy<T>(object: NumericDictionary<T> | null | undefined, predicate?: ValueKeyIteratee<T>): NumericDictionary<T>;
2083 /**
2084 * @see _.omitBy
2085 */
2086 omitBy<T extends object>(object: T | null | undefined, predicate: ValueKeyIteratee<T[keyof T]>): PartialObject<T>;
2087 }
2088 interface Collection<T> {
2089 /**
2090 * @see _.omitBy
2091 */
2092 omitBy(predicate?: ValueKeyIteratee<T>): Object<Dictionary<T>>;
2093 }
2094 interface Object<T> {
2095 /**
2096 * @see _.omitBy
2097 */
2098 omitBy(predicate: ValueKeyIteratee<T[keyof T]>): Object<PartialObject<T>>;
2099 }
2100 interface CollectionChain<T> {
2101 /**
2102 * @see _.omitBy
2103 */
2104 omitBy(predicate?: ValueKeyIteratee<T>): ObjectChain<Dictionary<T>>;
2105 }
2106 interface ObjectChain<T> {
2107 /**
2108 * @see _.omitBy
2109 */
2110 omitBy(predicate: ValueKeyIteratee<T[keyof T]>): ObjectChain<PartialObject<T>>;
2111 }
2112 interface LoDashStatic {
2113 /**
2114 * Creates an object composed of the picked `object` properties.
2115 *
2116 * @category Object
2117 * @param object The source object.
2118 * @param [props] The property names to pick, specified
2119 * individually or in arrays.
2120 * @returns Returns the new object.
2121 * @example
2122 *
2123 * var object = { 'a': 1, 'b': '2', 'c': 3 };
2124 *
2125 * _.pick(object, ['a', 'c']);
2126 * // => { 'a': 1, 'c': 3 }
2127 */
2128 pick<T extends object, U extends keyof T>(object: T, ...props: Array<Many<U>>): Pick<T, U>;
2129 /**
2130 * @see _.pick
2131 */
2132 pick<T>(object: T | null | undefined, ...props: Array<Many<PropertyPath>>): PartialObject<T>;
2133 }
2134 interface Object<T> {
2135 /**
2136 * @see _.pick
2137 */
2138 pick<U extends keyof T>(...props: Array<Many<U>>): Object<Pick<T, U>>;
2139 /**
2140 * @see _.pick
2141 */
2142 pick(...props: Array<Many<PropertyPath>>): Object<PartialObject<T>>;
2143 }
2144 interface ObjectChain<T> {
2145 /**
2146 * @see _.pick
2147 */
2148 pick<U extends keyof T>(...props: Array<Many<U>>): ObjectChain<Pick<T, U>>;
2149 /**
2150 * @see _.pick
2151 */
2152 pick(...props: Array<Many<PropertyPath>>): ObjectChain<PartialObject<T>>;
2153 }
2154 interface LoDashStatic {
2155 /**
2156 * Creates an object composed of the `object` properties `predicate` returns
2157 * truthy for. The predicate is invoked with two arguments: (value, key).
2158 *
2159 * @category Object
2160 * @param object The source object.
2161 * @param [predicate=_.identity] The function invoked per property.
2162 * @returns Returns the new object.
2163 * @example
2164 *
2165 * var object = { 'a': 1, 'b': '2', 'c': 3 };
2166 *
2167 * _.pickBy(object, _.isNumber);
2168 * // => { 'a': 1, 'c': 3 }
2169 */
2170 pickBy<T, S extends T>(object: Dictionary<T> | null | undefined, predicate: ValueKeyIterateeTypeGuard<T, S>): Dictionary<S>;
2171 /**
2172 * @see _.pickBy
2173 */
2174 pickBy<T, S extends T>(object: NumericDictionary<T> | null | undefined, predicate: ValueKeyIterateeTypeGuard<T, S>): NumericDictionary<S>;
2175 /**
2176 * @see _.pickBy
2177 */
2178 pickBy<T>(object: Dictionary<T> | null | undefined, predicate?: ValueKeyIteratee<T>): Dictionary<T>;
2179 /**
2180 * @see _.pickBy
2181 */
2182 pickBy<T>(object: NumericDictionary<T> | null | undefined, predicate?: ValueKeyIteratee<T>): NumericDictionary<T>;
2183 /**
2184 * @see _.pickBy
2185 */
2186 pickBy<T extends object>(object: T | null | undefined, predicate?: ValueKeyIteratee<T[keyof T]>): PartialObject<T>;
2187 }
2188 interface Collection<T> {
2189 /**
2190 * @see _.pickBy
2191 */
2192 pickBy<S extends T>(predicate: ValueKeyIterateeTypeGuard<T, S>): Object<Dictionary<S>>;
2193 /**
2194 * @see _.pickBy
2195 */
2196 pickBy(predicate?: ValueKeyIteratee<T>): Object<Dictionary<T>>;
2197 }
2198 interface Object<T> {
2199 /**
2200 * @see _.pickBy
2201 */
2202 pickBy<S extends T[keyof T]>(predicate: ValueKeyIterateeTypeGuard<T[keyof T], S>): Object<NumericDictionary<unknown> extends T ? NumericDictionary<S> : Dictionary<S>>;
2203 /**
2204 * @see _.pickBy
2205 */
2206 pickBy(predicate?: ValueKeyIteratee<T[keyof T]>): Object<T extends Dictionary<unknown> ? Dictionary<T[keyof T]> : T extends NumericDictionary<unknown> ? NumericDictionary<T[keyof T]> : PartialObject<T>>;
2207 }
2208 interface CollectionChain<T> {
2209 /**
2210 * @see _.pickBy
2211 */
2212 pickBy<S extends T>(predicate: ValueKeyIterateeTypeGuard<T, S>): ObjectChain<Dictionary<S>>;
2213 /**
2214 * @see _.pickBy
2215 */
2216 pickBy(predicate?: ValueKeyIteratee<T>): ObjectChain<Dictionary<T>>;
2217 }
2218 interface ObjectChain<T> {
2219 /**
2220 * @see _.pickBy
2221 */
2222 pickBy<S extends T[keyof T]>(predicate: ValueKeyIterateeTypeGuard<T[keyof T], S>): ObjectChain<NumericDictionary<unknown> extends T ? NumericDictionary<S> : Dictionary<S>>;
2223 /**
2224 * @see _.pickBy
2225 */
2226 pickBy(predicate?: ValueKeyIteratee<T[keyof T]>): ObjectChain<T extends Dictionary<unknown> ? Dictionary<T[keyof T]> : T extends NumericDictionary<unknown> ? NumericDictionary<T[keyof T]> : PartialObject<T>>;
2227 }
2228 interface LoDashStatic {
2229 /**
2230 * This method is like _.get except that if the resolved value is a function it’s invoked with the this binding
2231 * of its parent object and its result is returned.
2232 *
2233 * @param object The object to query.
2234 * @param path The path of the property to resolve.
2235 * @param defaultValue The value returned if the resolved value is undefined.
2236 * @return Returns the resolved value.
2237 */
2238 result<TResult>(object: any, path: PropertyPath, defaultValue?: TResult | ((...args: any[]) => TResult)): TResult;
2239 }
2240 interface LoDashImplicitWrapper<TValue> {
2241 /**
2242 * @see _.result
2243 */
2244 result<TResult>(path: PropertyPath, defaultValue?: TResult | ((...args: any[]) => TResult)): TResult;
2245 }
2246 interface LoDashExplicitWrapper<TValue> {
2247 /**
2248 * @see _.result
2249 */
2250 result<TResult>(path: PropertyPath, defaultValue?: TResult | ((...args: any[]) => TResult)): ExpChain<TResult>;
2251 }
2252 interface LoDashStatic {
2253 /**
2254 * Sets the value at path of object. If a portion of path doesnt exist its created. Arrays are created for
2255 * missing index properties while objects are created for all other missing properties. Use _.setWith to
2256 * customize path creation.
2257 *
2258 * @param object The object to modify.
2259 * @param path The path of the property to set.
2260 * @param value The value to set.
2261 * @return Returns object.
2262 */
2263 set<T extends object>(object: T, path: PropertyPath, value: any): T;
2264 /**
2265 * @see _.set
2266 */
2267 set<TResult>(object: object, path: PropertyPath, value: any): TResult;
2268 }
2269 interface LoDashImplicitWrapper<TValue> {
2270 /**
2271 * @see _.set
2272 */
2273 set(path: PropertyPath, value: any): this;
2274 /**
2275 * @see _.set
2276 */
2277 set<TResult>(path: PropertyPath, value: any): ImpChain<TResult>;
2278 }
2279 interface LoDashExplicitWrapper<TValue> {
2280 /**
2281 * @see _.set
2282 */
2283 set(path: PropertyPath, value: any): this;
2284 /**
2285 * @see _.set
2286 */
2287 set<TResult>(path: PropertyPath, value: any): ExpChain<TResult>;
2288 }
2289 type SetWithCustomizer<T> = (nsValue: any, key: string, nsObject: T) => any;
2290 interface LoDashStatic {
2291 /**
2292 * This method is like _.set except that it accepts customizer which is invoked to produce the objects of
2293 * path. If customizer returns undefined path creation is handled by the method instead. The customizer is
2294 * invoked with three arguments: (nsValue, key, nsObject).
2295 *
2296 * @param object The object to modify.
2297 * @param path The path of the property to set.
2298 * @param value The value to set.
2299 * @param customizer The function to customize assigned values.
2300 * @return Returns object.
2301 */
2302 setWith<T extends object>(object: T, path: PropertyPath, value: any, customizer?: SetWithCustomizer<T>): T;
2303 /**
2304 * @see _.setWith
2305 */
2306 setWith<T extends object, TResult>(object: T, path: PropertyPath, value: any, customizer?: SetWithCustomizer<T>): TResult;
2307 }
2308 interface LoDashImplicitWrapper<TValue> {
2309 /**
2310 * @see _.setWith
2311 */
2312 setWith(path: PropertyPath, value: any, customizer?: SetWithCustomizer<TValue>): this;
2313 /**
2314 * @see _.setWith
2315 */
2316 setWith<TResult>(path: PropertyPath, value: any, customizer?: SetWithCustomizer<TValue>): ImpChain<TResult>;
2317 }
2318 interface LoDashExplicitWrapper<TValue> {
2319 /**
2320 * @see _.setWith
2321 */
2322 setWith(path: PropertyPath, value: any, customizer?: SetWithCustomizer<TValue>): this;
2323 /**
2324 * @see _.setWith
2325 */
2326 setWith<TResult>(path: PropertyPath, value: any, customizer?: SetWithCustomizer<TValue>): ExpChain<TResult>;
2327 }
2328 interface LoDashStatic {
2329 /**
2330 * Creates an array of own enumerable key-value pairs for object.
2331 *
2332 * @param object The object to query.
2333 * @return Returns the new array of key-value pairs.
2334 */
2335 toPairs<T>(object?: Dictionary<T> | NumericDictionary<T>): Array<[string, T]>;
2336 /**
2337 * @see _.toPairs
2338 */
2339 toPairs(object?: object): Array<[string, any]>;
2340 }
2341 interface LoDashImplicitWrapper<TValue> {
2342 /**
2343 * @see _.toPairs
2344 */
2345 toPairs(): Collection<[string, TValue extends Dictionary<infer U> ? U : TValue extends NumericDictionary<infer V> ? V : any]>;
2346 }
2347 interface LoDashExplicitWrapper<TValue> {
2348 /**
2349 * @see _.toPairs
2350 */
2351 toPairs(): CollectionChain<[string, TValue extends Dictionary<infer U> ? U : TValue extends NumericDictionary<infer V> ? V : any]>;
2352 }
2353 interface LoDashStatic {
2354 /**
2355 * Creates an array of own and inherited enumerable key-value pairs for object.
2356 *
2357 * @param object The object to query.
2358 * @return Returns the new array of key-value pairs.
2359 */
2360 toPairsIn<T>(object?: Dictionary<T> | NumericDictionary<T>): Array<[string, T]>;
2361 /**
2362 * @see _.toPairsIn
2363 */
2364 toPairsIn(object?: object): Array<[string, any]>;
2365 }
2366 interface LoDashImplicitWrapper<TValue> {
2367 /**
2368 * @see _.toPairsIn
2369 */
2370 toPairsIn(): Collection<[string, TValue extends Dictionary<infer U> ? U : TValue extends NumericDictionary<infer V> ? V : any]>;
2371 }
2372 interface LoDashExplicitWrapper<TValue> {
2373 /**
2374 * @see _.toPairsIn
2375 */
2376 toPairsIn(): CollectionChain<[string, TValue extends Dictionary<infer U> ? U : TValue extends NumericDictionary<infer V> ? V : any]>;
2377 }
2378 interface LoDashStatic {
2379 /**
2380 * An alternative to _.reduce; this method transforms object to a new accumulator object which is the result of
2381 * running each of its own enumerable properties through iteratee, with each invocation potentially mutating
2382 * the accumulator object. The iteratee is invoked with four arguments: (accumulator,
2383 * value, key, object). Iteratee functions may exit iteration early by explicitly returning false.
2384 *
2385 * @param object The object to iterate over.
2386 * @param iteratee The function invoked per iteration.
2387 * @param accumulator The custom accumulator value.
2388 * @return Returns the accumulated value.
2389 */
2390 transform<T, TResult>(object: readonly T[], iteratee: MemoVoidArrayIterator<T, TResult>, accumulator?: TResult): TResult;
2391 /**
2392 * @see _.transform
2393 */
2394 transform<T, TResult>(object: Dictionary<T>, iteratee: MemoVoidDictionaryIterator<T, string, TResult>, accumulator?: TResult): TResult;
2395 /**
2396 * @see _.transform
2397 */
2398 transform<T extends object, TResult>(object: T, iteratee: MemoVoidDictionaryIterator<T[keyof T], keyof T, TResult>, accumulator?: TResult): TResult;
2399 /**
2400 * @see _.transform
2401 */
2402 transform(object: any[]): any[];
2403 /**
2404 * @see _.transform
2405 */
2406 transform(object: object): Dictionary<any>;
2407 }
2408 interface Collection<T> {
2409 /**
2410 * @see _.transform
2411 */
2412 transform<TResult>(iteratee: MemoVoidArrayIterator<T, TResult>, accumulator?: TResult): ImpChain<TResult>;
2413 /**
2414 * @see _.transform
2415 */
2416 transform(): Collection<any>;
2417 }
2418 interface Object<T> {
2419 /**
2420 * @see _.transform
2421 */
2422 transform<TResult>(iteratee: MemoVoidDictionaryIterator<T[keyof T], string, TResult>, accumulator?: TResult): ImpChain<TResult>;
2423 /**
2424 * @see _.transform
2425 */
2426 transform<TResult>(iteratee: MemoVoidDictionaryIterator<T[keyof T], keyof T, TResult>, accumulator?: TResult): ImpChain<TResult>;
2427 /**
2428 * @see _.transform
2429 */
2430 transform(): ImpChain<T extends Dictionary<unknown> ? Dictionary<any> : T>;
2431 }
2432 interface CollectionChain<T> {
2433 /**
2434 * @see _.transform
2435 */
2436 transform<TResult>(iteratee: MemoVoidArrayIterator<T, TResult>, accumulator?: TResult): ExpChain<TResult>;
2437 /**
2438 * @see _.transform
2439 */
2440 transform(): CollectionChain<any>;
2441 }
2442 interface ObjectChain<T> {
2443 /**
2444 * @see _.transform
2445 */
2446 transform<TResult>(iteratee: MemoVoidDictionaryIterator<T[keyof T], string, TResult>, accumulator?: TResult): ExpChain<TResult>;
2447 /**
2448 * @see _.transform
2449 */
2450 transform<TResult>(iteratee: MemoVoidDictionaryIterator<T[keyof T], keyof T, TResult>, accumulator?: TResult): ExpChain<TResult>;
2451 /**
2452 * @see _.transform
2453 */
2454 transform(): ExpChain<T extends Dictionary<unknown> ? Dictionary<any> : T>;
2455 }
2456 interface LoDashStatic {
2457 /**
2458 * Removes the property at path of object.
2459 *
2460 * Note: This method mutates object.
2461 *
2462 * @param object The object to modify.
2463 * @param path The path of the property to unset.
2464 * @return Returns true if the property is deleted, else false.
2465 */
2466 unset(object: any, path: PropertyPath): boolean;
2467 }
2468 interface LoDashImplicitWrapper<TValue> {
2469 /**
2470 * @see _.unset
2471 */
2472 unset(path: PropertyPath): Primitive<boolean>;
2473 }
2474 interface LoDashExplicitWrapper<TValue> {
2475 /**
2476 * @see _.unset
2477 */
2478 unset(path: PropertyPath): PrimitiveChain<boolean>;
2479 }
2480 interface LoDashStatic {
2481 /**
2482 * This method is like _.set except that accepts updater to produce the value to set. Use _.updateWith to
2483 * customize path creation. The updater is invoked with one argument: (value).
2484 *
2485 * @param object The object to modify.
2486 * @param path The path of the property to set.
2487 * @param updater The function to produce the updated value.
2488 * @return Returns object.
2489 */
2490 update(object: object, path: PropertyPath, updater: (value: any) => any): any;
2491 }
2492 interface LoDashImplicitWrapper<TValue> {
2493 /**
2494 * @see _.update
2495 */
2496 update(path: PropertyPath, updater: (value: any) => any): Object<any>;
2497 }
2498 interface LoDashExplicitWrapper<TValue> {
2499 /**
2500 * @see _.update
2501 */
2502 update(path: PropertyPath, updater: (value: any) => any): ObjectChain<any>;
2503 }
2504 interface LoDashStatic {
2505 /**
2506 * This method is like `_.update` except that it accepts `customizer` which is
2507 * invoked to produce the objects of `path`. If `customizer` returns `undefined`
2508 * path creation is handled by the method instead. The `customizer` is invoked
2509 * with three arguments: (nsValue, key, nsObject).
2510 *
2511 * **Note:** This method mutates `object`.
2512 *
2513 * @since 4.6.0
2514 * @category Object
2515 * @param object The object to modify.
2516 * @param path The path of the property to set.
2517 * @param updater The function to produce the updated value.
2518 * @param [customizer] The function to customize assigned values.
2519 * @returns Returns `object`.
2520 * @example
2521 *
2522 * var object = {};
2523 *
2524 * _.updateWith(object, '[0][1]', _.constant('a'), Object);
2525 * // => { '0': { '1': 'a' } }
2526 */
2527 updateWith<T extends object>(object: T, path: PropertyPath, updater: (oldValue: any) => any, customizer?: SetWithCustomizer<T>): T;
2528 /**
2529 * @see _.updateWith
2530 */
2531 updateWith<T extends object, TResult>(object: T, path: PropertyPath, updater: (oldValue: any) => any, customizer?: SetWithCustomizer<T>): TResult;
2532 }
2533 interface Object<T> {
2534 /**
2535 * @see _.updateWith
2536 */
2537 updateWith(path: PropertyPath, updater: (oldValue: any) => any, customizer?: SetWithCustomizer<T>): this;
2538 /**
2539 * @see _.updateWith
2540 */
2541 updateWith<TResult>(path: PropertyPath, updater: (oldValue: any) => any, customizer?: SetWithCustomizer<T>): Object<TResult>;
2542 }
2543 interface ObjectChain<T> {
2544 /**
2545 * @see _.updateWith
2546 */
2547 updateWith(path: PropertyPath, updater: (oldValue: any) => any, customizer?: SetWithCustomizer<T>): this;
2548 /**
2549 * @see _.updateWith
2550 */
2551 updateWith<TResult>(path: PropertyPath, updater: (oldValue: any) => any, customizer?: SetWithCustomizer<T>): ObjectChain<TResult>;
2552 }
2553 interface LoDashStatic {
2554 /**
2555 * Creates an array of the own enumerable property values of object.
2556 *
2557 * @param object The object to query.
2558 * @return Returns an array of property values.
2559 */
2560 values<T>(object: Dictionary<T> | NumericDictionary<T> | List<T> | null | undefined): T[];
2561 /**
2562 * @see _.values
2563 */
2564 values<T extends object>(object: T | null | undefined): Array<T[keyof T]>;
2565 /**
2566 * @see _.values
2567 */
2568 values(object: any): any[];
2569 }
2570 interface String {
2571 /**
2572 * @see _.values
2573 */
2574 values(): Collection<string>;
2575 }
2576 interface Object<T> {
2577 /**
2578 * @see _.values
2579 */
2580 values(): Collection<T[keyof T]>;
2581 }
2582 interface ObjectChain<T> {
2583 /**
2584 * @see _.values
2585 */
2586 values(): CollectionChain<T[keyof T]>;
2587 }
2588 interface StringChain {
2589 /**
2590 * @see _.values
2591 */
2592 values(): CollectionChain<string>;
2593 }
2594 interface StringNullableChain {
2595 /**
2596 * @see _.values
2597 */
2598 values(): CollectionChain<string>;
2599 }
2600 interface LoDashStatic {
2601 /**
2602 * Creates an array of the own and inherited enumerable property values of object.
2603 *
2604 * @param object The object to query.
2605 * @return Returns the array of property values.
2606 */
2607 valuesIn<T>(object: Dictionary<T> | NumericDictionary<T> | List<T> | null | undefined): T[];
2608 /**
2609 * @see _.valuesIn
2610 */
2611 valuesIn<T extends object>(object: T | null | undefined): Array<T[keyof T]>;
2612 }
2613 interface String {
2614 /**
2615 * @see _.valuesIn
2616 */
2617 valuesIn(): Collection<string>;
2618 }
2619 interface Object<T> {
2620 /**
2621 * @see _.valuesIn
2622 */
2623 valuesIn(): Collection<T[keyof T]>;
2624 }
2625 interface StringChain {
2626 /**
2627 * @see _.valuesIn
2628 */
2629 valuesIn(): CollectionChain<string>;
2630 }
2631 interface StringNullableChain {
2632 /**
2633 * @see _.valuesIn
2634 */
2635 valuesIn(): CollectionChain<string>;
2636 }
2637 interface ObjectChain<T> {
2638 /**
2639 * @see _.valuesIn
2640 */
2641 valuesIn(): CollectionChain<T[keyof T]>;
2642 }
2643}
2644
\No newline at end of file