@types/lodash
Advanced tools
Comparing version
@@ -119,19 +119,19 @@ import _ = require("../index"); | ||
**/ | ||
escape?: RegExp; | ||
escape?: RegExp | undefined; | ||
/** | ||
* The "evaluate" delimiter. | ||
**/ | ||
evaluate?: RegExp; | ||
evaluate?: RegExp | undefined; | ||
/** | ||
* An object to import into the template as local variables. | ||
*/ | ||
imports?: Dictionary<any>; | ||
imports?: Dictionary<any> | undefined; | ||
/** | ||
* The "interpolate" delimiter. | ||
*/ | ||
interpolate?: RegExp; | ||
interpolate?: RegExp | undefined; | ||
/** | ||
* Used to reference the data object in the template text. | ||
*/ | ||
variable?: string; | ||
variable?: string | undefined; | ||
} | ||
@@ -170,3 +170,3 @@ /** | ||
*/ | ||
clear?: () => void; | ||
clear?: (() => void) | undefined; | ||
} | ||
@@ -173,0 +173,0 @@ interface MapCacheConstructor { |
@@ -361,12 +361,15 @@ import _ = require("../index"); | ||
*/ | ||
leading?: boolean; | ||
leading?: boolean | undefined; | ||
/** | ||
* @see _.maxWait | ||
*/ | ||
maxWait?: number; | ||
maxWait?: number | undefined; | ||
/** | ||
* @see _.trailing | ||
*/ | ||
trailing?: boolean; | ||
trailing?: boolean | undefined; | ||
} | ||
interface DebounceSettingsLeading extends DebounceSettings { | ||
leading: true; | ||
} | ||
interface DebouncedFunc<T extends (...args: any[]) => any> { | ||
@@ -379,3 +382,3 @@ /** | ||
* | ||
* Otherwise, it returns the return value of the last invokation, or undefined if the debounced | ||
* Otherwise, it returns the return value of the last invocation, or undefined if the debounced | ||
* function was not invoked yet. | ||
@@ -386,3 +389,3 @@ */ | ||
/** | ||
* Throw away any pending invokation of the debounced function. | ||
* Throw away any pending invocation of the debounced function. | ||
*/ | ||
@@ -392,6 +395,6 @@ cancel(): void; | ||
/** | ||
* If there is a pending invokation of the debounced function, invoke it immediately and return | ||
* If there is a pending invocation of the debounced function, invoke it immediately and return | ||
* its return value. | ||
* | ||
* Otherwise, return the value from the last invokation, or undefined if the debounced function | ||
* Otherwise, return the value from the last invocation, or undefined if the debounced function | ||
* was never invoked. | ||
@@ -401,2 +404,6 @@ */ | ||
} | ||
interface DebouncedFuncLeading<T extends (...args: any[]) => any> extends DebouncedFunc<T> { | ||
(...args: Parameters<T>): ReturnType<T>; | ||
flush(): ReturnType<T>; | ||
} | ||
interface LoDashStatic { | ||
@@ -423,2 +430,3 @@ /** | ||
*/ | ||
debounce<T extends (...args: any) => any>(func: T, wait: number | undefined, options: DebounceSettingsLeading): DebouncedFuncLeading<T>; | ||
debounce<T extends (...args: any) => any>(func: T, wait?: number, options?: DebounceSettings): DebouncedFunc<T>; | ||
@@ -431,2 +439,6 @@ } | ||
debounce( | ||
wait: number | undefined, | ||
options: DebounceSettingsLeading | ||
): T extends (...args: any[]) => any ? Function<DebouncedFuncLeading<T>> : never; | ||
debounce( | ||
wait?: number, | ||
@@ -441,2 +453,6 @@ options?: DebounceSettings | ||
debounce( | ||
wait: number | undefined, | ||
options: DebounceSettingsLeading | ||
): T extends (...args: any[]) => any ? FunctionChain<DebouncedFuncLeading<T>> : never; | ||
debounce( | ||
wait?: number, | ||
@@ -1344,7 +1360,7 @@ options?: DebounceSettings | ||
*/ | ||
leading?: boolean; | ||
leading?: boolean | undefined; | ||
/** | ||
* @see _.trailing | ||
*/ | ||
trailing?: boolean; | ||
trailing?: boolean | undefined; | ||
} | ||
@@ -1351,0 +1367,0 @@ interface LoDashStatic { |
@@ -223,3 +223,4 @@ import _ = require("../index"); | ||
} | ||
type CondPair<T, R> = [(val: T) => boolean, (val: T) => R]; | ||
type CondPairNullary<R> = [() => boolean, () => R]; | ||
type CondPairUnary<T, R> = [(val: T) => boolean, (val: T) => R]; | ||
interface LoDashStatic { | ||
@@ -564,2 +565,4 @@ /** | ||
type EmptyObject<T> = { [K in keyof T]?: never }; | ||
type EmptyObjectOf<T> = EmptyObject<T> extends T ? EmptyObject<T> : never; | ||
interface LoDashStatic { | ||
@@ -573,2 +576,7 @@ /** | ||
*/ | ||
isEmpty<T extends { __trapAny: any }>(value?: T): boolean; | ||
isEmpty(value: string): value is ''; | ||
isEmpty(value: Map<any, any> | Set<any> | List<any> | null | undefined): boolean; | ||
isEmpty(value: object): boolean; | ||
isEmpty<T extends object>(value: T | null | undefined): value is EmptyObjectOf<T> | null | undefined; | ||
isEmpty(value?: any): boolean; | ||
@@ -954,3 +962,3 @@ } | ||
* | ||
* @retrun Returns true if value is a native function, else false. | ||
* @return Returns true if value is a native function, else false. | ||
*/ | ||
@@ -957,0 +965,0 @@ isNative(value: any): value is (...args: any[]) => any; |
@@ -133,3 +133,3 @@ import _ = require("../index"); | ||
* | ||
* _.maxBy(objects, function(o) { return o.a; }); | ||
* _.maxBy(objects, function(o) { return o.n; }); | ||
* // => { 'n': 2 } | ||
@@ -136,0 +136,0 @@ * |
@@ -478,3 +478,3 @@ import _ = require("../index"); | ||
*/ | ||
sourceURL?: string; | ||
sourceURL?: string | undefined; | ||
} | ||
@@ -659,11 +659,11 @@ interface TemplateExecutor { | ||
*/ | ||
length?: number; | ||
length?: number | undefined; | ||
/** | ||
* @see _.omission | ||
*/ | ||
omission?: string; | ||
omission?: string | undefined; | ||
/** | ||
* @see _.separator | ||
*/ | ||
separator?: string | RegExp; | ||
separator?: string | RegExp | undefined; | ||
} | ||
@@ -782,3 +782,3 @@ interface LoDashStatic { | ||
*/ | ||
words(pattern?: string | RegExp): string[]; | ||
words(pattern?: string | RegExp): Collection<string>; | ||
} | ||
@@ -785,0 +785,0 @@ interface LoDashExplicitWrapper<TValue> { |
@@ -82,3 +82,4 @@ import _ = require("../index"); | ||
*/ | ||
cond<T, R>(pairs: Array<CondPair<T, R>>): (Target: T) => R; | ||
cond<R>(pairs: Array<CondPairNullary<R>>): () => R; | ||
cond<T, R>(pairs: Array<CondPairUnary<T, R>>): (Target: T) => R; | ||
} | ||
@@ -428,3 +429,3 @@ | ||
*/ | ||
iteratee(func: string | object): (...args: any[]) => any; | ||
iteratee(func: symbol | number | string | object): (...args: any[]) => any; | ||
} | ||
@@ -607,3 +608,3 @@ interface Function<T extends (...args: any) => any> { | ||
*/ | ||
chain?: boolean; | ||
chain?: boolean | undefined; | ||
} | ||
@@ -610,0 +611,0 @@ interface LoDashStatic { |
// Type definitions for Lo-Dash 4.14 | ||
// Project: https://lodash.com | ||
// Definitions 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>, | ||
// Definitions 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> | ||
@@ -11,0 +10,0 @@ // William Chelman <https://github.com/WilliamChelman> |
{ | ||
"name": "@types/lodash", | ||
"version": "4.14.168", | ||
"version": "4.14.195", | ||
"description": "TypeScript definitions for Lo-Dash", | ||
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/lodash", | ||
"license": "MIT", | ||
@@ -18,7 +19,2 @@ "contributors": [ | ||
{ | ||
"name": "Stepan Mikhaylyuk", | ||
"url": "https://github.com/stepancar", | ||
"githubUsername": "stepancar" | ||
}, | ||
{ | ||
"name": "AJ Richardson", | ||
@@ -63,4 +59,4 @@ "url": "https://github.com/aj-r", | ||
"dependencies": {}, | ||
"typesPublisherContentHash": "4829f7ac23028c3eca917a9fb612e9b559d688639097c176e090c09ccee48261", | ||
"typeScriptVersion": "3.4" | ||
"typesPublisherContentHash": "511fee61d6ee9c65fa58c2adfea8692c665eba179542b7f18eebfa3f216e5972", | ||
"typeScriptVersion": "4.3" | ||
} |
@@ -11,3 +11,3 @@ # Installation | ||
### Additional Details | ||
* Last updated: Mon, 18 Jan 2021 15:06:13 GMT | ||
* Last updated: Thu, 25 May 2023 20:34:17 GMT | ||
* Dependencies: none | ||
@@ -17,2 +17,2 @@ * Global values: `_` | ||
# Credits | ||
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). | ||
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). |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
863426
0.6%19101
0.48%0
-100%