@types/lodash 4.17.11 → 4.17.12

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: Fri, 18 Oct 2024 11:36:08 GMT
11
+ * Last updated: Sat, 19 Oct 2024 06:39:37 GMT
12
12
  * Dependencies: none
13
13
 
14
14
  # Credits
@@ -1153,6 +1153,10 @@ declare module "../index" {
1153
1153
  * @param iteratee The function invoked per iteration.
1154
1154
  * @return Returns the new mapped array.
1155
1155
  */
1156
+ map<T extends readonly unknown[], TResult>(collection: T, iteratee: TupleIterator<T, TResult>): { [K in keyof T]: TResult };
1157
+ /**
1158
+ * @see _.map
1159
+ */
1156
1160
  map<T, TResult>(collection: T[] | null | undefined, iteratee: ArrayIterator<T, TResult>): TResult[];
1157
1161
  /**
1158
1162
  * @see _.map
lodash/common/common.d.ts CHANGED
@@ -213,6 +213,7 @@ declare module "../index" {
213
213
  type NotVoid = unknown;
214
214
  type IterateeShorthand<T> = PropertyName | [PropertyName, any] | PartialShallow<T>;
215
215
  type ArrayIterator<T, TResult> = (value: T, index: number, collection: T[]) => TResult;
216
+ type TupleIterator<T extends readonly unknown[], TResult> = (value: T[number], index: StringToNumber<keyof T>, collection: T) => TResult;
216
217
  type ListIterator<T, TResult> = (value: T, index: number, collection: List<T>) => TResult;
217
218
  type ListIteratee<T> = ListIterator<T, NotVoid> | IterateeShorthand<T>;
218
219
  type ListIterateeCustom<T, TResult> = ListIterator<T, TResult> | IterateeShorthand<T>;
@@ -258,6 +259,7 @@ declare module "../index" {
258
259
  type PartialShallow<T> = {
259
260
  [P in keyof T]?: T[P] extends object ? object : T[P]
260
261
  };
262
+ type StringToNumber<T> = T extends `${infer N extends number}` ? N : never;
261
263
  // For backwards compatibility
262
264
  type LoDashImplicitArrayWrapper<T> = LoDashImplicitWrapper<T[]>;
263
265
  type LoDashImplicitNillableArrayWrapper<T> = LoDashImplicitWrapper<T[] | null | undefined>;
lodash/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/lodash",
3
- "version": "4.17.11",
3
+ "version": "4.17.12",
4
4
  "description": "TypeScript definitions for lodash",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/lodash",
6
6
  "license": "MIT",
@@ -50,6 +50,6 @@
50
50
  },
51
51
  "scripts": {},
52
52
  "dependencies": {},
53
- "typesPublisherContentHash": "544c54514d0d3054b50e80744fdc2a3ef9c035b3c590d33a2085c4bea548d7f5",
53
+ "typesPublisherContentHash": "7fa11b6378a46458b85519e5c0b89bf4a41c0990dca97b989c45dca2e1f98bdf",
54
54
  "typeScriptVersion": "4.8"
55
55
  }