@types/lodash 4.14.180 → 4.14.183

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: Mon, 14 Mar 2022 19:31:43 GMT
11
+ * Last updated: Tue, 16 Aug 2022 19:02:35 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
@@ -561,6 +561,8 @@ declare module "../index" {
561
561
  isElement(): PrimitiveChain<boolean>;
562
562
  }
563
563
 
564
+ type EmptyObject<T> = { [K in keyof T]?: never };
565
+ type EmptyObjectOf<T> = EmptyObject<T> extends T ? EmptyObject<T> : never;
564
566
  interface LoDashStatic {
565
567
  /**
566
568
  * Checks if value is empty. A value is considered empty unless it’s an arguments object, array, string, or
@@ -569,6 +571,10 @@ declare module "../index" {
569
571
  * @param value The value to inspect.
570
572
  * @return Returns true if value is empty, else false.
571
573
  */
574
+ isEmpty<T extends { __trapAny: any }>(value?: T): boolean;
575
+ isEmpty(value: string): value is '';
576
+ isEmpty(value: Map<any, any> | Set<any> | List<any> | null | undefined): boolean;
577
+ isEmpty<T extends object>(value: T | null | undefined): value is EmptyObjectOf<T> | null | undefined;
572
578
  isEmpty(value?: any): boolean;
573
579
  }
574
580
  interface LoDashImplicitWrapper<TValue> {
lodash/common/string.d.ts CHANGED
@@ -777,7 +777,7 @@ declare module "../index" {
777
777
  /**
778
778
  * @see _.words
779
779
  */
780
- words(pattern?: string | RegExp): string[];
780
+ words(pattern?: string | RegExp): Collection<string>;
781
781
  }
782
782
  interface LoDashExplicitWrapper<TValue> {
783
783
  /**
lodash/fp.d.ts CHANGED
@@ -1922,7 +1922,15 @@ declare namespace _ {
1922
1922
  type LodashIsBuffer = (value: any) => boolean;
1923
1923
  type LodashIsDate = (value: any) => value is Date;
1924
1924
  type LodashIsElement = (value: any) => boolean;
1925
- type LodashIsEmpty = (value: any) => boolean;
1925
+ interface LodashIsEmpty {
1926
+ <T extends { __trapAny: any }>(value: T): boolean;
1927
+ (value: string | null | undefined): value is '' | null | undefined;
1928
+ (value: any[] | null | undefined): boolean;
1929
+ (value: ReadonlyArray<any> | null | undefined): value is Readonly<[]> | null | undefined;
1930
+ (value: Map<any, any> | Set<any> | lodash.List<any> | null | undefined): boolean;
1931
+ <T extends object>(value: T | null | undefined): value is lodash.EmptyObjectOf<T> | null | undefined;
1932
+ (value?: any): boolean;
1933
+ }
1926
1934
  interface LodashIsEqualWith {
1927
1935
  (customizer: lodash.IsEqualCustomizer): LodashIsEqualWith1x1;
1928
1936
  (customizer: lodash.__, value: any): LodashIsEqualWith1x2;
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.180",
3
+ "version": "4.14.183",
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": "866f70e18f129356be318f5ed741df1d7045aed3ba2063f3c44809f9015d1059",
64
- "typeScriptVersion": "3.9"
58
+ "typesPublisherContentHash": "4427e0d66fe39669d19442907416f51fccda415e9ae3ac9e95efa59ee6f65f7e",
59
+ "typeScriptVersion": "4.0"
65
60
  }