UNPKG

1.14 kBTypeScriptView Raw
1import { Action } from './Action';
2import { SchedulerAction } from '../types';
3import { Subscription } from '../Subscription';
4import { AsyncScheduler } from './AsyncScheduler';
5import { TimerHandle } from './timerHandle';
6export declare class AsyncAction<T> extends Action<T> {
7 protected scheduler: AsyncScheduler;
8 protected work: (this: SchedulerAction<T>, state?: T) => void;
9 id: TimerHandle | undefined;
10 state?: T;
11 delay: number;
12 protected pending: boolean;
13 constructor(scheduler: AsyncScheduler, work: (this: SchedulerAction<T>, state?: T) => void);
14 schedule(state?: T, delay?: number): Subscription;
15 protected requestAsyncId(scheduler: AsyncScheduler, _id?: TimerHandle, delay?: number): TimerHandle;
16 protected recycleAsyncId(_scheduler: AsyncScheduler, id?: TimerHandle, delay?: number | null): TimerHandle | undefined;
17 /**
18 * Immediately executes this action and the `work` it contains.
19 * @return {any}
20 */
21 execute(state: T, delay: number): any;
22 protected _execute(state: T, _delay: number): any;
23 unsubscribe(): void;
24}
25//# sourceMappingURL=AsyncAction.d.ts.map
\No newline at end of file