bind.d.ts 385 B

123456789101112131415
  1. /**
  2. * 创建一个绑定上下文的函数
  3. * @param callback 回调
  4. * @param context 上下文
  5. * @param params 额外的参数
  6. */
  7. export declare function bind<C>(callback: (this: C, ...args: any[]) => any, context?: C, ...params: any[]): (this: any, ...args: any[]) => any;
  8. declare module './ctor' {
  9. interface XEUtilsMethods {
  10. bind: typeof bind;
  11. }
  12. }
  13. export default bind