lastEach.d.ts 760 B

123456789101112131415161718
  1. /**
  2. * 通用迭代器,从最后开始迭代
  3. * @param list 对象
  4. * @param iterate 回调
  5. * @param context 上下文
  6. */
  7. export declare function lastEach<T, C>(list: T[], iterate: (this: C, item: T, index: number, list: T) => void, context?: C): void;
  8. export declare function lastEach<T, C>(obj: T, iterate: (this: C, item: any, key: string, obj: T) => void, context?: C): void;
  9. export declare function lastEach<C>(obj: any[], iterate: (this: C, item: any, key: string, obj: any[]) => void, context?: C): void;
  10. export declare function lastEach<C>(obj: any, iterate: (this: C, item: any, key: string, obj: any) => void, context?: C): void;
  11. declare module './ctor' {
  12. interface XEUtilsMethods {
  13. lastEach: typeof lastEach;
  14. }
  15. }
  16. export default lastEach