Front end of the Slack clone application.

AsyncAction.d.ts 1.0KB

12345678910111213141516171819202122232425262728
  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. protected work: (this: AsyncAction<T>, state?: T) => void;
  12. id: any;
  13. state: T;
  14. delay: number;
  15. protected pending: boolean;
  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. }