@types/lodash 4.14.179 → 4.14.182

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,9 +8,9 @@ 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: Fri, 25 Feb 2022 23:01:49 GMT
11
+ * Last updated: Mon, 18 Apr 2022 23:03:04 GMT
12
12
  * Dependencies: none
13
13
  * Global values: `_`
14
14
 
15
15
  # Credits
16
- These definitions were written by [Brian Zengel](https://github.com/bczengel), [Ilya Mochalov](https://github.com/chrootsu), [Stepan Mikhaylyuk](https://github.com/stepancar), [AJ Richardson](https://github.com/aj-r), [e-cloud](https://github.com/e-cloud), [Georgii Dolzhykov](https://github.com/thorn0), [Jack Moore](https://github.com/jtmthf), [Dominique Rau](https://github.com/DomiR), and [William Chelman](https://github.com/WilliamChelman).
16
+ These definitions were written by [Brian Zengel](https://github.com/bczengel), [Ilya Mochalov](https://github.com/chrootsu), [AJ Richardson](https://github.com/aj-r), [e-cloud](https://github.com/e-cloud), [Georgii Dolzhykov](https://github.com/thorn0), [Jack Moore](https://github.com/jtmthf), [Dominique Rau](https://github.com/DomiR), and [William Chelman](https://github.com/WilliamChelman).
@@ -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 CondPair<T, R> = [(val: T) => boolean, (val: T) => R];
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<T, R>(pairs: Array<CondPair<T, R>>): (Target: T) => R;
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
- type LodashCond = <T, R>(pairs: Array<lodash.CondPair<T, R>>) => (Target: T) => R;
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>;
lodash/index.d.ts CHANGED
@@ -1,12 +1,11 @@
1
1
  // Type definitions for Lo-Dash 4.14
2
2
  // Project: https://lodash.com
3
- // Definitions by: Brian Zengel <https://github.com/bczengel>,
4
- // Ilya Mochalov <https://github.com/chrootsu>,
5
- // Stepan Mikhaylyuk <https://github.com/stepancar>,
6
- // AJ Richardson <https://github.com/aj-r>,
7
- // e-cloud <https://github.com/e-cloud>,
8
- // Georgii Dolzhykov <https://github.com/thorn0>,
9
- // Jack Moore <https://github.com/jtmthf>,
3
+ // Definitions by: Brian Zengel <https://github.com/bczengel>
4
+ // Ilya Mochalov <https://github.com/chrootsu>
5
+ // AJ Richardson <https://github.com/aj-r>
6
+ // e-cloud <https://github.com/e-cloud>
7
+ // Georgii Dolzhykov <https://github.com/thorn0>
8
+ // Jack Moore <https://github.com/jtmthf>
10
9
  // Dominique Rau <https://github.com/DomiR>
11
10
  // William Chelman <https://github.com/WilliamChelman>
12
11
  // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
lodash/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/lodash",
3
- "version": "4.14.179",
3
+ "version": "4.14.182",
4
4
  "description": "TypeScript definitions for Lo-Dash",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/lodash",
6
6
  "license": "MIT",
@@ -15,11 +15,6 @@
15
15
  "url": "https://github.com/chrootsu",
16
16
  "githubUsername": "chrootsu"
17
17
  },
18
- {
19
- "name": "Stepan Mikhaylyuk",
20
- "url": "https://github.com/stepancar",
21
- "githubUsername": "stepancar"
22
- },
23
18
  {
24
19
  "name": "AJ Richardson",
25
20
  "url": "https://github.com/aj-r",
@@ -60,6 +55,6 @@
60
55
  },
61
56
  "scripts": {},
62
57
  "dependencies": {},
63
- "typesPublisherContentHash": "277bd17a5991f502cf2c534801f3a59fe322476500d195a137df5e62a5bfc5e8",
64
- "typeScriptVersion": "3.8"
58
+ "typesPublisherContentHash": "c5a9e97a318db3afdf0c9c86858b309b9cf7165152c921502ff1bc440296a037",
59
+ "typeScriptVersion": "3.9"
65
60
  }