@types/lodash 4.17.1 → 4.17.3

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, 04 May 2024 08:07:33 GMT
11
+ * Last updated: Thu, 16 May 2024 15:06:54 GMT
12
12
  * Dependencies: none
13
13
 
14
14
  # Credits
@@ -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/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.DebouncedFunc<T>;
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.DebouncedFunc<T>;
4179
- type LodashThrottle1x2<T extends (...args: any) => any> = (wait: number) => lodash.DebouncedFunc<T>;
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.1",
3
+ "version": "4.17.3",
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": "bb1319797de347a8fbd3949c371a764f6e979fb21503f11dac75962f95cdd144",
58
+ "typesPublisherContentHash": "694a0e31ea10d9ad324782791549c789fdb55bc1774ae5c3d446746fb1140fca",
59
59
  "typeScriptVersion": "4.7"
60
60
  }