windowTime.js 883 B

12345678910111213141516171819202122232425
  1. import { asyncScheduler } from 'rxjs';
  2. import { isNumeric, isScheduler } from 'rxjs/internal-compatibility';
  3. import { windowTime as higherOrder } from 'rxjs/operators';
  4. export function windowTime(windowTimeSpan) {
  5. let scheduler = asyncScheduler;
  6. let windowCreationInterval = null;
  7. let maxWindowSize = Number.POSITIVE_INFINITY;
  8. if (isScheduler(arguments[3])) {
  9. scheduler = arguments[3];
  10. }
  11. if (isScheduler(arguments[2])) {
  12. scheduler = arguments[2];
  13. }
  14. else if (isNumeric(arguments[2])) {
  15. maxWindowSize = arguments[2];
  16. }
  17. if (isScheduler(arguments[1])) {
  18. scheduler = arguments[1];
  19. }
  20. else if (isNumeric(arguments[1])) {
  21. windowCreationInterval = arguments[1];
  22. }
  23. return higherOrder(windowTimeSpan, windowCreationInterval, maxWindowSize, scheduler)(this);
  24. }
  25. //# sourceMappingURL=windowTime.js.map