Ohm-Management - Projektarbeit B-ME
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

VirtualTimeScheduler.d.ts 1.4KB

123456789101112131415161718192021222324252627282930313233
  1. import { AsyncAction } from './AsyncAction';
  2. import { Subscription } from '../Subscription';
  3. import { AsyncScheduler } from './AsyncScheduler';
  4. import { SchedulerAction } from '../types';
  5. export declare class VirtualTimeScheduler extends AsyncScheduler {
  6. maxFrames: number;
  7. protected static frameTimeFactor: number;
  8. frame: number;
  9. index: number;
  10. constructor(SchedulerAction?: typeof AsyncAction, maxFrames?: number);
  11. /**
  12. * Prompt the Scheduler to execute all of its queued actions, therefore
  13. * clearing its queue.
  14. * @return {void}
  15. */
  16. flush(): void;
  17. }
  18. /**
  19. * We need this JSDoc comment for affecting ESDoc.
  20. * @nodoc
  21. */
  22. export declare class VirtualAction<T> extends AsyncAction<T> {
  23. protected scheduler: VirtualTimeScheduler;
  24. protected work: (this: SchedulerAction<T>, state?: T) => void;
  25. protected index: number;
  26. protected active: boolean;
  27. constructor(scheduler: VirtualTimeScheduler, work: (this: SchedulerAction<T>, state?: T) => void, index?: number);
  28. schedule(state?: T, delay?: number): Subscription;
  29. protected requestAsyncId(scheduler: VirtualTimeScheduler, id?: any, delay?: number): any;
  30. protected recycleAsyncId(scheduler: VirtualTimeScheduler, id?: any, delay?: number): any;
  31. protected _execute(state: T, delay: number): any;
  32. static sortActions<T>(a: VirtualAction<T>, b: VirtualAction<T>): 1 | 0 | -1;
  33. }