Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(TestScheduler): return hot and cold observables #2305

Merged
merged 1 commit into from
Jan 29, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions src/testing/TestScheduler.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -36,7 +35,7 @@ export class TestScheduler extends VirtualTimeScheduler {
return indexOf * TestScheduler.frameTimeFactor;
}

createColdObservable<T>(marbles: string, values?: any, error?: any): Observable<T> {
createColdObservable<T>(marbles: string, values?: any, error?: any): ColdObservable<T> {
if (marbles.indexOf('^') !== -1) {
throw new Error('cold observable cannot have subscription offset "^"');
}
Expand All @@ -49,7 +48,7 @@ export class TestScheduler extends VirtualTimeScheduler {
return cold;
}

createHotObservable<T>(marbles: string, values?: any, error?: any): Subject<T> {
createHotObservable<T>(marbles: string, values?: any, error?: any): HotObservable<T> {
if (marbles.indexOf('!') !== -1) {
throw new Error('hot observable cannot have unsubscription marker "!"');
}
Expand Down