@types/lodash 4.17.10 → 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 +1 -1
- lodash/common/array.d.ts +1 -0
- lodash/common/collection.d.ts +4 -0
- lodash/common/common.d.ts +2 -0
- lodash/package.json +2 -2
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:
|
|
11
|
+
* Last updated: Sat, 19 Oct 2024 06:39:37 GMT
|
|
12
12
|
* Dependencies: none
|
|
13
13
|
|
|
14
14
|
# Credits
|
lodash/common/array.d.ts
CHANGED
|
@@ -1451,6 +1451,7 @@ declare module "../index" {
|
|
|
1451
1451
|
* @param array The array to query.
|
|
1452
1452
|
* @return Returns the slice of array.
|
|
1453
1453
|
*/
|
|
1454
|
+
tail<T extends unknown[]>(array: readonly [unknown, ...T]): T;
|
|
1454
1455
|
tail<T>(array: List<T> | null | undefined): T[];
|
|
1455
1456
|
}
|
|
1456
1457
|
interface Collection<T> {
|
lodash/common/collection.d.ts
CHANGED
|
@@ -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.
|
|
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": "
|
|
53
|
+
"typesPublisherContentHash": "7fa11b6378a46458b85519e5c0b89bf4a41c0990dca97b989c45dca2e1f98bdf",
|
|
54
54
|
"typeScriptVersion": "4.8"
|
|
55
55
|
}
|