@types/lodash 4.14.178 → 4.14.181
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/collection.d.ts +9 -9
- lodash/common/function.d.ts +16 -0
- lodash/common/lang.d.ts +2 -1
- lodash/common/util.d.ts +2 -1
- lodash/fp.d.ts +9 -6
- lodash/package.json +3 -3
lodash/README.md
CHANGED
|
@@ -8,7 +8,7 @@ This package contains type definitions for Lo-Dash (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: Tue, 29 Mar 2022 13:31:45 GMT
|
|
12
12
|
* Dependencies: none
|
|
13
13
|
* Global values: `_`
|
|
14
14
|
|
lodash/common/collection.d.ts
CHANGED
|
@@ -946,53 +946,53 @@ declare module "../index" {
|
|
|
946
946
|
* @param iteratee The function invoked per iteration.
|
|
947
947
|
* @return Returns the composed aggregate object.
|
|
948
948
|
*/
|
|
949
|
-
groupBy<T>(collection: List<T> | null | undefined, iteratee?: ValueIteratee<T>): Dictionary<
|
|
949
|
+
groupBy<T>(collection: List<T> | null | undefined, iteratee?: ValueIteratee<T>): Dictionary<T[]>;
|
|
950
950
|
/**
|
|
951
951
|
* @see _.groupBy
|
|
952
952
|
*/
|
|
953
|
-
groupBy<T extends object>(collection: T | null | undefined, iteratee?: ValueIteratee<T[keyof T]>): Dictionary<
|
|
953
|
+
groupBy<T extends object>(collection: T | null | undefined, iteratee?: ValueIteratee<T[keyof T]>): Dictionary<Array<T[keyof T]>>;
|
|
954
954
|
}
|
|
955
955
|
interface String {
|
|
956
956
|
/**
|
|
957
957
|
* @see _.groupBy
|
|
958
958
|
*/
|
|
959
|
-
groupBy(iteratee?: ValueIteratee<string>): Object<Dictionary<
|
|
959
|
+
groupBy(iteratee?: ValueIteratee<string>): Object<Dictionary<string[]>>;
|
|
960
960
|
}
|
|
961
961
|
interface Collection<T> {
|
|
962
962
|
/**
|
|
963
963
|
* @see _.groupBy
|
|
964
964
|
*/
|
|
965
|
-
groupBy(iteratee?: ValueIteratee<T>): Object<Dictionary<
|
|
965
|
+
groupBy(iteratee?: ValueIteratee<T>): Object<Dictionary<T[]>>;
|
|
966
966
|
}
|
|
967
967
|
interface Object<T> {
|
|
968
968
|
/**
|
|
969
969
|
* @see _.groupBy
|
|
970
970
|
*/
|
|
971
|
-
groupBy(iteratee?: ValueIteratee<T[keyof T]>): Object<Dictionary<
|
|
971
|
+
groupBy(iteratee?: ValueIteratee<T[keyof T]>): Object<Dictionary<Array<T[keyof T]>>>;
|
|
972
972
|
}
|
|
973
973
|
interface StringChain {
|
|
974
974
|
/**
|
|
975
975
|
* @see _.groupBy
|
|
976
976
|
*/
|
|
977
|
-
groupBy(iteratee?: ValueIteratee<string>): ObjectChain<Dictionary<
|
|
977
|
+
groupBy(iteratee?: ValueIteratee<string>): ObjectChain<Dictionary<string[]>>;
|
|
978
978
|
}
|
|
979
979
|
interface StringNullableChain {
|
|
980
980
|
/**
|
|
981
981
|
* @see _.groupBy
|
|
982
982
|
*/
|
|
983
|
-
groupBy(iteratee?: ValueIteratee<string>): ObjectChain<Dictionary<
|
|
983
|
+
groupBy(iteratee?: ValueIteratee<string>): ObjectChain<Dictionary<string[]>>;
|
|
984
984
|
}
|
|
985
985
|
interface CollectionChain<T> {
|
|
986
986
|
/**
|
|
987
987
|
* @see _.groupBy
|
|
988
988
|
*/
|
|
989
|
-
groupBy(iteratee?: ValueIteratee<T>): ObjectChain<Dictionary<
|
|
989
|
+
groupBy(iteratee?: ValueIteratee<T>): ObjectChain<Dictionary<T[]>>;
|
|
990
990
|
}
|
|
991
991
|
interface ObjectChain<T> {
|
|
992
992
|
/**
|
|
993
993
|
* @see _.groupBy
|
|
994
994
|
*/
|
|
995
|
-
groupBy(iteratee?: ValueIteratee<T[keyof T]>): ObjectChain<Dictionary<
|
|
995
|
+
groupBy(iteratee?: ValueIteratee<T[keyof T]>): ObjectChain<Dictionary<Array<T[keyof T]>>>;
|
|
996
996
|
}
|
|
997
997
|
interface LoDashStatic {
|
|
998
998
|
/**
|
lodash/common/function.d.ts
CHANGED
|
@@ -368,6 +368,9 @@ declare module "../index" {
|
|
|
368
368
|
*/
|
|
369
369
|
trailing?: boolean | undefined;
|
|
370
370
|
}
|
|
371
|
+
interface DebounceSettingsLeading extends DebounceSettings {
|
|
372
|
+
leading: true;
|
|
373
|
+
}
|
|
371
374
|
interface DebouncedFunc<T extends (...args: any[]) => any> {
|
|
372
375
|
/**
|
|
373
376
|
* Call the original function, but applying the debounce rules.
|
|
@@ -394,6 +397,10 @@ declare module "../index" {
|
|
|
394
397
|
*/
|
|
395
398
|
flush(): ReturnType<T> | undefined;
|
|
396
399
|
}
|
|
400
|
+
interface DebouncedFuncLeading<T extends (...args: any[]) => any> extends DebouncedFunc<T> {
|
|
401
|
+
(...args: Parameters<T>): ReturnType<T>;
|
|
402
|
+
flush(): ReturnType<T>;
|
|
403
|
+
}
|
|
397
404
|
interface LoDashStatic {
|
|
398
405
|
/**
|
|
399
406
|
* Creates a debounced function that delays invoking func until after wait milliseconds have elapsed since
|
|
@@ -415,12 +422,17 @@ declare module "../index" {
|
|
|
415
422
|
* @param options.trailing Specify invoking on the trailing edge of the timeout.
|
|
416
423
|
* @return Returns the new debounced function.
|
|
417
424
|
*/
|
|
425
|
+
debounce<T extends (...args: any) => any>(func: T, wait: number | undefined, options: DebounceSettingsLeading): DebouncedFuncLeading<T>;
|
|
418
426
|
debounce<T extends (...args: any) => any>(func: T, wait?: number, options?: DebounceSettings): DebouncedFunc<T>;
|
|
419
427
|
}
|
|
420
428
|
interface Function<T extends (...args: any) => any> {
|
|
421
429
|
/**
|
|
422
430
|
* @see _.debounce
|
|
423
431
|
*/
|
|
432
|
+
debounce(
|
|
433
|
+
wait: number | undefined,
|
|
434
|
+
options: DebounceSettingsLeading
|
|
435
|
+
): T extends (...args: any[]) => any ? Function<DebouncedFuncLeading<T>> : never;
|
|
424
436
|
debounce(
|
|
425
437
|
wait?: number,
|
|
426
438
|
options?: DebounceSettings
|
|
@@ -430,6 +442,10 @@ declare module "../index" {
|
|
|
430
442
|
/**
|
|
431
443
|
* @see _.debounce
|
|
432
444
|
*/
|
|
445
|
+
debounce(
|
|
446
|
+
wait: number | undefined,
|
|
447
|
+
options: DebounceSettingsLeading
|
|
448
|
+
): T extends (...args: any[]) => any ? FunctionChain<DebouncedFuncLeading<T>> : never;
|
|
433
449
|
debounce(
|
|
434
450
|
wait?: number,
|
|
435
451
|
options?: DebounceSettings
|
lodash/common/lang.d.ts
CHANGED
|
@@ -220,7 +220,8 @@ declare module "../index" {
|
|
|
220
220
|
*/
|
|
221
221
|
conformsTo(source: ConformsPredicateObject<TValue>): PrimitiveChain<boolean>;
|
|
222
222
|
}
|
|
223
|
-
type
|
|
223
|
+
type CondPairNullary<R> = [() => boolean, () => R];
|
|
224
|
+
type CondPairUnary<T, R> = [(val: T) => boolean, (val: T) => R];
|
|
224
225
|
interface LoDashStatic {
|
|
225
226
|
/**
|
|
226
227
|
* Performs a [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
|
lodash/common/util.d.ts
CHANGED
|
@@ -79,7 +79,8 @@ declare module "../index" {
|
|
|
79
79
|
* func({ 'a': '1', 'b': '2' });
|
|
80
80
|
* // => 'no match'
|
|
81
81
|
*/
|
|
82
|
-
cond<
|
|
82
|
+
cond<R>(pairs: Array<CondPairNullary<R>>): () => R;
|
|
83
|
+
cond<T, R>(pairs: Array<CondPairUnary<T, R>>): (Target: T) => R;
|
|
83
84
|
}
|
|
84
85
|
|
|
85
86
|
type ConformsPredicateObject<T> = {
|
lodash/fp.d.ts
CHANGED
|
@@ -317,7 +317,10 @@ declare namespace _ {
|
|
|
317
317
|
}
|
|
318
318
|
type LodashConcat1x1<T> = (values: lodash.Many<T>) => T[];
|
|
319
319
|
type LodashConcat1x2<T> = (array: lodash.Many<T>) => T[];
|
|
320
|
-
|
|
320
|
+
interface LodashCond {
|
|
321
|
+
<R>(pairs: Array<lodash.CondPairNullary<R>>): () => R;
|
|
322
|
+
<T, R>(pairs: Array<lodash.CondPairUnary<T, R>>): (Target: T) => R;
|
|
323
|
+
}
|
|
321
324
|
interface LodashConformsTo {
|
|
322
325
|
<T>(source: lodash.ConformsPredicateObject<T>): LodashConformsTo1x1<T>;
|
|
323
326
|
<T>(source: lodash.__, object: T): LodashConformsTo1x2<T>;
|
|
@@ -1593,13 +1596,13 @@ declare namespace _ {
|
|
|
1593
1596
|
interface LodashGroupBy {
|
|
1594
1597
|
<T>(iteratee: lodash.ValueIteratee<T>): LodashGroupBy1x1<T>;
|
|
1595
1598
|
<T>(iteratee: lodash.__, collection: lodash.List<T> | null | undefined): LodashGroupBy1x2<T>;
|
|
1596
|
-
<T>(iteratee: lodash.ValueIteratee<T>, collection: lodash.List<T> | null | undefined): lodash.Dictionary<
|
|
1599
|
+
<T>(iteratee: lodash.ValueIteratee<T>, collection: lodash.List<T> | null | undefined): lodash.Dictionary<T[]>;
|
|
1597
1600
|
<T extends object>(iteratee: lodash.__, collection: T | null | undefined): LodashGroupBy2x2<T>;
|
|
1598
|
-
<T extends object>(iteratee: lodash.ValueIteratee<T[keyof T]>, collection: T | null | undefined): lodash.Dictionary<
|
|
1601
|
+
<T extends object>(iteratee: lodash.ValueIteratee<T[keyof T]>, collection: T | null | undefined): lodash.Dictionary<Array<T[keyof T]>>;
|
|
1599
1602
|
}
|
|
1600
|
-
type LodashGroupBy1x1<T> = (collection: lodash.List<T> | object | null | undefined) => lodash.Dictionary<
|
|
1601
|
-
type LodashGroupBy1x2<T> = (iteratee: lodash.ValueIteratee<T>) => lodash.Dictionary<
|
|
1602
|
-
type LodashGroupBy2x2<T> = (iteratee: lodash.ValueIteratee<T[keyof T]>) => lodash.Dictionary<
|
|
1603
|
+
type LodashGroupBy1x1<T> = (collection: lodash.List<T> | object | null | undefined) => lodash.Dictionary<T[]>;
|
|
1604
|
+
type LodashGroupBy1x2<T> = (iteratee: lodash.ValueIteratee<T>) => lodash.Dictionary<T[]>;
|
|
1605
|
+
type LodashGroupBy2x2<T> = (iteratee: lodash.ValueIteratee<T[keyof T]>) => lodash.Dictionary<Array<T[keyof T]>>;
|
|
1603
1606
|
interface LodashGt {
|
|
1604
1607
|
(value: any): LodashGt1x1;
|
|
1605
1608
|
(value: lodash.__, other: any): LodashGt1x2;
|
lodash/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/lodash",
|
|
3
|
-
"version": "4.14.
|
|
3
|
+
"version": "4.14.181",
|
|
4
4
|
"description": "TypeScript definitions for Lo-Dash",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/lodash",
|
|
6
6
|
"license": "MIT",
|
|
@@ -60,6 +60,6 @@
|
|
|
60
60
|
},
|
|
61
61
|
"scripts": {},
|
|
62
62
|
"dependencies": {},
|
|
63
|
-
"typesPublisherContentHash": "
|
|
64
|
-
"typeScriptVersion": "3.
|
|
63
|
+
"typesPublisherContentHash": "012e997ab7eafe91f13d511d95e41a2e7cb1d79a3f628e2f40d082d5db086c3b",
|
|
64
|
+
"typeScriptVersion": "3.9"
|
|
65
65
|
}
|