AsyncAction.d.ts 1.0 KB

123456789101112131415161718192021222324252627
  1. import { Action } from './Action';
  2. import { Subscription } from '../Subscription';
  3. import { AsyncScheduler } from './AsyncScheduler';
  4. /**
  5. * We need this JSDoc comment for affecting ESDoc.
  6. * @ignore
  7. * @extends {Ignored}
  8. */
  9. export declare class AsyncAction<T> extends Action<T> {
  10. protected scheduler: AsyncScheduler;
  11. id: any;
  12. state: T;
  13. delay: number;
  14. protected pending: boolean;
  15. protected work: (this: this, state?: T) => void;
  16. constructor(scheduler: AsyncScheduler, work: (this: AsyncAction<T>, state?: T) => void);
  17. schedule(state?: T, delay?: number): Subscription;
  18. protected requestAsyncId(scheduler: AsyncScheduler, id?: any, delay?: number): any;
  19. protected recycleAsyncId(scheduler: AsyncScheduler, id: any, delay?: number): any;
  20. /**
  21. * Immediately executes this action and the `work` it contains.
  22. * @return {any}
  23. */
  24. execute(state: T, delay: number): any;
  25. protected _execute(state: T, delay: number): any;
  26. /** @deprecated internal use only */ _unsubscribe(): void;
  27. }