scheduler.mjs 768 B

1234567891011121314151617181920212223
  1. /* eslint-disable */
  2. // This file includes experimental React APIs exported from the "scheduler"
  3. // npm package. Despite being explicitely marked as unstable some libraries
  4. // already make use of them. This file is not a full replacement for the
  5. // scheduler package, but includes the necessary shims to make those libraries
  6. // work with Preact.
  7. export var unstable_ImmediatePriority = 1;
  8. export var unstable_UserBlockingPriority = 2;
  9. export var unstable_NormalPriority = 3;
  10. export var unstable_LowPriority = 4;
  11. export var unstable_IdlePriority = 5;
  12. /**
  13. * @param {number} priority
  14. * @param {() => void} callback
  15. */
  16. export function unstable_runWithPriority(priority, callback) {
  17. return callback();
  18. }
  19. export var unstable_now = performance.now.bind(performance);