objectMap.d.ts 486 B

1234567891011121314151617
  1. /**
  2. * 指定方法后的返回值组成的新对象
  3. * @param obj 对象
  4. * @param iterate 回调
  5. * @param context 上下文
  6. */
  7. export declare function objectMap<T, U>(obj: T, iterate: (item: any, key: string, obj: T) => U, context ?: any): U;
  8. export declare function objectMap<U>(obj: any, iterate: (item: any, key: string, obj: any) => U, context ?: any): U;
  9. declare module './ctor' {
  10. interface XEUtilsMethods {
  11. objectMap: typeof objectMap;
  12. }
  13. }
  14. export default objectMap