@types/lodash 4.14.160 → 4.14.164
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 +0 -4
- lodash/common/function.d.ts +45 -7
- lodash/common/lang.d.ts +0 -1
- lodash/common/math.d.ts +1 -1
- lodash/fp.d.ts +13 -13
- lodash/package.json +3 -3
lodash/README.md
CHANGED
|
@@ -8,7 +8,7 @@ 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:
|
|
11
|
+
* Last updated: Fri, 30 Oct 2020 09:36:45 GMT
|
|
12
12
|
* Dependencies: none
|
|
13
13
|
* Global values: `_`
|
|
14
14
|
|
lodash/common/common.d.ts
CHANGED
|
@@ -254,10 +254,6 @@ declare module "../index" {
|
|
|
254
254
|
type AnyKindOfDictionary =
|
|
255
255
|
| Dictionary<unknown>
|
|
256
256
|
| NumericDictionary<unknown>;
|
|
257
|
-
interface Cancelable {
|
|
258
|
-
cancel(): void;
|
|
259
|
-
flush(): void;
|
|
260
|
-
}
|
|
261
257
|
type PartialShallow<T> = {
|
|
262
258
|
[P in keyof T]?: T[P] extends object ? object : T[P]
|
|
263
259
|
};
|
lodash/common/function.d.ts
CHANGED
|
@@ -368,6 +368,32 @@ declare module "../index" {
|
|
|
368
368
|
*/
|
|
369
369
|
trailing?: boolean;
|
|
370
370
|
}
|
|
371
|
+
interface DebouncedFunc<T extends (...args: any[]) => any> {
|
|
372
|
+
/**
|
|
373
|
+
* Call the original function, but applying the debounce rules.
|
|
374
|
+
*
|
|
375
|
+
* If the debounced function can be run immediately, this calls it and returns its return
|
|
376
|
+
* value.
|
|
377
|
+
*
|
|
378
|
+
* Otherwise, it returns the return value of the last invokation, or undefined if the debounced
|
|
379
|
+
* function was not invoked yet.
|
|
380
|
+
*/
|
|
381
|
+
(...args: Parameters<T>): ReturnType<T> | undefined;
|
|
382
|
+
|
|
383
|
+
/**
|
|
384
|
+
* Throw away any pending invokation of the debounced function.
|
|
385
|
+
*/
|
|
386
|
+
cancel(): void;
|
|
387
|
+
|
|
388
|
+
/**
|
|
389
|
+
* If there is a pending invokation of the debounced function, invoke it immediately and return
|
|
390
|
+
* its return value.
|
|
391
|
+
*
|
|
392
|
+
* Otherwise, return the value from the last invokation, or undefined if the debounced function
|
|
393
|
+
* was never invoked.
|
|
394
|
+
*/
|
|
395
|
+
flush(): ReturnType<T> | undefined;
|
|
396
|
+
}
|
|
371
397
|
interface LoDashStatic {
|
|
372
398
|
/**
|
|
373
399
|
* Creates a debounced function that delays invoking func until after wait milliseconds have elapsed since
|
|
@@ -389,19 +415,25 @@ declare module "../index" {
|
|
|
389
415
|
* @param options.trailing Specify invoking on the trailing edge of the timeout.
|
|
390
416
|
* @return Returns the new debounced function.
|
|
391
417
|
*/
|
|
392
|
-
debounce<T extends (...args: any) => any>(func: T, wait?: number, options?: DebounceSettings): T
|
|
418
|
+
debounce<T extends (...args: any) => any>(func: T, wait?: number, options?: DebounceSettings): DebouncedFunc<T>;
|
|
393
419
|
}
|
|
394
420
|
interface Function<T extends (...args: any) => any> {
|
|
395
421
|
/**
|
|
396
422
|
* @see _.debounce
|
|
397
423
|
*/
|
|
398
|
-
debounce(
|
|
424
|
+
debounce(
|
|
425
|
+
wait?: number,
|
|
426
|
+
options?: DebounceSettings
|
|
427
|
+
): T extends (...args: any[]) => any ? Function<DebouncedFunc<T>> : never;
|
|
399
428
|
}
|
|
400
429
|
interface FunctionChain<T extends (...args: any) => any> {
|
|
401
430
|
/**
|
|
402
431
|
* @see _.debounce
|
|
403
432
|
*/
|
|
404
|
-
debounce(
|
|
433
|
+
debounce(
|
|
434
|
+
wait?: number,
|
|
435
|
+
options?: DebounceSettings
|
|
436
|
+
): T extends (...args: any[]) => any ? FunctionChain<DebouncedFunc<T>> : never;
|
|
405
437
|
}
|
|
406
438
|
interface LoDashStatic {
|
|
407
439
|
/**
|
|
@@ -497,7 +529,7 @@ declare module "../index" {
|
|
|
497
529
|
* @return Returns the new memoizing function.
|
|
498
530
|
*/
|
|
499
531
|
memoize: {
|
|
500
|
-
<T extends (...args: any) => any>(func: T, resolver?: (...args:
|
|
532
|
+
<T extends (...args: any) => any>(func: T, resolver?: (...args: Parameters<T>) => any): T & MemoizedFunction;
|
|
501
533
|
Cache: MapCacheConstructor;
|
|
502
534
|
};
|
|
503
535
|
}
|
|
@@ -1324,19 +1356,25 @@ declare module "../index" {
|
|
|
1324
1356
|
* @param options.trailing Specify invoking on the trailing edge of the timeout.
|
|
1325
1357
|
* @return Returns the new throttled function.
|
|
1326
1358
|
*/
|
|
1327
|
-
throttle<T extends (...args: any) => any>(func: T, wait?: number, options?: ThrottleSettings): T
|
|
1359
|
+
throttle<T extends (...args: any) => any>(func: T, wait?: number, options?: ThrottleSettings): DebouncedFunc<T>;
|
|
1328
1360
|
}
|
|
1329
1361
|
interface Function<T extends (...args: any) => any> {
|
|
1330
1362
|
/**
|
|
1331
1363
|
* @see _.throttle
|
|
1332
1364
|
*/
|
|
1333
|
-
throttle(
|
|
1365
|
+
throttle(
|
|
1366
|
+
wait?: number,
|
|
1367
|
+
options?: ThrottleSettings
|
|
1368
|
+
): T extends (...args: any[]) => any ? Function<DebouncedFunc<T>> : never;
|
|
1334
1369
|
}
|
|
1335
1370
|
interface FunctionChain<T extends (...args: any) => any> {
|
|
1336
1371
|
/**
|
|
1337
1372
|
* @see _.throttle
|
|
1338
1373
|
*/
|
|
1339
|
-
throttle(
|
|
1374
|
+
throttle(
|
|
1375
|
+
wait?: number,
|
|
1376
|
+
options?: ThrottleSettings
|
|
1377
|
+
): T extends (...args: any[]) => any ? FunctionChain<DebouncedFunc<T>> : never;
|
|
1340
1378
|
}
|
|
1341
1379
|
interface LoDashStatic {
|
|
1342
1380
|
/**
|
lodash/common/lang.d.ts
CHANGED
|
@@ -450,7 +450,6 @@ declare module "../index" {
|
|
|
450
450
|
* // => false
|
|
451
451
|
*/
|
|
452
452
|
isArrayLikeObject<T extends { __lodashAnyHack: any }>(value: T): boolean;
|
|
453
|
-
// tslint:disable-next-line:ban-types (type guard doesn't seem to work correctly without the Function type)
|
|
454
453
|
/**
|
|
455
454
|
* @see _.isArrayLikeObject
|
|
456
455
|
*/
|
lodash/common/math.d.ts
CHANGED
|
@@ -181,7 +181,7 @@ declare module "../index" {
|
|
|
181
181
|
|
|
182
182
|
interface LoDashStatic {
|
|
183
183
|
/**
|
|
184
|
-
* Computes the mean of the provided
|
|
184
|
+
* Computes the mean of the provided properties of the objects in the `array`
|
|
185
185
|
*
|
|
186
186
|
* @category Math
|
|
187
187
|
* @param array The array to iterate over.
|
lodash/fp.d.ts
CHANGED
|
@@ -20,7 +20,7 @@ declare namespace _ {
|
|
|
20
20
|
(func: lodash.__, n: number): LodashAfter1x2;
|
|
21
21
|
<TFunc extends (...args: any[]) => any>(func: TFunc, n: number): TFunc;
|
|
22
22
|
}
|
|
23
|
-
type LodashAfter1x1<TFunc> = (n: number) => TFunc;
|
|
23
|
+
type LodashAfter1x1<TFunc extends (...args: any[]) => any> = (n: number) => TFunc;
|
|
24
24
|
type LodashAfter1x2 = <TFunc extends (...args: any[]) => any>(func: TFunc) => TFunc;
|
|
25
25
|
interface LodashEvery {
|
|
26
26
|
<T>(predicate: lodash.ValueIterateeCustom<T, boolean>): LodashEvery1x1<T>;
|
|
@@ -214,7 +214,7 @@ declare namespace _ {
|
|
|
214
214
|
(func: lodash.__, n: number): LodashBefore1x2;
|
|
215
215
|
<TFunc extends (...args: any[]) => any>(func: TFunc, n: number): TFunc;
|
|
216
216
|
}
|
|
217
|
-
type LodashBefore1x1<TFunc> = (n: number) => TFunc;
|
|
217
|
+
type LodashBefore1x1<TFunc extends (...args: any[]) => any> = (n: number) => TFunc;
|
|
218
218
|
type LodashBefore1x2 = <TFunc extends (...args: any[]) => any>(func: TFunc) => TFunc;
|
|
219
219
|
interface LodashBind {
|
|
220
220
|
(func: (...args: any[]) => any): LodashBind1x1;
|
|
@@ -424,10 +424,10 @@ declare namespace _ {
|
|
|
424
424
|
interface LodashDebounce {
|
|
425
425
|
(wait: number): LodashDebounce1x1;
|
|
426
426
|
<T extends (...args: any) => any>(wait: lodash.__, func: T): LodashDebounce1x2<T>;
|
|
427
|
-
<T extends (...args: any) => any>(wait: number, func: T):
|
|
427
|
+
<T extends (...args: any) => any>(wait: number, func: T): lodash.DebouncedFunc<T>;
|
|
428
428
|
}
|
|
429
|
-
type LodashDebounce1x1 = <T extends (...args: any) => any>(func: T) =>
|
|
430
|
-
type LodashDebounce1x2<T> = (wait: number) =>
|
|
429
|
+
type LodashDebounce1x1 = <T extends (...args: any) => any>(func: T) => lodash.DebouncedFunc<T>;
|
|
430
|
+
type LodashDebounce1x2<T extends (...args: any) => any> = (wait: number) => lodash.DebouncedFunc<T>;
|
|
431
431
|
type LodashDeburr = (string: string) => string;
|
|
432
432
|
interface LodashDefaults {
|
|
433
433
|
<TSource>(source: TSource): LodashDefaults1x1<TSource>;
|
|
@@ -1739,12 +1739,12 @@ declare namespace _ {
|
|
|
1739
1739
|
type LodashInRange1x5 = (end: number) => boolean;
|
|
1740
1740
|
type LodashInRange1x6 = (start: number) => boolean;
|
|
1741
1741
|
interface LodashIntersection {
|
|
1742
|
-
<T>(arrays2: lodash.List<T>): LodashIntersection1x1<T>;
|
|
1743
|
-
<T>(arrays2: lodash.__, arrays: lodash.List<T>): LodashIntersection1x2<T>;
|
|
1744
|
-
<T>(arrays2: lodash.List<T
|
|
1742
|
+
<T>(arrays2: lodash.List<T> | null | undefined): LodashIntersection1x1<T>;
|
|
1743
|
+
<T>(arrays2: lodash.__, arrays: lodash.List<T> | null | undefined): LodashIntersection1x2<T>;
|
|
1744
|
+
<T>(arrays2: lodash.List<T> | null | undefined, arrays: lodash.List<T> | null | undefined): T[];
|
|
1745
1745
|
}
|
|
1746
|
-
type LodashIntersection1x1<T> = (arrays: lodash.List<T>) => T[];
|
|
1747
|
-
type LodashIntersection1x2<T> = (arrays2: lodash.List<T>) => T[];
|
|
1746
|
+
type LodashIntersection1x1<T> = (arrays: lodash.List<T> | null | undefined) => T[];
|
|
1747
|
+
type LodashIntersection1x2<T> = (arrays2: lodash.List<T> | null | undefined) => T[];
|
|
1748
1748
|
interface LodashIntersectionBy {
|
|
1749
1749
|
<T1, T2>(iteratee: lodash.ValueIteratee<T1 | T2>): LodashIntersectionBy1x1<T1, T2>;
|
|
1750
1750
|
<T1>(iteratee: lodash.__, array: lodash.List<T1> | null): LodashIntersectionBy1x2<T1>;
|
|
@@ -4161,10 +4161,10 @@ declare namespace _ {
|
|
|
4161
4161
|
interface LodashThrottle {
|
|
4162
4162
|
(wait: number): LodashThrottle1x1;
|
|
4163
4163
|
<T extends (...args: any) => any>(wait: lodash.__, func: T): LodashThrottle1x2<T>;
|
|
4164
|
-
<T extends (...args: any) => any>(wait: number, func: T):
|
|
4164
|
+
<T extends (...args: any) => any>(wait: number, func: T): lodash.DebouncedFunc<T>;
|
|
4165
4165
|
}
|
|
4166
|
-
type LodashThrottle1x1 = <T extends (...args: any) => any>(func: T) =>
|
|
4167
|
-
type LodashThrottle1x2<T> = (wait: number) =>
|
|
4166
|
+
type LodashThrottle1x1 = <T extends (...args: any) => any>(func: T) => lodash.DebouncedFunc<T>;
|
|
4167
|
+
type LodashThrottle1x2<T extends (...args: any) => any> = (wait: number) => lodash.DebouncedFunc<T>;
|
|
4168
4168
|
interface LodashThru {
|
|
4169
4169
|
<T, TResult>(interceptor: (value: T) => TResult): LodashThru1x1<T, TResult>;
|
|
4170
4170
|
<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.14.
|
|
3
|
+
"version": "4.14.164",
|
|
4
4
|
"description": "TypeScript definitions for Lo-Dash",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"contributors": [
|
|
@@ -59,6 +59,6 @@
|
|
|
59
59
|
},
|
|
60
60
|
"scripts": {},
|
|
61
61
|
"dependencies": {},
|
|
62
|
-
"typesPublisherContentHash": "
|
|
63
|
-
"typeScriptVersion": "3.
|
|
62
|
+
"typesPublisherContentHash": "faceee9346ac0ff4f96c90159be0677efd61ec0d81825632e562b89c6ea1947f",
|
|
63
|
+
"typeScriptVersion": "3.2"
|
|
64
64
|
}
|