1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | 1 31 119 119 119 119 119 119 119 119 1 | import {Action} from './Action'; import {FutureAction} from './FutureAction'; export class QueueAction<T> extends FutureAction<T> { protected _schedule(state?: any, Idelay: number = 0): Action { Iif (delay > 0) { return super._schedule(state, delay); } this.delay = delay; this.state = state; const scheduler = this.scheduler; scheduler.actions.push(this); scheduler.flush(); return this; } } |