sum.d.ts 378 B

123456789101112131415
  1. /**
  2. * 求和函数,将数值相加
  3. * @param obj 对象/数组
  4. * @param iterate 回调
  5. * @param context 上下文
  6. */
  7. export declare function sum<T, C>(obj: T[], iterate?: string | number | ((this: C, item: T, index: number, list: T[]) => number), context?: C): number;
  8. declare module './ctor' {
  9. interface XEUtilsMethods {
  10. sum: typeof sum;
  11. }
  12. }
  13. export default sum