mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-10 11:40:16 +08:00
added _(...).defaults defs
This commit is contained in:
@@ -627,6 +627,7 @@ var result = <any>_.cloneDeep(stoogesAges, function(value) {
|
||||
|
||||
var foodDefaults = { 'name': 'apple' };
|
||||
result = <any>_.defaults(foodDefaults, { 'name': 'banana', 'type': 'fruit' });
|
||||
result = <any>_(foodDefaults).defaults({ 'name': 'banana', 'type': 'fruit' });
|
||||
|
||||
result = <string>_.findKey({ 'a': 1, 'b': 2, 'c': 3, 'd': 4 }, function(num) {
|
||||
return num % 2 == 0;
|
||||
|
||||
Vendored
+7
@@ -2677,6 +2677,13 @@ declare module _ {
|
||||
object: any,
|
||||
...sources: any[]): any;
|
||||
|
||||
interface LoDashWrapper<T> {
|
||||
/**
|
||||
* @see _.defaults
|
||||
**/
|
||||
defaults(...sources: any[]): LoDashWrapper<any>
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is like _.findIndex except that it returns the key of the first element that
|
||||
* passes the callback check, instead of the element itself.
|
||||
|
||||
Reference in New Issue
Block a user