Merge pull request #5285 from chrootsu/lodash-add

lodash: added _.add() method
This commit is contained in:
Masahiro Wakame
2015-08-13 23:11:43 +09:00
2 changed files with 30 additions and 0 deletions
+8
View File
@@ -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 *
***********/
+22
View File
@@ -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 *
*************/