// Type definitions for RxJS v2.2.28 // Project: http://rx.codeplex.com/ // Definitions by: gsino , Igor Oleinikov // Definitions: https://github.com/borisyankov/DefinitelyTyped /// declare module Rx { export interface IScheduler { catch(handler: (exception: any) => boolean): IScheduler; catchException(handler: (exception: any) => boolean): IScheduler; } // Observer export interface Observer { checked(): Observer; } interface ObserverStatic { /** * Schedules the invocation of observer methods on the given scheduler. * @param scheduler Scheduler to schedule observer messages on. * @returns Observer whose messages are scheduled on the given scheduler. */ notifyOn(scheduler: IScheduler): Observer; } export interface Observable { observeOn(scheduler: IScheduler): Observable; subscribeOn(scheduler: IScheduler): Observable; amb(rightSource: Observable): Observable; amb(rightSource: IPromise): Observable; onErrorResumeNext(second: Observable): Observable; onErrorResumeNext(second: IPromise): Observable; bufferWithCount(count: number, skip?: number): Observable; windowWithCount(count: number, skip?: number): Observable>; defaultIfEmpty(defaultValue?: T): Observable; distinct(skipParameter: boolean, valueSerializer: (value: T) => string): Observable; distinct(keySelector?: (value: T) => TKey, keySerializer?: (key: TKey) => string): Observable; groupBy(keySelector: (value: T) => TKey, skipElementSelector?: boolean, keySerializer?: (key: TKey) => string): Observable>; groupBy(keySelector: (value: T) => TKey, elementSelector: (value: T) => TElement, keySerializer?: (key: TKey) => string): Observable>; groupByUntil(keySelector: (value: T) => TKey, skipElementSelector: boolean, durationSelector: (group: GroupedObservable) => Observable, keySerializer?: (key: TKey) => string): Observable>; groupByUntil(keySelector: (value: T) => TKey, elementSelector: (value: T) => TElement, durationSelector: (group: GroupedObservable) => Observable, keySerializer?: (key: TKey) => string): Observable>; } interface ObservableStatic { using(resourceFactory: () => TResource, observableFactory: (resource: TResource) => Observable): Observable; amb(...sources: Observable[]): Observable; amb(...sources: IPromise[]): Observable; amb(sources: Observable[]): Observable; amb(sources: IPromise[]): Observable; onErrorResumeNext(...sources: Observable[]): Observable; onErrorResumeNext(...sources: IPromise[]): Observable; onErrorResumeNext(sources: Observable[]): Observable; onErrorResumeNext(sources: IPromise[]): Observable; } interface GroupedObservable extends Observable { key: TKey; underlyingObservable: Observable; } } declare module "rx" { export = Rx }