Code coverage report for src/operator/subscribeOn.ts

Statements: 100% (5 / 5)      Branches: 100% (2 / 2)      Functions: 100% (1 / 1)      Lines: 100% (3 / 3)      Ignored: none     

All files » src/operator/ » subscribeOn.ts
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17    1                     13 7    
import {Scheduler} from '../Scheduler';
import {Observable} from '../Observable';
import {SubscribeOnObservable} from '../observable/SubscribeOnObservable';
 
/**
 * Asynchronously subscribes Observers to this Observable on the specified Scheduler.
 *
 * <img src="./img/subscribeOn.png" width="100%">
 *
 * @param {Scheduler} the Scheduler to perform subscription actions on.
 * @returns {Observable<T>} the source Observable modified so that its subscriptions happen on the specified Scheduler
 .
 */
export function subscribeOn<T>(scheduler: Scheduler, delay: number = 0): Observable<T> {
  return new SubscribeOnObservable<T>(this, delay, scheduler);
}