notifyManager.d.ts 1.1 KB

1234567891011121314151617181920
  1. declare type NotifyCallback = () => void;
  2. declare type NotifyFunction = (callback: () => void) => void;
  3. declare type BatchNotifyFunction = (callback: () => void) => void;
  4. declare type BatchCallsCallback<T extends unknown[]> = (...args: T) => void;
  5. export declare function createNotifyManager(): {
  6. readonly batch: <T>(callback: () => T) => T;
  7. readonly batchCalls: <T_1 extends unknown[]>(callback: BatchCallsCallback<T_1>) => BatchCallsCallback<T_1>;
  8. readonly schedule: (callback: NotifyCallback) => void;
  9. readonly setNotifyFunction: (fn: NotifyFunction) => void;
  10. readonly setBatchNotifyFunction: (fn: BatchNotifyFunction) => void;
  11. };
  12. export declare const notifyManager: {
  13. readonly batch: <T>(callback: () => T) => T;
  14. readonly batchCalls: <T_1 extends unknown[]>(callback: BatchCallsCallback<T_1>) => BatchCallsCallback<T_1>;
  15. readonly schedule: (callback: NotifyCallback) => void;
  16. readonly setNotifyFunction: (fn: NotifyFunction) => void;
  17. readonly setBatchNotifyFunction: (fn: BatchNotifyFunction) => void;
  18. };
  19. export {};
  20. //# sourceMappingURL=notifyManager.d.ts.map