@types/lodash 4.17.16 → 4.17.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
lodash/README.md CHANGED
@@ -8,7 +8,7 @@ This package contains type definitions for lodash (https://lodash.com).
8
8
  Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/lodash.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Sat, 01 Mar 2025 03:12:01 GMT
11
+ * Last updated: Wed, 18 Jun 2025 03:50:25 GMT
12
12
  * Dependencies: none
13
13
 
14
14
  # Credits
lodash/common/array.d.ts CHANGED
@@ -342,7 +342,7 @@ declare module "../index" {
342
342
  /**
343
343
  * @see _.fill
344
344
  */
345
- fill<T>(array: List<any> | null | undefined, value: T): List<T>;
345
+ fill<T, AnyList extends List<any>>(array: AnyList extends readonly any[] ? never : AnyList | null | undefined, value: T): List<T>;
346
346
  /**
347
347
  * @see _.fill
348
348
  */
@@ -350,7 +350,7 @@ declare module "../index" {
350
350
  /**
351
351
  * @see _.fill
352
352
  */
353
- fill<T, U>(array: List<U> | null | undefined, value: T, start?: number, end?: number): List<T | U>;
353
+ fill<T, UList extends List<any>>(array: UList extends readonly any[] ? never : UList | null | undefined, value: T, start?: number, end?: number): List<T | UList[0]>;
354
354
  }
355
355
  interface Collection<T> {
356
356
  /**
@@ -760,15 +760,15 @@ declare module "../index" {
760
760
  * _.intersectionWith(objects, others, _.isEqual);
761
761
  * // => [{ 'x': 1, 'y': 2 }]
762
762
  */
763
- intersectionWith<T1, T2>(array: List<T1> | null | undefined, values: List<T2>, comparator: Comparator2<T1, T2>): T1[];
763
+ intersectionWith<T1, T2>(array: List<T1> | null | undefined, values: List<T2>, comparator: Comparator2<T1, T1 | T2>): T1[];
764
764
  /**
765
765
  * @see _.intersectionWith
766
766
  */
767
- intersectionWith<T1, T2, T3>(array: List<T1> | null | undefined, values1: List<T2>, values2: List<T3>, comparator: Comparator2<T1, T2 | T3>): T1[];
767
+ intersectionWith<T1, T2, T3>(array: List<T1> | null | undefined, values1: List<T2>, values2: List<T3>, comparator: Comparator2<T1, T1 | T2 | T3>): T1[];
768
768
  /**
769
769
  * @see _.intersectionWith
770
770
  */
771
- intersectionWith<T1, T2, T3, T4>(array: List<T1> | null | undefined, values1: List<T2>, values2: List<T3>, ...values: Array<List<T4> | Comparator2<T1, T2 | T3 | T4>>): T1[];
771
+ intersectionWith<T1, T2, T3, T4>(array: List<T1> | null | undefined, values1: List<T2>, values2: List<T3>, ...values: Array<List<T4> | Comparator2<T1, T1 | T2 | T3 | T4>>): T1[];
772
772
  /**
773
773
  * @see _.intersectionWith
774
774
  */
@@ -778,7 +778,7 @@ declare module "../index" {
778
778
  /**
779
779
  * @see _.intersectionWith
780
780
  */
781
- intersectionWith<T2>(values: List<T2>, comparator: Comparator2<T, T2>): Collection<T>;
781
+ intersectionWith<T2>(values: List<T2>, comparator: Comparator2<T, T | T2>): Collection<T>;
782
782
  /**
783
783
  * @see _.intersectionWith
784
784
  */
@@ -788,7 +788,7 @@ declare module "../index" {
788
788
  /**
789
789
  * @see _.intersectionWith
790
790
  */
791
- intersectionWith<T2>(values: List<T2>, comparator: Comparator2<T, T2>): CollectionChain<T>;
791
+ intersectionWith<T2>(values: List<T2>, comparator: Comparator2<T, T | T2>): CollectionChain<T>;
792
792
  /**
793
793
  * @see _.intersectionWith
794
794
  */
@@ -932,7 +932,7 @@ declare module "../index" {
932
932
  /**
933
933
  * @see _.pull
934
934
  */
935
- pull<T>(array: List<T>, ...values: T[]): List<T>;
935
+ pull<TList extends List<any>>(array: TList extends readonly any[] ? never : TList, ...values: TList[0][]): TList;
936
936
  }
937
937
  interface Collection<T> {
938
938
  /**
@@ -968,7 +968,7 @@ declare module "../index" {
968
968
  /**
969
969
  * @see _.pullAll
970
970
  */
971
- pullAll<T>(array: List<T>, values?: List<T>): List<T>;
971
+ pullAll<TList extends List<any>>(array: TList extends readonly any[] ? never : TList, values?: List<TList[0]>): TList;
972
972
  }
973
973
  interface Collection<T> {
974
974
  /**
@@ -1007,7 +1007,7 @@ declare module "../index" {
1007
1007
  /**
1008
1008
  * @see _.pullAllBy
1009
1009
  */
1010
- pullAllBy<T>(array: List<T>, values?: List<T>, iteratee?: ValueIteratee<T>): List<T>;
1010
+ pullAllBy<TList extends List<any>>(array: TList extends readonly any[] ? never : TList, values?: List<TList[0]>, iteratee?: ValueIteratee<TList[0]>): TList;
1011
1011
  /**
1012
1012
  * @see _.pullAllBy
1013
1013
  */
@@ -1015,7 +1015,7 @@ declare module "../index" {
1015
1015
  /**
1016
1016
  * @see _.pullAllBy
1017
1017
  */
1018
- pullAllBy<T1, T2>(array: List<T1>, values: List<T2>, iteratee: ValueIteratee<T1 | T2>): List<T1>;
1018
+ pullAllBy<T1List extends List<any>, T2>(array: T1List extends readonly any[] ? never : T1List, values: List<T2>, iteratee: ValueIteratee<T1List[0] | T2>): T1List;
1019
1019
  }
1020
1020
  interface Collection<T> {
1021
1021
  /**
@@ -1054,7 +1054,7 @@ declare module "../index" {
1054
1054
  /**
1055
1055
  * @see _.pullAllWith
1056
1056
  */
1057
- pullAllWith<T>(array: List<T>, values?: List<T>, comparator?: Comparator<T>): List<T>;
1057
+ pullAllWith<TList extends List<any>>(array: TList extends readonly any[] ? never : TList, values?: List<TList[0]>, comparator?: Comparator<TList[0]>): TList;
1058
1058
  /**
1059
1059
  * @see _.pullAllWith
1060
1060
  */
@@ -1062,7 +1062,7 @@ declare module "../index" {
1062
1062
  /**
1063
1063
  * @see _.pullAllWith
1064
1064
  */
1065
- pullAllWith<T1, T2>(array: List<T1>, values: List<T2>, comparator: Comparator2<T1, T2>): List<T1>;
1065
+ pullAllWith<T1List extends List<any>, T2>(array: T1List extends readonly any[] ? never : T1List, values: List<T2>, comparator: Comparator2<T1List[0], T2>): T1List;
1066
1066
  }
1067
1067
  interface Collection<T> {
1068
1068
  /**
@@ -1091,7 +1091,7 @@ declare module "../index" {
1091
1091
  /**
1092
1092
  * @see _.pullAt
1093
1093
  */
1094
- pullAt<T>(array: List<T>, ...indexes: Array<Many<number>>): List<T>;
1094
+ pullAt<TList extends List<any>>(array: TList extends readonly any[] ? never : TList, ...indexes: Array<Many<number>>): TList;
1095
1095
  }
1096
1096
  interface Collection<T> {
1097
1097
  /**
@@ -1116,7 +1116,7 @@ declare module "../index" {
1116
1116
  * @param predicate The function invoked per iteration.
1117
1117
  * @return Returns the new array of removed elements.
1118
1118
  */
1119
- remove<T>(array: List<T>, predicate?: ListIteratee<T>): T[];
1119
+ remove<TList extends List<any>>(array: TList extends readonly any[] ? never : TList, predicate?: ListIteratee<TList[0]>): TList[0][];
1120
1120
  }
1121
1121
  interface Collection<T> {
1122
1122
  /**
@@ -1150,7 +1150,7 @@ declare module "../index" {
1150
1150
  * console.log(array);
1151
1151
  * // => [3, 2, 1]
1152
1152
  */
1153
- reverse<TList extends List<any>>(array: TList): TList;
1153
+ reverse<TList extends List<any>>(array: TList extends readonly any[] ? never : TList): TList;
1154
1154
  }
1155
1155
  interface LoDashStatic {
1156
1156
  /**
lodash/fp.d.ts CHANGED
@@ -1776,13 +1776,13 @@ declare namespace _ {
1776
1776
  type LodashIntersectionBy1x5<T1> = (array: lodash.List<T1> | null) => T1[];
1777
1777
  type LodashIntersectionBy1x6<T1, T2> = (iteratee: lodash.ValueIteratee<T1 | T2>) => T1[];
1778
1778
  interface LodashIntersectionWith {
1779
- <T1, T2>(comparator: lodash.Comparator2<T1, T2>): LodashIntersectionWith1x1<T1, T2>;
1779
+ <T1, T2>(comparator: lodash.Comparator2<T1, T1 | T2>): LodashIntersectionWith1x1<T1, T2>;
1780
1780
  <T1>(comparator: lodash.__, array: lodash.List<T1> | null | undefined): LodashIntersectionWith1x2<T1>;
1781
- <T1, T2>(comparator: lodash.Comparator2<T1, T2>, array: lodash.List<T1> | null | undefined): LodashIntersectionWith1x3<T1, T2>;
1781
+ <T1, T2>(comparator: lodash.Comparator2<T1, T1 | T2>, array: lodash.List<T1> | null | undefined): LodashIntersectionWith1x3<T1, T2>;
1782
1782
  <T2>(comparator: lodash.__, array: lodash.__, values: lodash.List<T2>): LodashIntersectionWith1x4<T2>;
1783
- <T1, T2>(comparator: lodash.Comparator2<T1, T2>, array: lodash.__, values: lodash.List<T2>): LodashIntersectionWith1x5<T1>;
1783
+ <T1, T2>(comparator: lodash.Comparator2<T1, T1 | T2>, array: lodash.__, values: lodash.List<T2>): LodashIntersectionWith1x5<T1>;
1784
1784
  <T1, T2>(comparator: lodash.__, array: lodash.List<T1> | null | undefined, values: lodash.List<T2>): LodashIntersectionWith1x6<T1, T2>;
1785
- <T1, T2>(comparator: lodash.Comparator2<T1, T2>, array: lodash.List<T1> | null | undefined, values: lodash.List<T2>): T1[];
1785
+ <T1, T2>(comparator: lodash.Comparator2<T1, T1 | T2>, array: lodash.List<T1> | null | undefined, values: lodash.List<T2>): T1[];
1786
1786
  }
1787
1787
  interface LodashIntersectionWith1x1<T1, T2> {
1788
1788
  (array: lodash.List<T1> | null | undefined): LodashIntersectionWith1x3<T1, T2>;
@@ -1790,18 +1790,18 @@ declare namespace _ {
1790
1790
  (array: lodash.List<T1> | null | undefined, values: lodash.List<T2>): T1[];
1791
1791
  }
1792
1792
  interface LodashIntersectionWith1x2<T1> {
1793
- <T2>(comparator: lodash.Comparator2<T1, T2>): LodashIntersectionWith1x3<T1, T2>;
1793
+ <T2>(comparator: lodash.Comparator2<T1, T1 | T2>): LodashIntersectionWith1x3<T1, T2>;
1794
1794
  <T2>(comparator: lodash.__, values: lodash.List<T2>): LodashIntersectionWith1x6<T1, T2>;
1795
- <T2>(comparator: lodash.Comparator2<T1, T2>, values: lodash.List<T2>): T1[];
1795
+ <T2>(comparator: lodash.Comparator2<T1, T1 | T2>, values: lodash.List<T2>): T1[];
1796
1796
  }
1797
1797
  type LodashIntersectionWith1x3<T1, T2> = (values: lodash.List<T2>) => T1[];
1798
1798
  interface LodashIntersectionWith1x4<T2> {
1799
- <T1>(comparator: lodash.Comparator2<T1, T2>): LodashIntersectionWith1x5<T1>;
1799
+ <T1>(comparator: lodash.Comparator2<T1, T1 | T2>): LodashIntersectionWith1x5<T1>;
1800
1800
  <T1>(comparator: lodash.__, array: lodash.List<T1> | null | undefined): LodashIntersectionWith1x6<T1, T2>;
1801
- <T1>(comparator: lodash.Comparator2<T1, T2>, array: lodash.List<T1> | null | undefined): T1[];
1801
+ <T1>(comparator: lodash.Comparator2<T1, T1 | T2>, array: lodash.List<T1> | null | undefined): T1[];
1802
1802
  }
1803
1803
  type LodashIntersectionWith1x5<T1> = (array: lodash.List<T1> | null | undefined) => T1[];
1804
- type LodashIntersectionWith1x6<T1, T2> = (comparator: lodash.Comparator2<T1, T2>) => T1[];
1804
+ type LodashIntersectionWith1x6<T1, T2> = (comparator: lodash.Comparator2<T1, T1 | T2>) => T1[];
1805
1805
  type LodashInvert = (object: object) => lodash.Dictionary<string>;
1806
1806
  interface LodashInvertBy {
1807
1807
  <T>(interatee: lodash.ValueIteratee<T>): LodashInvertBy1x1<T>;
lodash/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/lodash",
3
- "version": "4.17.16",
3
+ "version": "4.17.18",
4
4
  "description": "TypeScript definitions for lodash",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/lodash",
6
6
  "license": "MIT",
@@ -51,6 +51,6 @@
51
51
  "scripts": {},
52
52
  "dependencies": {},
53
53
  "peerDependencies": {},
54
- "typesPublisherContentHash": "ba68b098a7994af263bf6d32e3f966bdf89b8ce0bfaf403633ef59cdd3e6069b",
55
- "typeScriptVersion": "5.0"
54
+ "typesPublisherContentHash": "548aefda5f6acb31e65ef4bf879e3f716b145a3d7951e9677b056b24a836a750",
55
+ "typeScriptVersion": "5.1"
56
56
  }