@types/lodash 4.17.2 → 4.17.4
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 -0
- lodash/common/object.d.ts +2 -1
- 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: Fri, 17 May 2024 02:16: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
|
@@ -1354,6 +1354,7 @@ declare module "../index" {
|
|
|
1354
1354
|
*/
|
|
1355
1355
|
trailing?: boolean | undefined;
|
|
1356
1356
|
}
|
|
1357
|
+
type ThrottleSettingsLeading = (ThrottleSettings & { leading: true }) | Omit<ThrottleSettings, 'leading'>
|
|
1357
1358
|
interface LoDashStatic {
|
|
1358
1359
|
/**
|
|
1359
1360
|
* Creates a throttled function that only invokes func at most once per every wait milliseconds. The throttled
|
|
@@ -1371,12 +1372,17 @@ declare module "../index" {
|
|
|
1371
1372
|
* @param options.trailing Specify invoking on the trailing edge of the timeout.
|
|
1372
1373
|
* @return Returns the new throttled function.
|
|
1373
1374
|
*/
|
|
1375
|
+
throttle<T extends (...args: any) => any>(func: T, wait?: number, options?: ThrottleSettingsLeading): DebouncedFuncLeading<T>;
|
|
1374
1376
|
throttle<T extends (...args: any) => any>(func: T, wait?: number, options?: ThrottleSettings): DebouncedFunc<T>;
|
|
1375
1377
|
}
|
|
1376
1378
|
interface Function<T extends (...args: any) => any> {
|
|
1377
1379
|
/**
|
|
1378
1380
|
* @see _.throttle
|
|
1379
1381
|
*/
|
|
1382
|
+
throttle(
|
|
1383
|
+
wait?: number,
|
|
1384
|
+
options?: ThrottleSettingsLeading
|
|
1385
|
+
): T extends (...args: any[]) => any ? Function<DebouncedFuncLeading<T>> : never;
|
|
1380
1386
|
throttle(
|
|
1381
1387
|
wait?: number,
|
|
1382
1388
|
options?: ThrottleSettings
|
|
@@ -1386,6 +1392,10 @@ declare module "../index" {
|
|
|
1386
1392
|
/**
|
|
1387
1393
|
* @see _.throttle
|
|
1388
1394
|
*/
|
|
1395
|
+
throttle(
|
|
1396
|
+
wait?: number,
|
|
1397
|
+
options?: ThrottleSettingsLeading
|
|
1398
|
+
): T extends (...args: any[]) => any ? FunctionChain<DebouncedFuncLeading<T>> : never;
|
|
1389
1399
|
throttle(
|
|
1390
1400
|
wait?: number,
|
|
1391
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,7 +1328,7 @@ declare module "../index" {
|
|
|
1327
1328
|
* _.has(other, 'a');
|
|
1328
1329
|
* // => false
|
|
1329
1330
|
*/
|
|
1330
|
-
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};
|
|
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};
|
|
1331
1332
|
has<T>(object: T, path: PropertyPath): boolean;
|
|
1332
1333
|
}
|
|
1333
1334
|
interface LoDashImplicitWrapper<TValue> {
|
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.4",
|
|
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": "29aeb85b95cd7d3be7579ea9938820eb2d06fcb68095fd735ad9abbbc5148766",
|
|
59
59
|
"typeScriptVersion": "4.7"
|
|
60
60
|
}
|