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.

Action.d.ts 1.3KB

12345678910111213141516171819202122232425262728293031
  1. import { Scheduler } from '../Scheduler';
  2. import { Subscription } from '../Subscription';
  3. import { SchedulerAction } from '../types';
  4. /**
  5. * A unit of work to be executed in a `scheduler`. An action is typically
  6. * created from within a {@link SchedulerLike} and an RxJS user does not need to concern
  7. * themselves about creating and manipulating an Action.
  8. *
  9. * ```ts
  10. * class Action<T> extends Subscription {
  11. * new (scheduler: Scheduler, work: (state?: T) => void);
  12. * schedule(state?: T, delay: number = 0): Subscription;
  13. * }
  14. * ```
  15. *
  16. * @class Action<T>
  17. */
  18. export declare class Action<T> extends Subscription {
  19. constructor(scheduler: Scheduler, work: (this: SchedulerAction<T>, state?: T) => void);
  20. /**
  21. * Schedules this action on its parent {@link SchedulerLike} for execution. May be passed
  22. * some context object, `state`. May happen at some point in the future,
  23. * according to the `delay` parameter, if specified.
  24. * @param {T} [state] Some contextual data that the `work` function uses when
  25. * called by the Scheduler.
  26. * @param {number} [delay] Time to wait before executing the work, where the
  27. * time unit is implicit and defined by the Scheduler.
  28. * @return {void}
  29. */
  30. schedule(state?: T, delay?: number): Subscription;
  31. }