From 79f2f9e5e1e25956027c29b1848f551fc0b50554 Mon Sep 17 00:00:00 2001 From: Mateusz Podlasin Date: Fri, 20 Jan 2017 22:38:29 +0100 Subject: [PATCH] refactor(TestScheduler): return hot and cold observables instead of generic observable Return HotObservable and ColdObservable instead of simply Observable, in order to give users access to subscriptions parameter --- src/testing/TestScheduler.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/testing/TestScheduler.ts b/src/testing/TestScheduler.ts index c29d57bc6e..8c7985529d 100644 --- a/src/testing/TestScheduler.ts +++ b/src/testing/TestScheduler.ts @@ -1,6 +1,5 @@ import { Observable } from '../Observable'; import { Notification } from '../Notification'; -import { Subject } from '../Subject'; import { ColdObservable } from './ColdObservable'; import { HotObservable } from './HotObservable'; import { TestMessage } from './TestMessage'; @@ -36,7 +35,7 @@ export class TestScheduler extends VirtualTimeScheduler { return indexOf * TestScheduler.frameTimeFactor; } - createColdObservable(marbles: string, values?: any, error?: any): Observable { + createColdObservable(marbles: string, values?: any, error?: any): ColdObservable { if (marbles.indexOf('^') !== -1) { throw new Error('cold observable cannot have subscription offset "^"'); } @@ -49,7 +48,7 @@ export class TestScheduler extends VirtualTimeScheduler { return cold; } - createHotObservable(marbles: string, values?: any, error?: any): Subject { + createHotObservable(marbles: string, values?: any, error?: any): HotObservable { if (marbles.indexOf('!') !== -1) { throw new Error('hot observable cannot have unsubscription marker "!"'); }