mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-16 19:09:18 +08:00
Add sum() to sugar.d.ts.
The nullary version of sum() was missing in sugar.d.ts (ony the unary version was present).
This commit is contained in:
7
sugar/sugar.d.ts
vendored
7
sugar/sugar.d.ts
vendored
@@ -2820,7 +2820,7 @@ interface Array<T> {
|
||||
* @see subtract
|
||||
**/
|
||||
subtract(args: T[]): T[];
|
||||
|
||||
|
||||
/**
|
||||
* Sums all values in the array.
|
||||
* @param map Property on each element in the array or callback function to sum up the elements.
|
||||
@@ -2836,6 +2836,11 @@ interface Array<T> {
|
||||
**/
|
||||
sum(map: string): number;
|
||||
|
||||
/**
|
||||
* @see sum
|
||||
**/
|
||||
sum(): number;
|
||||
|
||||
/**
|
||||
* @see sum
|
||||
**/
|
||||
|
||||
Reference in New Issue
Block a user