Code coverage report for src/scheduler/QueueAction.ts

Statements: 93.33% (14 / 15)      Branches: 50% (2 / 4)      Functions: 100% (2 / 2)      Lines: 91.67% (11 / 12)      Ignored: none     

All files » src/scheduler/ » QueueAction.ts
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;
  }
}