before.d.ts 661 B

1234567891011121314151617181920212223
  1. import { XEUtilsMethods } from '../xe-utils'
  2. /**
  3. * 创建一个函数, 调用次数不超过 count 次之前执行回调并将所有结果记住后返回
  4. * @param count 次数
  5. * @param callback 回调
  6. * @param context 上下文
  7. */
  8. export declare function before(count: number, callback: Function, context?: any): Function;
  9. declare module '../xe-utils' {
  10. interface XEUtilsMethods {
  11. /**
  12. * 创建一个函数, 调用次数不超过 count 次之前执行回调并将所有结果记住后返回
  13. * @param count 次数
  14. * @param callback 回调
  15. * @param context 上下文
  16. */
  17. before: typeof before;
  18. }
  19. }
  20. export default before