// Type definitions for RxJS-Testing v2.2.28 // Project: https://github.com/Reactive-Extensions/RxJS/ // Definitions by: Igor Oleinikov // Definitions: https://github.com/borisyankov/DefinitelyTyped /// /// declare module Rx { export interface TestScheduler extends VirtualTimeScheduler { createColdObservable(...records: Recorded[]): Observable; createHotObservable(...records: Recorded[]): Observable; createObserver(): MockObserver; startWithTiming(create: () => Observable, createdAt: number, subscribedAt: number, disposedAt: number): MockObserver; startWithDispose(create: () => Observable, disposedAt: number): MockObserver; startWithCreate(create: () => Observable): MockObserver; } export var TestScheduler: { new (): TestScheduler; }; export class Recorded { constructor(time: number, value: any, equalityComparer?: (x: any, y: any) => boolean); equals(other: Recorded): boolean; toString(): string; time: number; value: any; } export var ReactiveTest: { created: number; subscribed: number; disposed: number; onNext(ticks: number, value: any): Recorded; onNext(ticks: number, predicate: (value: any) => boolean): Recorded; onError(ticks: number, exception: any): Recorded; onError(ticks: number, predicate: (exception: any) => boolean): Recorded; onCompleted(ticks: number): Recorded; subscribe(subscribeAt: number, unsubscribeAt?: number): Subscription; }; export class Subscription { constructor(subscribeAt: number, unsubscribeAt?: number); equals(other: Subscription): boolean; } export interface MockObserver extends Observer { messages: Recorded[]; } interface MockObserverStatic extends ObserverStatic { new (scheduler: IScheduler): MockObserver; } export var MockObserver: MockObserverStatic; } declare module "rx.testing" { export = Rx; }