mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Merge pull request #5285 from chrootsu/lodash-add
lodash: added _.add() method
This commit is contained in:
@@ -1086,6 +1086,14 @@ result = <Object>_([1]).toPlainObject();
|
||||
result = <Object>_<string>([]).toPlainObject();
|
||||
result = <Object>_({}).toPlainObject();
|
||||
|
||||
/********
|
||||
* Math *
|
||||
********/
|
||||
|
||||
// _.add
|
||||
result = <number>_.add(1, 1);
|
||||
result = <number>_(1).add(1);
|
||||
|
||||
/**********
|
||||
* Objects *
|
||||
***********/
|
||||
|
||||
Vendored
+22
@@ -5908,6 +5908,28 @@ declare module _ {
|
||||
toPlainObject(value?: any): Object;
|
||||
}
|
||||
|
||||
/********
|
||||
* Math *
|
||||
********/
|
||||
|
||||
//_.add
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Adds two numbers.
|
||||
* @param augend The first number to add.
|
||||
* @param addend The second number to add.
|
||||
* @return Returns the sum.
|
||||
*/
|
||||
add(augend: number, addend: number): number;
|
||||
}
|
||||
|
||||
interface LoDashWrapper<T> {
|
||||
/**
|
||||
* @see _.add
|
||||
*/
|
||||
add(addend: number): number;
|
||||
}
|
||||
|
||||
/*************
|
||||
* Objects *
|
||||
*************/
|
||||
|
||||
Reference in New Issue
Block a user