Code coverage report for src/scheduler/AsapScheduler.ts

Statements: 100% (9 / 9)      Branches: 50% (1 / 2)      Functions: 100% (2 / 2)      Lines: 100% (7 / 7)      Ignored: none     

All files » src/scheduler/ » AsapScheduler.ts
1 2 3 4 5 6 7 8 9 10 11 12 131     1 1   2 1 2       1
import {QueueScheduler} from './QueueScheduler';
import {Subscription} from '../Subscription';
import {Action} from './Action';
import {AsapAction} from './AsapAction';
import {QueueAction} from './QueueAction';
 
export class AsapScheduler extends QueueScheduler {
  scheduleNow<T>(work: (x?: any) => Subscription<T>, state?: any): Action {
    return (this.scheduled ?
      new QueueAction(this, work) :
      new AsapAction(this, work)).schedule(state);
  }
}