@types/lodash 4.17.0 → 4.17.5
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/common.d.ts +1 -0
- lodash/common/function.d.ts +10 -1
- lodash/common/object.d.ts +8 -2
- lodash/fp.d.ts +3 -3
- 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, 08 Jun 2024 07:07:49 GMT
|
|
12
12
|
* Dependencies: none
|
|
13
13
|
|
|
14
14
|
# Credits
|
lodash/common/common.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import _ = require("../index");
|
|
2
2
|
// eslint-disable-next-line @definitelytyped/strict-export-declare-modifiers
|
|
3
3
|
type GlobalPartial<T> = Partial<T>;
|
|
4
|
+
export const uniqueSymbol: unique symbol;
|
|
4
5
|
declare module "../index" {
|
|
5
6
|
type Omit<T, K extends keyof any> = Pick<T, Exclude<keyof T, K>>;
|
|
6
7
|
type PartialObject<T> = GlobalPartial<T>;
|
lodash/common/function.d.ts
CHANGED
|
@@ -655,7 +655,6 @@ declare module "../index" {
|
|
|
655
655
|
<T1, T2, T3, T4, R>(func: Function4<T1, T2, T3, T4, R>, plc1: __, plc2: __, arg3: T3): Function3<T1, T2, T4, R>;
|
|
656
656
|
<T1, T2, T3, T4, R>(func: Function4<T1, T2, T3, T4, R>, arg1: T1, plc2: __, arg3: T3): Function2<T2, T4, R>;
|
|
657
657
|
<T1, T2, T3, T4, R>(func: Function4<T1, T2, T3, T4, R>, plc1: __, arg2: T2, arg3: T3): Function2<T1, T4, R>;
|
|
658
|
-
<T1, T2, T3, T4, R>(func: Function4<T1, T2, T3, T4, R>, arg1: T1, arg2: T2, arg3: T3): Function1<T4, R>;
|
|
659
658
|
<T1, T2, T3, T4, R>(func: Function4<T1, T2, T3, T4, R>, plc1: __, plc2: __, plc3: __, arg4: T4): Function3<T1, T2, T3, R>;
|
|
660
659
|
<T1, T2, T3, T4, R>(func: Function4<T1, T2, T3, T4, R>, arg1: T1, plc2: __, plc3: __, arg4: T4): Function2<T2, T3, R>;
|
|
661
660
|
<T1, T2, T3, T4, R>(func: Function4<T1, T2, T3, T4, R>, plc1: __, arg2: T2, plc3: __, arg4: T4): Function2<T1, T3, R>;
|
|
@@ -1355,6 +1354,7 @@ declare module "../index" {
|
|
|
1355
1354
|
*/
|
|
1356
1355
|
trailing?: boolean | undefined;
|
|
1357
1356
|
}
|
|
1357
|
+
type ThrottleSettingsLeading = (ThrottleSettings & { leading: true }) | Omit<ThrottleSettings, 'leading'>
|
|
1358
1358
|
interface LoDashStatic {
|
|
1359
1359
|
/**
|
|
1360
1360
|
* Creates a throttled function that only invokes func at most once per every wait milliseconds. The throttled
|
|
@@ -1372,12 +1372,17 @@ declare module "../index" {
|
|
|
1372
1372
|
* @param options.trailing Specify invoking on the trailing edge of the timeout.
|
|
1373
1373
|
* @return Returns the new throttled function.
|
|
1374
1374
|
*/
|
|
1375
|
+
throttle<T extends (...args: any) => any>(func: T, wait?: number, options?: ThrottleSettingsLeading): DebouncedFuncLeading<T>;
|
|
1375
1376
|
throttle<T extends (...args: any) => any>(func: T, wait?: number, options?: ThrottleSettings): DebouncedFunc<T>;
|
|
1376
1377
|
}
|
|
1377
1378
|
interface Function<T extends (...args: any) => any> {
|
|
1378
1379
|
/**
|
|
1379
1380
|
* @see _.throttle
|
|
1380
1381
|
*/
|
|
1382
|
+
throttle(
|
|
1383
|
+
wait?: number,
|
|
1384
|
+
options?: ThrottleSettingsLeading
|
|
1385
|
+
): T extends (...args: any[]) => any ? Function<DebouncedFuncLeading<T>> : never;
|
|
1381
1386
|
throttle(
|
|
1382
1387
|
wait?: number,
|
|
1383
1388
|
options?: ThrottleSettings
|
|
@@ -1387,6 +1392,10 @@ declare module "../index" {
|
|
|
1387
1392
|
/**
|
|
1388
1393
|
* @see _.throttle
|
|
1389
1394
|
*/
|
|
1395
|
+
throttle(
|
|
1396
|
+
wait?: number,
|
|
1397
|
+
options?: ThrottleSettingsLeading
|
|
1398
|
+
): T extends (...args: any[]) => any ? FunctionChain<DebouncedFuncLeading<T>> : never;
|
|
1390
1399
|
throttle(
|
|
1391
1400
|
wait?: number,
|
|
1392
1401
|
options?: ThrottleSettings
|
lodash/common/object.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import _ = require("../index");
|
|
2
|
+
import { uniqueSymbol } from "./common";
|
|
2
3
|
declare module "../index" {
|
|
3
4
|
interface LoDashStatic {
|
|
4
5
|
/**
|
|
@@ -1327,6 +1328,7 @@ declare module "../index" {
|
|
|
1327
1328
|
* _.has(other, 'a');
|
|
1328
1329
|
* // => false
|
|
1329
1330
|
*/
|
|
1331
|
+
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};
|
|
1330
1332
|
has<T>(object: T, path: PropertyPath): boolean;
|
|
1331
1333
|
}
|
|
1332
1334
|
interface LoDashImplicitWrapper<TValue> {
|
|
@@ -1577,6 +1579,10 @@ declare module "../index" {
|
|
|
1577
1579
|
* @return Returns the new mapped object.
|
|
1578
1580
|
*/
|
|
1579
1581
|
mapValues<TResult>(obj: string | null | undefined, callback: StringIterator<TResult>): NumericDictionary<TResult>;
|
|
1582
|
+
/**
|
|
1583
|
+
* @see _.mapValues
|
|
1584
|
+
*/
|
|
1585
|
+
mapValues<T, TResult>(array: T[], callback: ArrayIterator<T, TResult>): NumericDictionary<TResult>;
|
|
1580
1586
|
/**
|
|
1581
1587
|
* @see _.mapValues
|
|
1582
1588
|
*/
|
|
@@ -1632,7 +1638,7 @@ declare module "../index" {
|
|
|
1632
1638
|
/**
|
|
1633
1639
|
* @see _.mapValues
|
|
1634
1640
|
*/
|
|
1635
|
-
mapValues<TResult>(callback:
|
|
1641
|
+
mapValues<TResult>(callback: ArrayIterator<T, TResult>): NumericDictionary<TResult>;
|
|
1636
1642
|
/**
|
|
1637
1643
|
* @see _.mapValues
|
|
1638
1644
|
*/
|
|
@@ -1700,7 +1706,7 @@ declare module "../index" {
|
|
|
1700
1706
|
/**
|
|
1701
1707
|
* @see _.mapValues
|
|
1702
1708
|
*/
|
|
1703
|
-
mapValues<TResult>(callback:
|
|
1709
|
+
mapValues<TResult>(callback: ArrayIterator<T, TResult>): ObjectChain<NumericDictionary<TResult>>;
|
|
1704
1710
|
/**
|
|
1705
1711
|
* @see _.mapValues
|
|
1706
1712
|
*/
|
lodash/fp.d.ts
CHANGED
|
@@ -4173,10 +4173,10 @@ declare namespace _ {
|
|
|
4173
4173
|
interface LodashThrottle {
|
|
4174
4174
|
(wait: number): LodashThrottle1x1;
|
|
4175
4175
|
<T extends (...args: any) => any>(wait: lodash.__, func: T): LodashThrottle1x2<T>;
|
|
4176
|
-
<T extends (...args: any) => any>(wait: number, func: T): lodash.
|
|
4176
|
+
<T extends (...args: any) => any>(wait: number, func: T): lodash.DebouncedFuncLeading<T>;
|
|
4177
4177
|
}
|
|
4178
|
-
type LodashThrottle1x1 = <T extends (...args: any) => any>(func: T) => lodash.
|
|
4179
|
-
type LodashThrottle1x2<T extends (...args: any) => any> = (wait: number) => lodash.
|
|
4178
|
+
type LodashThrottle1x1 = <T extends (...args: any) => any>(func: T) => lodash.DebouncedFuncLeading<T>;
|
|
4179
|
+
type LodashThrottle1x2<T extends (...args: any) => any> = (wait: number) => lodash.DebouncedFuncLeading<T>;
|
|
4180
4180
|
interface LodashThru {
|
|
4181
4181
|
<T, TResult>(interceptor: (value: T) => TResult): LodashThru1x1<T, TResult>;
|
|
4182
4182
|
<T>(interceptor: lodash.__, value: T): LodashThru1x2<T>;
|
lodash/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/lodash",
|
|
3
|
-
"version": "4.17.
|
|
3
|
+
"version": "4.17.5",
|
|
4
4
|
"description": "TypeScript definitions for lodash",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/lodash",
|
|
6
6
|
"license": "MIT",
|
|
@@ -55,6 +55,6 @@
|
|
|
55
55
|
},
|
|
56
56
|
"scripts": {},
|
|
57
57
|
"dependencies": {},
|
|
58
|
-
"typesPublisherContentHash": "
|
|
58
|
+
"typesPublisherContentHash": "74ebed2e7d6c57a170dd86cb86d1848722ce0a78369151c7ac087d43a7a6e2d5",
|
|
59
59
|
"typeScriptVersion": "4.7"
|
|
60
60
|
}
|