1 |
|
2 | /**
|
3 | * 接收一个函数作为累加器,数组中的每个值(从左到右)开始合并,最终为一个值
|
4 | * @param array 数组
|
5 | * @param iterate 回调
|
6 | * @param initialValue 默认值
|
7 | * @example
|
8 | */
|
9 | export declare function reduce<T, U>(array: T[], iterate?: (previous: U, item: T, index: number, list: T[]) => U, initialValue?: U): U;
|
10 |
|
11 | declare module './ctor' {
|
12 | interface XEUtilsMethods {
|
13 | reduce: typeof reduce;
|
14 | }
|
15 | }
|
16 |
|
17 | export default reduce
|