@types/rx-lite
- Version 4.0.10
- Published
- 59.4 kB
- 2 dependencies
- MIT license
Install
npm i @types/rx-lite
yarn add @types/rx-lite
pnpm add @types/rx-lite
Overview
TypeScript definitions for rx-lite
Index
Namespaces
Rx
- CompositeDisposable
- ConnectableObservable
- Disposable
- DOMEventTarget
- ICurrentThreadScheduler
- IObservable
- IObserver
- IScheduler
- NativeEventTarget
- NodeEventTarget
- Notification
- Observable
- Observable
- Observable
- ObservableStatic
- ObservableStatic
- ObservableStatic
- Observer
- Observer
- ObserverStatic
- RefCountDisposable
- Scheduler
- Scheduler
- SchedulerStatic
- SerialDisposable
- SingleAssignmentDisposable
- TimeInterval
- Timestamp
rx-lite
- CompositeDisposable
- ConnectableObservable
- Disposable
- DOMEventTarget
- ICurrentThreadScheduler
- IObservable
- IObserver
- IScheduler
- NativeEventTarget
- NodeEventTarget
- Notification
- Observable
- Observable
- Observable
- ObservableStatic
- ObservableStatic
- ObservableStatic
- Observer
- Observer
- ObserverStatic
- RefCountDisposable
- Scheduler
- Scheduler
- SchedulerStatic
- SerialDisposable
- SingleAssignmentDisposable
- TimeInterval
- Timestamp
Namespaces
namespace Rx
namespace Rx {}
variable Observable
const Observable: ObservableStatic;
variable Observer
const Observer: ObserverStatic;
variable Scheduler
const Scheduler: SchedulerStatic;
class CompositeDisposable
class CompositeDisposable implements IDisposable {}
constructor
constructor(...disposables: IDisposable[]);
constructor
constructor(disposables: IDisposable[]);
property isDisposed
isDisposed: boolean;
property length
length: number;
method add
add: (item: IDisposable) => void;
method dispose
dispose: () => void;
method remove
remove: (item: IDisposable) => boolean;
method toArray
toArray: () => IDisposable[];
class Disposable
class Disposable implements IDisposable {}
constructor
constructor(action: () => void);
property empty
static empty: IDisposable;
method create
static create: (action: () => void) => IDisposable;
method dispose
dispose: () => void;
class Notification
class Notification<T> {}
property exception
exception: any;
property hasValue
hasValue: boolean;
property kind
kind: string;
property value
value: {};
method accept
accept: { (observer: IObserver<T>): void; <TResult>( onNext: (value: T) => TResult, onError?: (exception: any) => TResult, onCompleted?: () => TResult ): TResult;};
method createOnCompleted
static createOnCompleted: <T>() => Notification<T>;
method createOnError
static createOnError: <T>(exception: any) => Notification<T>;
method createOnNext
static createOnNext: <T>(value: T) => Notification<T>;
method equals
equals: (other: Notification<T>) => boolean;
method toObservable
toObservable: (scheduler?: IScheduler) => Observable<T>;
class RefCountDisposable
class RefCountDisposable implements IDisposable {}
constructor
constructor(disposable: IDisposable);
property isDisposed
isDisposed: boolean;
method dispose
dispose: () => void;
method getDisposable
getDisposable: () => IDisposable;
class SerialDisposable
class SerialDisposable extends SingleAssignmentDisposable {}
constructor
constructor();
class SingleAssignmentDisposable
class SingleAssignmentDisposable implements IDisposable {}
constructor
constructor();
property current
current: IDisposable;
property isDisposed
isDisposed: boolean;
method dispose
dispose: () => void;
method getDisposable
getDisposable: () => IDisposable;
method setDisposable
setDisposable: (value: IDisposable) => void;
interface ConnectableObservable
interface ConnectableObservable<T> extends Observable<T> {}
method connect
connect: () => Disposable;
interface DOMEventTarget
interface DOMEventTarget {}
method addEventListener
addEventListener: ( type: string, listener: (e: any) => any, useCapture: boolean) => void;
method removeEventListener
removeEventListener: ( type: string, listener: (e: any) => any, useCapture: boolean) => void;
interface ICurrentThreadScheduler
interface ICurrentThreadScheduler extends IScheduler {}
method scheduleRequired
scheduleRequired: () => boolean;
interface IObservable
interface IObservable<T> {}
method subscribe
subscribe: { (observer: Observer<T>): IDisposable; ( onNext?: (value: T) => void, onError?: (exception: any) => void, onCompleted?: () => void ): IDisposable;};
method subscribeOnCompleted
subscribeOnCompleted: (onCompleted: () => void, thisArg?: any) => IDisposable;
method subscribeOnError
subscribeOnError: ( onError: (exception: any) => void, thisArg?: any) => IDisposable;
method subscribeOnNext
subscribeOnNext: (onNext: (value: T) => void, thisArg?: any) => IDisposable;
interface IObserver
interface IObserver<T> {}
method onCompleted
onCompleted: () => void;
method onError
onError: (exception: any) => void;
method onNext
onNext: (value: T) => void;
interface IScheduler
interface IScheduler {}
method isScheduler
isScheduler: (value: any) => boolean;
method now
now: () => number;
method schedule
schedule: (action: () => void) => IDisposable;
method schedulePeriodic
schedulePeriodic: (period: number, action: () => void) => IDisposable;
method schedulePeriodicWithState
schedulePeriodicWithState: <TState>( state: TState, period: number, action: (state: TState) => TState) => IDisposable;
method scheduleRecursive
scheduleRecursive: (action: (action: () => void) => void) => IDisposable;
method scheduleRecursiveWithAbsolute
scheduleRecursiveWithAbsolute: ( dueTime: number, action: (action: (dueTime: number) => void) => void) => IDisposable;
method scheduleRecursiveWithAbsoluteAndState
scheduleRecursiveWithAbsoluteAndState: <TState>( state: TState, dueTime: number, action: ( state: TState, action: (state: TState, dueTime: number) => void ) => void) => IDisposable;
method scheduleRecursiveWithRelative
scheduleRecursiveWithRelative: ( dueTime: number, action: (action: (dueTime: number) => void) => void) => IDisposable;
method scheduleRecursiveWithRelativeAndState
scheduleRecursiveWithRelativeAndState: <TState>( state: TState, dueTime: number, action: ( state: TState, action: (state: TState, dueTime: number) => void ) => void) => IDisposable;
method scheduleRecursiveWithState
scheduleRecursiveWithState: <TState>( state: TState, action: (state: TState, action: (state: TState) => void) => void) => IDisposable;
method scheduleWithAbsolute
scheduleWithAbsolute: (dueTime: number, action: () => void) => IDisposable;
method scheduleWithAbsoluteAndState
scheduleWithAbsoluteAndState: <TState>( state: TState, dueTime: number, action: (scheduler: IScheduler, state: TState) => IDisposable) => IDisposable;
method scheduleWithRelative
scheduleWithRelative: (dueTime: number, action: () => void) => IDisposable;
method scheduleWithRelativeAndState
scheduleWithRelativeAndState: <TState>( state: TState, dueTime: number, action: (scheduler: IScheduler, state: TState) => IDisposable) => IDisposable;
method scheduleWithState
scheduleWithState: <TState>( state: TState, action: (scheduler: IScheduler, state: TState) => IDisposable) => IDisposable;
interface NativeEventTarget
interface NativeEventTarget {}
interface NodeEventTarget
interface NodeEventTarget {}
method addListener
addListener: (name: string, cb: (e: any) => any) => void;
interface Observable
interface Observable<T> extends IObservable<T> {}
method asObservable
asObservable: () => Observable<T>;
method catch
catch: { (handler: (exception: Error) => IPromise<T> | Observable<T>): Observable<T>; (second: Observable<T>): Observable<T>;};
method catchException
catchException: { (handler: (exception: Error) => IPromise<T> | Observable<T>): Observable<T>; (second: Observable<T>): Observable<T>;};
method combineLatest
combineLatest: { <T2>(second: Observable<T2> | IPromise<T2>): Observable<[T, T2]>; <T2, TResult>( second: any, resultSelector: (v1: T, v2: T2) => TResult ): Observable<TResult>; <T2, T3>(second: any, third: any): Observable<[T, T2, T3]>; <T2, T3, TResult>( second: any, third: any, resultSelector: (v1: T, v2: T2, v3: T3) => TResult ): Observable<TResult>; <T2, T3, T4>(second: any, third: any, fourth: any): Observable< [T, T2, T3, T4] >; <T2, T3, T4, TResult>( second: any, third: any, fourth: any, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult ): Observable<TResult>; <T2, T3, T4, T5>( second: any, third: any, fourth: any, fifth: any ): Observable<[T, T2, T3, T4, T5]>; <T2, T3, T4, T5, TResult>( second: any, third: any, fourth: any, fifth: any, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4, v5: T5) => TResult ): Observable<TResult>; <TOther, TResult>( souces: any[], resultSelector: (firstValue: T, ...otherValues: TOther[]) => TResult ): Observable<TResult>;};
method concat
concat: { (...sources: Array<Observable<T> | IPromise<T>>): Observable<T>; (sources: any[]): Observable<T>;};
method concatAll
concatAll: () => T;
method concatMap
concatMap: { <T2, R>( selector: (value: T, index: number) => Observable<T2>, resultSelector: (value1: T, value2: T2, index: number) => R ): Observable<R>; <T2, R>( selector: (value: T, index: number) => IPromise<T2>, resultSelector: (value1: T, value2: T2, index: number) => R ): Observable<R>; <R>(selector: (value: T, index: number) => Observable<R>): Observable<R>; <R>(selector: (value: T, index: number) => IPromise<R>): Observable<R>; <R>(selector: (value: T, index: number) => R[]): Observable<R>; <R>(sequence: Observable<R>): Observable<R>; <R>(sequence: R[]): Observable<R>;};
method concatObservable
concatObservable: () => Observable<T>;
method dematerialize
dematerialize: <TOrigin>() => Observable<TOrigin>;
method distinctUntilChanged
distinctUntilChanged: { (skipParameter: boolean, comparer: (x: T, y: T) => boolean): Observable<T>; <TValue>( keySelector?: (value: T) => TValue, comparer?: (x: TValue, y: TValue) => boolean ): Observable<T>;};
method do
do: { (observer: Observer<T>): Observable<T>; ( onNext?: (value: T) => void, onError?: (exception: Error) => void, onCompleted?: () => void ): Observable<T>;};
method doAction
doAction: { (observer: Observer<T>): Observable<T>; ( onNext?: (value: T) => void, onError?: (exception: Error) => void, onCompleted?: () => void ): Observable<T>;};
method doOnCompleted
doOnCompleted: (onCompleted: () => void, thisArg?: any) => Observable<T>;
method doOnError
doOnError: (onError: (exception: any) => void, thisArg?: any) => Observable<T>;
method doOnNext
doOnNext: (onNext: (value: T) => void, thisArg?: any) => Observable<T>;
method exclusive
exclusive: <R>() => Observable<R>;
Performs a exclusive waiting for the first to finish before subscribing to another observable. Observables that come in between subscriptions will be dropped on the floor. Can be applied on
Observable<Observable<R>>
orObservable<IPromise<R>>
. 2.2.28Returns
A exclusive observable with only the results that happen when subscribed.
method exclusiveMap
exclusiveMap: <I, R>( selector: (value: I, index: number, source: Observable<I>) => R, thisArg?: any) => Observable<R>;
Performs a exclusive map waiting for the first to finish before subscribing to another observable. Observables that come in between subscriptions will be dropped on the floor. Can be applied on
Observable<Observable<I>>
orObservable<IPromise<I>>
. 2.2.28Parameter selector
Selector to invoke for every item in the current subscription.
Parameter thisArg
An optional context to invoke with the selector parameter.
Returns
An exclusive observable with only the results that happen when subscribed.
method filter
filter: ( predicate: (value: T, index: number, source: Observable<T>) => boolean, thisArg?: any) => Observable<T>;
method finally
finally: (action: () => void) => Observable<T>;
method finallyAction
finallyAction: (action: () => void) => Observable<T>;
method flatMap
flatMap: { <TOther, TResult>( selector: (value: T) => Observable<TOther>, resultSelector: (item: T, other: TOther) => TResult ): Observable<TResult>; <TOther, TResult>( selector: (value: T) => IPromise<TOther>, resultSelector: (item: T, other: TOther) => TResult ): Observable<TResult>; <TResult>(selector: (value: T) => Observable<TResult>): Observable<TResult>; <TResult>(selector: (value: T) => IPromise<TResult>): Observable<TResult>; <TResult>(other: Observable<TResult>): Observable<TResult>; <TResult>(other: IPromise<TResult>): Observable<TResult>; <TResult>(selector: (value: T) => TResult[]): Observable<TResult>;};
method flatMapLatest
flatMapLatest: <TResult>( selector: ( value: T, index: number, source: Observable<T> ) => Observable<TResult>, thisArg?: any) => Observable<TResult>;
Projects each element of an observable sequence into a new sequence of observable sequences by incorporating the element's index and then transforms an observable sequence of observable sequences into an observable sequence producing values only from the most recent observable sequence.
Parameter selector
A transform function to apply to each source element; the second parameter of the function represents the index of the source element.
Parameter thisArg
Object to use as this when executing callback.
Returns
An observable sequence whose elements are the result of invoking the transform function on each element of source producing an Observable of Observable sequences and that at any point in time produces the elements of the most recent inner observable sequence that has been received.
method flatMapObserver
flatMapObserver: <T2, T3, T4>( onNext: (value: T, index: number) => Observable<T2>, onError: (exception: any) => Observable<T3>, onCompleted: () => Observable<T4>, thisArg?: any) => Observable<T2 | T3 | T4>;
Projects each notification of an observable sequence to an observable sequence and merges the resulting observable sequences into one observable sequence.
Parameter onNext
A transform function to apply to each element; the second parameter of the function represents the index of the source element.
Parameter onError
A transform function to apply when an error occurs in the source sequence.
Parameter onCompleted
A transform function to apply when the end of the source sequence is reached.
Parameter thisArg
An optional "this" to use to invoke each transform.
Returns
An observable sequence whose elements are the result of invoking the one-to-many transform function corresponding to each notification in the input sequence.
method forEach
forEach: ( onNext?: (value: T) => void, onError?: (exception: any) => void, onCompleted?: () => void) => IDisposable;
method ignoreElements
ignoreElements: () => Observable<T>;
method map
map: <TResult>( selector: (value: T, index: number, source: Observable<T>) => TResult, thisArg?: any) => Observable<TResult>;
method materialize
materialize: () => Observable<Notification<T>>;
method merge
merge: { (maxConcurrent: number): T; (other: Observable<T>): Observable<T>; (other: IPromise<T>): Observable<T>;};
method mergeAll
mergeAll: () => T;
method mergeObservable
mergeObservable: () => T;
method pluck
pluck: <TResult>(prop: string) => Observable<TResult>;
method publish
publish: () => ConnectableObservable<T>;
method repeat
repeat: (repeatCount?: number) => Observable<T>;
method retry
retry: (retryCount?: number) => Observable<T>;
method retryWhen
retryWhen: <TError>( notifier: (errors: Observable<TError>) => Observable<any>) => Observable<T>;
method scan
scan: { <TAcc>( accumulator: ( acc: TAcc, value: T, index?: number, source?: Observable<TAcc> ) => TAcc, seed: TAcc ): Observable<TAcc>; ( accumulator: ( acc: T, value: T, index?: number, source?: Observable<T> ) => T ): Observable<T>;};
Applies an accumulator function over an observable sequence and returns each intermediate result. The optional seed value is used as the initial accumulator value. For aggregation behavior with no intermediate results, see Observable.aggregate.
Parameter accumulator
An accumulator function to be invoked on each element.
Parameter seed
The initial accumulator value.
Returns
An observable sequence containing the accumulated values.
Example 1
var res = source.scan(function (acc, x) { return acc + x; }); var res = source.scan(function (acc, x) { return acc + x; }, 0);
method select
select: <TResult>( selector: (value: T, index: number, source: Observable<T>) => TResult, thisArg?: any) => Observable<TResult>;
method selectConcat
selectConcat: { <T2, R>( selector: (value: T, index: number) => Observable<T2>, resultSelector: (value1: T, value2: T2, index: number) => R ): Observable<R>; <T2, R>( selector: (value: T, index: number) => IPromise<T2>, resultSelector: (value1: T, value2: T2, index: number) => R ): Observable<R>; <R>(selector: (value: T, index: number) => Observable<R>): Observable<R>; <R>(selector: (value: T, index: number) => IPromise<R>): Observable<R>; <R>(sequence: Observable<R>): Observable<R>;};
method selectMany
selectMany: { <TOther, TResult>( selector: (value: T) => Observable<TOther>, resultSelector: (item: T, other: TOther) => TResult ): Observable<TResult>; <TOther, TResult>( selector: (value: T) => IPromise<TOther>, resultSelector: (item: T, other: TOther) => TResult ): Observable<TResult>; <TResult>(selector: (value: T) => Observable<TResult>): Observable<TResult>; <TResult>(selector: (value: T) => IPromise<TResult>): Observable<TResult>; <TResult>(other: Observable<TResult>): Observable<TResult>; <TResult>(other: IPromise<TResult>): Observable<TResult>; <TResult>(selector: (value: T) => TResult[]): Observable<TResult>;};
method selectManyObserver
selectManyObserver: <T2, T3, T4>( onNext: (value: T, index: number) => Observable<T2>, onError: (exception: any) => Observable<T3>, onCompleted: () => Observable<T4>, thisArg?: any) => Observable<T2 | T3 | T4>;
Projects each notification of an observable sequence to an observable sequence and merges the resulting observable sequences into one observable sequence.
Parameter onNext
A transform function to apply to each element; the second parameter of the function represents the index of the source element.
Parameter onError
A transform function to apply when an error occurs in the source sequence.
Parameter onCompleted
A transform function to apply when the end of the source sequence is reached.
Parameter thisArg
An optional "this" to use to invoke each transform.
Returns
An observable sequence whose elements are the result of invoking the one-to-many transform function corresponding to each notification in the input sequence.
method selectSwitch
selectSwitch: <TResult>( selector: ( value: T, index: number, source: Observable<T> ) => Observable<TResult>, thisArg?: any) => Observable<TResult>;
Projects each element of an observable sequence into a new sequence of observable sequences by incorporating the element's index and then transforms an observable sequence of observable sequences into an observable sequence producing values only from the most recent observable sequence.
Parameter selector
A transform function to apply to each source element; the second parameter of the function represents the index of the source element.
Parameter thisArg
Object to use as this when executing callback.
Returns
An observable sequence whose elements are the result of invoking the transform function on each element of source producing an Observable of Observable sequences and that at any point in time produces the elements of the most recent inner observable sequence that has been received.
method skip
skip: (count: number) => Observable<T>;
method skipLast
skipLast: (count: number) => Observable<T>;
method skipUntil
skipUntil: { <T2>(other: Observable<T2>): Observable<T>; <T2>(other: IPromise<T2>): Observable<T>;};
method skipWhile
skipWhile: ( predicate: (value: T, index: number, source: Observable<T>) => boolean, thisArg?: any) => Observable<T>;
method startWith
startWith: { (...values: T[]): Observable<T>; (scheduler: IScheduler, ...values: T[]): Observable<T>;};
method switch
switch: () => T;
method switchLatest
switchLatest: () => T;
method switchMap
switchMap: <TResult>( selector: (value: T, index: number, source: Observable<T>) => TResult, thisArg?: any) => Observable<TResult>;
Projects each element of an observable sequence into a new sequence of observable sequences by incorporating the element's index and then transforms an observable sequence of observable sequences into an observable sequence producing values only from the most recent observable sequence.
Parameter selector
A transform function to apply to each source element; the second parameter of the function represents the index of the source element.
Parameter thisArg
Object to use as this when executing callback. 2.2.28
Returns
An observable sequence whose elements are the result of invoking the transform function on each element of source producing an Observable of Observable sequences and that at any point in time produces the elements of the most recent inner observable sequence that has been received.
method take
take: (count: number, scheduler?: IScheduler) => Observable<T>;
method takeLast
takeLast: (count: number) => Observable<T>;
method takeLastBuffer
takeLastBuffer: (count: number) => Observable<T[]>;
method takeUntil
takeUntil: { <T2>(other: Observable<T2>): Observable<T>; <T2>(other: IPromise<T2>): Observable<T>;};
method takeWhile
takeWhile: ( predicate: (value: T, index: number, source: Observable<T>) => boolean, thisArg?: any) => Observable<T>;
method tap
tap: { (observer: Observer<T>): Observable<T>; ( onNext?: (value: T) => void, onError?: (exception: Error) => void, onCompleted?: () => void ): Observable<T>;};
method tapOnCompleted
tapOnCompleted: (onCompleted: () => void, thisArg?: any) => Observable<T>;
method tapOnError
tapOnError: (onError: (exception: any) => void, thisArg?: any) => Observable<T>;
method tapOnNext
tapOnNext: (onNext: (value: T) => void, thisArg?: any) => Observable<T>;
method toArray
toArray: () => Observable<T[]>;
method toPromise
toPromise: { <TPromise extends IPromise<T>>( promiseCtor: new ( resolver: ( resolvePromise: (value: T) => void, rejectPromise: (reason: any) => void ) => void ) => TPromise ): TPromise; ( promiseCtor?: new ( resolver: ( resolvePromise: (value: T) => void, rejectPromise: (reason: any) => void ) => void ) => IPromise<T> ): IPromise<T>;};
Converts an existing observable sequence to an ES6 Compatible Promise
Parameter promiseCtor
The constructor of the promise.
Returns
An ES6 compatible promise with the last value from the observable sequence.
Example 1
var promise = Rx.Observable.return(42).toPromise(RSVP.Promise);
Converts an existing observable sequence to an ES6 Compatible Promise
Parameter promiseCtor
The constructor of the promise. If not provided, it looks for it in Rx.config.Promise.
Returns
An ES6 compatible promise with the last value from the observable sequence.
Example 1
var promise = Rx.Observable.return(42).toPromise(RSVP.Promise);
// With config Rx.config.Promise = RSVP.Promise; var promise = Rx.Observable.return(42).toPromise();
method where
where: ( predicate: (value: T, index: number, source: Observable<T>) => boolean, thisArg?: any) => Observable<T>;
method withLatestFrom
withLatestFrom: { <T2>(second: Observable<T2> | IPromise<T2>): Observable<[T, T2]>; <T2, TResult>( second: any, resultSelector: (v1: T, v2: T2) => TResult ): Observable<TResult>; <T2, T3>(second: any, third: any): Observable<[T, T2, T3]>; <T2, T3, TResult>( second: any, third: any, resultSelector: (v1: T, v2: T2, v3: T3) => TResult ): Observable<TResult>; <T2, T3, T4>(second: any, third: any, fourth: any): Observable< [T, T2, T3, T4] >; <T2, T3, T4, TResult>( second: any, third: any, fourth: any, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult ): Observable<TResult>; <T2, T3, T4, T5>( second: any, third: any, fourth: any, fifth: any ): Observable<[T, T2, T3, T4, T5]>; <T2, T3, T4, T5, TResult>( second: any, third: any, fourth: any, fifth: any, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4, v5: T5) => TResult ): Observable<TResult>; <TOther, TResult>( souces: any[], resultSelector: (firstValue: T, ...otherValues: TOther[]) => TResult ): Observable<TResult>;};
method zip
zip: { <T2>(second: Observable<T2> | IPromise<T2>): Observable<[T, T2]>; <T2, TResult>( second: any, resultSelector: (v1: T, v2: T2) => TResult ): Observable<TResult>; <T2, T3>(second: any, third: any): Observable<[T, T2, T3]>; <T2, T3, TResult>( second: any, third: any, resultSelector: (v1: T, v2: T2, v3: T3) => TResult ): Observable<TResult>; <T2, T3, T4>(second: any, third: any, fourth: any): Observable< [T, T2, T3, T4] >; <T2, T3, T4, TResult>( second: any, third: any, fourth: any, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult ): Observable<TResult>; <T2, T3, T4, T5>( second: any, third: any, fourth: any, fifth: any ): Observable<[T, T2, T3, T4, T5]>; <T2, T3, T4, T5, TResult>( second: any, third: any, fourth: any, fifth: any, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4, v5: T5) => TResult ): Observable<TResult>; <TOther, TResult>( second: any[], resultSelector: (left: T, ...right: TOther[]) => TResult ): Observable<TResult>;};
interface Observable
interface Observable<T> {}
method debounce
debounce: (dueTime: number, scheduler?: IScheduler) => Observable<T>;
method delay
delay: { (dueTime: Date, scheduler?: IScheduler): Observable<T>; (dueTime: number, scheduler?: IScheduler): Observable<T>;};
method sample
sample: { (interval: number, scheduler?: IScheduler): Observable<T>; <TSample>( sampler: Observable<TSample>, scheduler?: IScheduler ): Observable<T>;};
method throttle
throttle: (dueTime: number, scheduler?: IScheduler) => Observable<T>;
Deprecated
use #debounce or #throttleWithTimeout instead.
method throttleWithTimeout
throttleWithTimeout: (dueTime: number, scheduler?: IScheduler) => Observable<T>;
method timeInterval
timeInterval: (scheduler?: IScheduler) => Observable<TimeInterval<T>>;
method timeout
timeout: { ( dueTime: Date, other?: Observable<T>, scheduler?: IScheduler ): Observable<T>; ( dueTime: number, other?: Observable<T>, scheduler?: IScheduler ): Observable<T>;};
method timestamp
timestamp: (scheduler?: IScheduler) => Observable<Timestamp<T>>;
interface ObservableStatic
interface ObservableStatic {}
property prototype
prototype: any;
method catch
catch: { <T>(sources: Array<IPromise<T>> | Array<Observable<T>>): Observable<T>; <T>(...sources: Observable<T>[]): Observable<T>; <T>(...sources: IPromise<T>[]): Observable<T>;};
method catchError
catchError: { <T>(sources: Array<IPromise<T>> | Array<Observable<T>>): Observable<T>; <T>(...sources: Observable<T>[]): Observable<T>; <T>(...sources: IPromise<T>[]): Observable<T>;};
method catchException
catchException: { <T>(sources: Array<IPromise<T>> | Array<Observable<T>>): Observable<T>; <T>(...sources: Observable<T>[]): Observable<T>; <T>(...sources: IPromise<T>[]): Observable<T>;};
method combineLatest
combineLatest: { <T, T2>( first: Observable<T> | IPromise<T>, second: Observable<T2> | IPromise<T2> ): Observable<[T, T2]>; <T, T2, TResult>( first: any, second: any, resultSelector: (v1: T, v2: T2) => TResult ): Observable<TResult>; <T, T2, T3>(first: any, second: any, third: any): Observable<[T, T2, T3]>; <T, T2, T3, TResult>( first: any, second: any, third: any, resultSelector: (v1: T, v2: T2, v3: T3) => TResult ): Observable<TResult>; <T, T2, T3, T4>( first: any, second: any, third: any, fourth: any ): Observable<[T, T2, T3, T4]>; <T, T2, T3, T4, TResult>( first: any, second: any, third: any, fourth: any, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult ): Observable<TResult>; <T, T2, T3, T4, T5>( first: any, second: any, third: any, fourth: any, fifth: any ): Observable<[T, T2, T3, T4, T5]>; <T, T2, T3, T4, T5, TResult>( first: any, second: any, third: any, fourth: any, fifth: any, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4, v5: T5) => TResult ): Observable<TResult>; <T>(sources: any[]): Observable<T[]>; <TOther, TResult>( sources: any[], resultSelector: (...otherValues: TOther[]) => TResult ): Observable<TResult>;};
method concat
concat: { <T>(...sources: Array<Observable<T>>): Observable<T>; <T>(...sources: IPromise<T>[]): Observable<T>; <T>(sources: IPromise<T>[] | Observable<T>[]): Observable<T>;};
method create
create: { <T>(subscribe: (observer: Observer<T>) => IDisposable): Observable<T>; <T>(subscribe: (observer: Observer<T>) => () => void): Observable<T>; <T>(subscribe: (observer: Observer<T>) => void): Observable<T>;};
method createWithDisposable
createWithDisposable: <T>( subscribe: (observer: Observer<T>) => IDisposable) => Observable<T>;
method defer
defer: { <T>(observableFactory: () => Observable<T>): Observable<T>; <T>(observableFactory: () => IPromise<T>): Observable<T>;};
method empty
empty: <T>(scheduler?: IScheduler) => Observable<T>;
method from
from: { <T, TResult>( array: T[], mapFn: (value: T, index: number) => TResult, thisArg?: any, scheduler?: IScheduler ): Observable<TResult>; <T>( array: T[], mapFn?: (value: T, index: number) => T, thisArg?: any, scheduler?: IScheduler ): Observable<T>; <T, TResult>( array: { [index: number]: T; length: number }, mapFn: (value: T, index: number) => TResult, thisArg?: any, scheduler?: IScheduler ): Observable<TResult>; <T>( array: { [index: number]: T; length: number }, mapFn?: (value: T, index: number) => T, thisArg?: any, scheduler?: IScheduler ): Observable<T>; <T>( iterable: any, mapFn?: (value: any, index: number) => T, thisArg?: any, scheduler?: IScheduler ): Observable<T>;};
This method creates a new Observable sequence from an array object.
Parameter array
An array-like or iterable object to convert to an Observable sequence.
Parameter mapFn
Map function to call on every element of the array.
Parameter thisArg
The context to use calling the mapFn if provided.
Parameter scheduler
Optional scheduler to use for scheduling. If not provided, defaults to Scheduler.currentThread.
This method creates a new Observable sequence from an array object.
Parameter array
An array-like or iterable object to convert to an Observable sequence.
Parameter mapFn
Map function to call on every element of the array.
Parameter thisArg
The context to use calling the mapFn if provided.
Parameter scheduler
Optional scheduler to use for scheduling. If not provided, defaults to Scheduler.currentThread.
This method creates a new Observable sequence from an array-like object.
Parameter array
An array-like or iterable object to convert to an Observable sequence.
Parameter mapFn
Map function to call on every element of the array.
Parameter thisArg
The context to use calling the mapFn if provided.
Parameter scheduler
Optional scheduler to use for scheduling. If not provided, defaults to Scheduler.currentThread.
This method creates a new Observable sequence from an array-like object.
Parameter array
An array-like or iterable object to convert to an Observable sequence.
Parameter mapFn
Map function to call on every element of the array.
Parameter thisArg
The context to use calling the mapFn if provided.
Parameter scheduler
Optional scheduler to use for scheduling. If not provided, defaults to Scheduler.currentThread.
This method creates a new Observable sequence from an array-like or iterable object.
Parameter array
An array-like or iterable object to convert to an Observable sequence.
Parameter mapFn
Map function to call on every element of the array.
Parameter thisArg
The context to use calling the mapFn if provided.
Parameter scheduler
Optional scheduler to use for scheduling. If not provided, defaults to Scheduler.currentThread.
method fromArray
fromArray: { <T>(array: T[], scheduler?: IScheduler): Observable<T>; <T>( array: { [index: number]: T; length: number }, scheduler?: IScheduler ): Observable<T>;};
method fromPromise
fromPromise: <T>(promise: IPromise<T>) => Observable<T>;
Converts a Promise to an Observable sequence
Parameter promise
An ES6 Compliant promise.
Returns
An Observable sequence which wraps the existing promise success and failure.
method generate
generate: <TState, TResult>( initialState: TState, condition: (state: TState) => boolean, iterate: (state: TState) => TState, resultSelector: (state: TState) => TResult, scheduler?: IScheduler) => Observable<TResult>;
method just
just: <T>(value: T, scheduler?: IScheduler) => Observable<T>;
2.2.28
method merge
merge: { <T>(...sources: Array<Observable<T>>): Observable<T>; <T>(...sources: IPromise<T>[]): Observable<T>; <T>(sources: IPromise<T>[] | Observable<T>[]): Observable<T>; <T>(scheduler: IScheduler, ...sources: Observable<T>[]): Observable<T>; <T>(scheduler: IScheduler, ...sources: IPromise<T>[]): Observable<T>; <T>( scheduler: IScheduler, sources: IPromise<T>[] | Observable<T>[] ): Observable<T>;};
method never
never: <T>() => Observable<T>;
method of
of: <T>(...values: T[]) => Observable<T>;
This method creates a new Observable instance with a variable number of arguments, regardless of number or type of the arguments.
Returns
The observable sequence whose elements are pulled from the given arguments.
Example 1
var res = Rx.Observable.of(1, 2, 3); 2.2.28
method ofWithScheduler
ofWithScheduler: <T>(scheduler?: IScheduler, ...values: T[]) => Observable<T>;
This method creates a new Observable instance with a variable number of arguments, regardless of number or type of the arguments.
Parameter scheduler
A scheduler to use for scheduling the arguments.
Returns
The observable sequence whose elements are pulled from the given arguments.
Example 1
var res = Rx.Observable.ofWithScheduler(Rx.Scheduler.timeout, 1, 2, 3); 2.2.28
method pairs
pairs: <T>( obj: { [key: string]: T }, scheduler?: IScheduler) => Observable<[string, T]>;
method range
range: ( start: number, count: number, scheduler?: IScheduler) => Observable<number>;
method repeat
repeat: <T>( value: T, repeatCount?: number, scheduler?: IScheduler) => Observable<T>;
method return
return: <T>(value: T, scheduler?: IScheduler) => Observable<T>;
method returnValue
returnValue: <T>(value: T, scheduler?: IScheduler) => Observable<T>;
method throw
throw: <T>(exception: Error, scheduler?: IScheduler) => Observable<T>;
method throwError
throwError: <T>(error: Error, scheduler?: IScheduler) => Observable<T>;
method throwException
throwException: <T>(exception: Error, scheduler?: IScheduler) => Observable<T>;
method withLatestFrom
withLatestFrom: { <T, T2>( first: Observable<T> | IPromise<T>, second: Observable<T2> | IPromise<T2> ): Observable<[T, T2]>; <T, T2, TResult>( first: any, second: any, resultSelector: (v1: T, v2: T2) => TResult ): Observable<TResult>; <T, T2, T3>(first: any, second: any, third: any): Observable<[T, T2, T3]>; <T, T2, T3, TResult>( first: any, second: any, third: any, resultSelector: (v1: T, v2: T2, v3: T3) => TResult ): Observable<TResult>; <T, T2, T3, T4>( first: any, second: any, third: any, fourth: any ): Observable<[T, T2, T3, T4]>; <T, T2, T3, T4, TResult>( first: any, second: any, third: any, fourth: any, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult ): Observable<TResult>; <T, T2, T3, T4, T5>( first: any, second: any, third: any, fourth: any, fifth: any ): Observable<[T, T2, T3, T4, T5]>; <T, T2, T3, T4, T5, TResult>( first: any, second: any, third: any, fourth: any, fifth: any, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4, v5: T5) => TResult ): Observable<TResult>; <TOther, TResult>( souces: any[], resultSelector: (...otherValues: TOther[]) => TResult ): Observable<TResult>;};
method zip
zip: { <T1, T2>( first: Observable<T1> | IPromise<T1>, sources: | Observable<T2> | IPromise<T2> | Array<Observable<T2> | IPromise<T2>> ): Observable<[T1, T2]>; <T1, T2, TResult>( first: any, sources: any[], resultSelector: (item1: T1, ...right: T2[]) => TResult ): Observable<TResult>; <T1, T2, TResult>( source1: any, source2: any, resultSelector: (item1: T1, item2: T2) => TResult ): Observable<TResult>; <T1, T2, T3>(source1: any, source2: any, source3: any): Observable< [T1, T2, T3] >; <T1, T2, T3, TResult>( source1: any, source2: any, source3: any, resultSelector: (item1: T1, item2: T2, item3: T3) => TResult ): Observable<TResult>; <T1, T2, T3, T4>( source1: any, source2: any, source3: any, source4: any ): Observable<[T1, T2, T3, T4]>; <T1, T2, T3, T4, TResult>( source1: any, source2: any, source3: any, source4: any, resultSelector: (item1: T1, item2: T2, item3: T3, item4: T4) => TResult ): Observable<TResult>; <T1, T2, T3, T4, T5>( source1: any, source2: any, source3: any, source4: any, source5: any ): Observable<[T1, T2, T3, T4, T5]>; <T1, T2, T3, T4, T5, TResult>( source1: any, source2: any, source3: any, source4: any, source5: any, resultSelector: ( item1: T1, item2: T2, item3: T3, item4: T4, item5: T5 ) => TResult ): Observable<TResult>;};
method zipArray
zipArray: { <T>(...sources: Array<Observable<T> | IPromise<T>>): Observable<T[]>; <T>(sources: any[]): Observable<T[]>;};
interface ObservableStatic
interface ObservableStatic {}
property fromCallback
fromCallback: { // with single result callback without selector <TResult>( func: (callback: (result: TResult) => any) => any, context?: any ): () => Observable<TResult>; <T1, TResult>( func: (arg1: T1, callback: (result: TResult) => any) => any, context?: any ): (arg1: T1) => Observable<TResult>; <T1, T2, TResult>( func: (arg1: T1, arg2: T2, callback: (result: TResult) => any) => any, context?: any ): (arg1: T1, arg2: T2) => Observable<TResult>; <T1, T2, T3, TResult>( func: ( arg1: T1, arg2: T2, arg3: T3, callback: (result: TResult) => any ) => any, context?: any ): (arg1: T1, arg2: T2, arg3: T3) => Observable<TResult>; // with any callback with selector <TCallbackResult, TResult>( func: (callback: Function) => any, context: any, selector: (args: TCallbackResult[]) => TResult ): () => Observable<TResult>; <T1, TCallbackResult, TResult>( func: (arg1: T1, callback: Function) => any, context: any, selector: (args: TCallbackResult[]) => TResult ): (arg1: T1) => Observable<TResult>; <T1, T2, TCallbackResult, TResult>( func: (arg1: T1, arg2: T2, callback: Function) => any, context: any, selector: (args: TCallbackResult[]) => TResult ): (arg1: T1, arg2: T2) => Observable<TResult>; <T1, T2, T3, TCallbackResult, TResult>( func: (arg1: T1, arg2: T2, arg3: T3, callback: Function) => any, context: any, selector: (args: TCallbackResult[]) => TResult ): (arg1: T1, arg2: T2, arg3: T3) => Observable<TResult>; // with any callback without selector <TResult>( func: (callback: Function) => any, context?: any ): () => Observable<TResult>; <T1, TResult>(func: (arg1: T1, callback: Function) => any, context?: any): ( arg1: T1 ) => Observable<TResult>; <T1, T2, TResult>( func: (arg1: T1, arg2: T2, callback: Function) => any, context?: any ): (arg1: T1, arg2: T2) => Observable<TResult>; <T1, T2, T3, TResult>( func: (arg1: T1, arg2: T2, arg3: T3, callback: Function) => any, context?: any ): (arg1: T1, arg2: T2, arg3: T3) => Observable<TResult>; // with any function with selector <TCallbackResult, TResult>( func: Function, context: any, selector: (args: TCallbackResult[]) => TResult ): (...args: any[]) => Observable<TResult>; // with any function without selector <TResult>(func: Function, context?: any): ( ...args: any[] ) => Observable<TResult>;};
property fromNodeCallback
fromNodeCallback: { // with single result callback without selector <T>( func: (callback: (err: any, result: T) => any) => any, context?: any ): () => Observable<T>; <T1, T>( func: (arg1: T1, callback: (err: any, result: T) => any) => any, context?: any ): (arg1: T1) => Observable<T>; <T1, T2, T>( func: ( arg1: T1, arg2: T2, callback: (err: any, result: T) => any ) => any, context?: any ): (arg1: T1, arg2: T2) => Observable<T>; <T1, T2, T3, T>( func: ( arg1: T1, arg2: T2, arg3: T3, callback: (err: any, result: T) => any ) => any, context?: any ): (arg1: T1, arg2: T2, arg3: T3) => Observable<T>; // with any callback with selector <TC, TR>( func: (callback: Function) => any, context: any, selector: (results: TC[]) => TR ): () => Observable<TR>; <T1, TC, TR>( func: (arg1: T1, callback: Function) => any, context: any, selector: (results: TC[]) => TR ): (arg1: T1) => Observable<TR>; <T1, T2, TC, TR>( func: (arg1: T1, arg2: T2, callback: Function) => any, context: any, selector: (results: TC[]) => TR ): (arg1: T1, arg2: T2) => Observable<TR>; <T1, T2, T3, TC, TR>( func: (arg1: T1, arg2: T2, arg3: T3, callback: Function) => any, context: any, selector: (results: TC[]) => TR ): (arg1: T1, arg2: T2, arg3: T3) => Observable<TR>; // with any callback without selector <TR>(func: (callback: Function) => any, context?: any): () => Observable<TR>; <T1, TR>(func: (arg1: T1, callback: Function) => any, context?: any): ( arg1: T1 ) => Observable<TR>; <T1, T2, TR>( func: (arg1: T1, arg2: T2, callback: Function) => any, context?: any ): (arg1: T1, arg2: T2) => Observable<TR>; <T1, T2, T3, TR>( func: (arg1: T1, arg2: T2, arg3: T3, callback: Function) => any, context?: any ): (arg1: T1, arg2: T2, arg3: T3) => Observable<TR>; // with any function with selector <TC, T>(func: Function, context: any, selector: (results: TC[]) => T): ( ...args: any[] ) => Observable<T>; // with any function without selector <T>(func: Function, context?: any): (...args: any[]) => Observable<T>;};
method fromEvent
fromEvent: <T>( element: | ArrayLike<DOMEventTarget> | DOMEventTarget | NodeEventTarget | NativeEventTarget, eventName: string, selector?: (...args: any[]) => T) => Observable<T>;
method fromEventPattern
fromEventPattern: <T>( addHandler: (handler: Function) => void, removeHandler: (handler: Function) => void, selector?: (...args: any[]) => T) => Observable<T>;
interface ObservableStatic
interface ObservableStatic {}
method interval
interval: { (period: number, scheduler?: IScheduler): Observable<number>; ( dutTime: number, period: number, scheduler?: IScheduler ): Observable<number>;};
method timer
timer: { ( dueTime: number, period: number, scheduler?: IScheduler ): Observable<number>; (dueTime: number, scheduler?: IScheduler): Observable<number>;};
interface Observer
interface Observer<T> extends IObserver<T> {}
method asObserver
asObserver: () => Observer<T>;
method toNotifier
toNotifier: () => (notification: Notification<T>) => void;
interface ObserverStatic
interface ObserverStatic {}
method create
create: <T>( onNext?: (value: T) => void, onError?: (exception: any) => void, onCompleted?: () => void) => Observer<T>;
method fromNotifier
fromNotifier: <T>( handler: (notification: Notification<T>, thisArg?: any) => void) => Observer<T>;
interface Scheduler
interface Scheduler extends IScheduler {}
interface SchedulerStatic
interface SchedulerStatic {}
property currentThread
currentThread: ICurrentThreadScheduler;
property default
default: IScheduler;
property immediate
immediate: IScheduler;
property timeout
timeout: IScheduler;
method normalize
normalize: (timeSpan: number) => number;
construct signature
new ( now: () => number, schedule: ( state: any, action: (scheduler: IScheduler, state: any) => IDisposable ) => IDisposable, scheduleRelative: ( state: any, dueTime: number, action: (scheduler: IScheduler, state: any) => IDisposable ) => IDisposable, scheduleAbsolute: ( state: any, dueTime: number, action: (scheduler: IScheduler, state: any) => IDisposable ) => IDisposable): Scheduler;
interface TimeInterval
interface TimeInterval<T> {}
namespace rx-lite
module 'rx-lite' {}
variable Observable
const Observable: ObservableStatic;
variable Observer
const Observer: ObserverStatic;
variable Scheduler
const Scheduler: SchedulerStatic;
class CompositeDisposable
class CompositeDisposable implements IDisposable {}
constructor
constructor(...disposables: IDisposable[]);
constructor
constructor(disposables: IDisposable[]);
property isDisposed
isDisposed: boolean;
property length
length: number;
method add
add: (item: IDisposable) => void;
method dispose
dispose: () => void;
method remove
remove: (item: IDisposable) => boolean;
method toArray
toArray: () => IDisposable[];
class Disposable
class Disposable implements IDisposable {}
constructor
constructor(action: () => void);
property empty
static empty: IDisposable;
method create
static create: (action: () => void) => IDisposable;
method dispose
dispose: () => void;
class Notification
class Notification<T> {}
property exception
exception: any;
property hasValue
hasValue: boolean;
property kind
kind: string;
property value
value: {};
method accept
accept: { (observer: IObserver<T>): void; <TResult>( onNext: (value: T) => TResult, onError?: (exception: any) => TResult, onCompleted?: () => TResult ): TResult;};
method createOnCompleted
static createOnCompleted: <T>() => Notification<T>;
method createOnError
static createOnError: <T>(exception: any) => Notification<T>;
method createOnNext
static createOnNext: <T>(value: T) => Notification<T>;
method equals
equals: (other: Notification<T>) => boolean;
method toObservable
toObservable: (scheduler?: IScheduler) => Observable<T>;
class RefCountDisposable
class RefCountDisposable implements IDisposable {}
constructor
constructor(disposable: IDisposable);
property isDisposed
isDisposed: boolean;
method dispose
dispose: () => void;
method getDisposable
getDisposable: () => IDisposable;
class SerialDisposable
class SerialDisposable extends SingleAssignmentDisposable {}
constructor
constructor();
class SingleAssignmentDisposable
class SingleAssignmentDisposable implements IDisposable {}
constructor
constructor();
property current
current: IDisposable;
property isDisposed
isDisposed: boolean;
method dispose
dispose: () => void;
method getDisposable
getDisposable: () => IDisposable;
method setDisposable
setDisposable: (value: IDisposable) => void;
interface ConnectableObservable
interface ConnectableObservable<T> extends Observable<T> {}
method connect
connect: () => Disposable;
interface DOMEventTarget
interface DOMEventTarget {}
method addEventListener
addEventListener: ( type: string, listener: (e: any) => any, useCapture: boolean) => void;
method removeEventListener
removeEventListener: ( type: string, listener: (e: any) => any, useCapture: boolean) => void;
interface ICurrentThreadScheduler
interface ICurrentThreadScheduler extends IScheduler {}
method scheduleRequired
scheduleRequired: () => boolean;
interface IObservable
interface IObservable<T> {}
method subscribe
subscribe: { (observer: Observer<T>): IDisposable; ( onNext?: (value: T) => void, onError?: (exception: any) => void, onCompleted?: () => void ): IDisposable;};
method subscribeOnCompleted
subscribeOnCompleted: (onCompleted: () => void, thisArg?: any) => IDisposable;
method subscribeOnError
subscribeOnError: ( onError: (exception: any) => void, thisArg?: any) => IDisposable;
method subscribeOnNext
subscribeOnNext: (onNext: (value: T) => void, thisArg?: any) => IDisposable;
interface IObserver
interface IObserver<T> {}
method onCompleted
onCompleted: () => void;
method onError
onError: (exception: any) => void;
method onNext
onNext: (value: T) => void;
interface IScheduler
interface IScheduler {}
method isScheduler
isScheduler: (value: any) => boolean;
method now
now: () => number;
method schedule
schedule: (action: () => void) => IDisposable;
method schedulePeriodic
schedulePeriodic: (period: number, action: () => void) => IDisposable;
method schedulePeriodicWithState
schedulePeriodicWithState: <TState>( state: TState, period: number, action: (state: TState) => TState) => IDisposable;
method scheduleRecursive
scheduleRecursive: (action: (action: () => void) => void) => IDisposable;
method scheduleRecursiveWithAbsolute
scheduleRecursiveWithAbsolute: ( dueTime: number, action: (action: (dueTime: number) => void) => void) => IDisposable;
method scheduleRecursiveWithAbsoluteAndState
scheduleRecursiveWithAbsoluteAndState: <TState>( state: TState, dueTime: number, action: ( state: TState, action: (state: TState, dueTime: number) => void ) => void) => IDisposable;
method scheduleRecursiveWithRelative
scheduleRecursiveWithRelative: ( dueTime: number, action: (action: (dueTime: number) => void) => void) => IDisposable;
method scheduleRecursiveWithRelativeAndState
scheduleRecursiveWithRelativeAndState: <TState>( state: TState, dueTime: number, action: ( state: TState, action: (state: TState, dueTime: number) => void ) => void) => IDisposable;
method scheduleRecursiveWithState
scheduleRecursiveWithState: <TState>( state: TState, action: (state: TState, action: (state: TState) => void) => void) => IDisposable;
method scheduleWithAbsolute
scheduleWithAbsolute: (dueTime: number, action: () => void) => IDisposable;
method scheduleWithAbsoluteAndState
scheduleWithAbsoluteAndState: <TState>( state: TState, dueTime: number, action: (scheduler: IScheduler, state: TState) => IDisposable) => IDisposable;
method scheduleWithRelative
scheduleWithRelative: (dueTime: number, action: () => void) => IDisposable;
method scheduleWithRelativeAndState
scheduleWithRelativeAndState: <TState>( state: TState, dueTime: number, action: (scheduler: IScheduler, state: TState) => IDisposable) => IDisposable;
method scheduleWithState
scheduleWithState: <TState>( state: TState, action: (scheduler: IScheduler, state: TState) => IDisposable) => IDisposable;
interface NativeEventTarget
interface NativeEventTarget {}
interface NodeEventTarget
interface NodeEventTarget {}
method addListener
addListener: (name: string, cb: (e: any) => any) => void;
interface Observable
interface Observable<T> extends IObservable<T> {}
method asObservable
asObservable: () => Observable<T>;
method catch
catch: { (handler: (exception: Error) => IPromise<T> | Observable<T>): Observable<T>; (second: Observable<T>): Observable<T>;};
method catchException
catchException: { (handler: (exception: Error) => IPromise<T> | Observable<T>): Observable<T>; (second: Observable<T>): Observable<T>;};
method combineLatest
combineLatest: { <T2>(second: Observable<T2> | IPromise<T2>): Observable<[T, T2]>; <T2, TResult>( second: any, resultSelector: (v1: T, v2: T2) => TResult ): Observable<TResult>; <T2, T3>(second: any, third: any): Observable<[T, T2, T3]>; <T2, T3, TResult>( second: any, third: any, resultSelector: (v1: T, v2: T2, v3: T3) => TResult ): Observable<TResult>; <T2, T3, T4>(second: any, third: any, fourth: any): Observable< [T, T2, T3, T4] >; <T2, T3, T4, TResult>( second: any, third: any, fourth: any, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult ): Observable<TResult>; <T2, T3, T4, T5>( second: any, third: any, fourth: any, fifth: any ): Observable<[T, T2, T3, T4, T5]>; <T2, T3, T4, T5, TResult>( second: any, third: any, fourth: any, fifth: any, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4, v5: T5) => TResult ): Observable<TResult>; <TOther, TResult>( souces: any[], resultSelector: (firstValue: T, ...otherValues: TOther[]) => TResult ): Observable<TResult>;};
method concat
concat: { (...sources: Array<Observable<T> | IPromise<T>>): Observable<T>; (sources: any[]): Observable<T>;};
method concatAll
concatAll: () => T;
method concatMap
concatMap: { <T2, R>( selector: (value: T, index: number) => Observable<T2>, resultSelector: (value1: T, value2: T2, index: number) => R ): Observable<R>; <T2, R>( selector: (value: T, index: number) => IPromise<T2>, resultSelector: (value1: T, value2: T2, index: number) => R ): Observable<R>; <R>(selector: (value: T, index: number) => Observable<R>): Observable<R>; <R>(selector: (value: T, index: number) => IPromise<R>): Observable<R>; <R>(selector: (value: T, index: number) => R[]): Observable<R>; <R>(sequence: Observable<R>): Observable<R>; <R>(sequence: R[]): Observable<R>;};
method concatObservable
concatObservable: () => Observable<T>;
method dematerialize
dematerialize: <TOrigin>() => Observable<TOrigin>;
method distinctUntilChanged
distinctUntilChanged: { (skipParameter: boolean, comparer: (x: T, y: T) => boolean): Observable<T>; <TValue>( keySelector?: (value: T) => TValue, comparer?: (x: TValue, y: TValue) => boolean ): Observable<T>;};
method do
do: { (observer: Observer<T>): Observable<T>; ( onNext?: (value: T) => void, onError?: (exception: Error) => void, onCompleted?: () => void ): Observable<T>;};
method doAction
doAction: { (observer: Observer<T>): Observable<T>; ( onNext?: (value: T) => void, onError?: (exception: Error) => void, onCompleted?: () => void ): Observable<T>;};
method doOnCompleted
doOnCompleted: (onCompleted: () => void, thisArg?: any) => Observable<T>;
method doOnError
doOnError: (onError: (exception: any) => void, thisArg?: any) => Observable<T>;
method doOnNext
doOnNext: (onNext: (value: T) => void, thisArg?: any) => Observable<T>;
method exclusive
exclusive: <R>() => Observable<R>;
Performs a exclusive waiting for the first to finish before subscribing to another observable. Observables that come in between subscriptions will be dropped on the floor. Can be applied on
Observable<Observable<R>>
orObservable<IPromise<R>>
. 2.2.28Returns
A exclusive observable with only the results that happen when subscribed.
method exclusiveMap
exclusiveMap: <I, R>( selector: (value: I, index: number, source: Observable<I>) => R, thisArg?: any) => Observable<R>;
Performs a exclusive map waiting for the first to finish before subscribing to another observable. Observables that come in between subscriptions will be dropped on the floor. Can be applied on
Observable<Observable<I>>
orObservable<IPromise<I>>
. 2.2.28Parameter selector
Selector to invoke for every item in the current subscription.
Parameter thisArg
An optional context to invoke with the selector parameter.
Returns
An exclusive observable with only the results that happen when subscribed.
method filter
filter: ( predicate: (value: T, index: number, source: Observable<T>) => boolean, thisArg?: any) => Observable<T>;
method finally
finally: (action: () => void) => Observable<T>;
method finallyAction
finallyAction: (action: () => void) => Observable<T>;
method flatMap
flatMap: { <TOther, TResult>( selector: (value: T) => Observable<TOther>, resultSelector: (item: T, other: TOther) => TResult ): Observable<TResult>; <TOther, TResult>( selector: (value: T) => IPromise<TOther>, resultSelector: (item: T, other: TOther) => TResult ): Observable<TResult>; <TResult>(selector: (value: T) => Observable<TResult>): Observable<TResult>; <TResult>(selector: (value: T) => IPromise<TResult>): Observable<TResult>; <TResult>(other: Observable<TResult>): Observable<TResult>; <TResult>(other: IPromise<TResult>): Observable<TResult>; <TResult>(selector: (value: T) => TResult[]): Observable<TResult>;};
method flatMapLatest
flatMapLatest: <TResult>( selector: ( value: T, index: number, source: Observable<T> ) => Observable<TResult>, thisArg?: any) => Observable<TResult>;
Projects each element of an observable sequence into a new sequence of observable sequences by incorporating the element's index and then transforms an observable sequence of observable sequences into an observable sequence producing values only from the most recent observable sequence.
Parameter selector
A transform function to apply to each source element; the second parameter of the function represents the index of the source element.
Parameter thisArg
Object to use as this when executing callback.
Returns
An observable sequence whose elements are the result of invoking the transform function on each element of source producing an Observable of Observable sequences and that at any point in time produces the elements of the most recent inner observable sequence that has been received.
method flatMapObserver
flatMapObserver: <T2, T3, T4>( onNext: (value: T, index: number) => Observable<T2>, onError: (exception: any) => Observable<T3>, onCompleted: () => Observable<T4>, thisArg?: any) => Observable<T2 | T3 | T4>;
Projects each notification of an observable sequence to an observable sequence and merges the resulting observable sequences into one observable sequence.
Parameter onNext
A transform function to apply to each element; the second parameter of the function represents the index of the source element.
Parameter onError
A transform function to apply when an error occurs in the source sequence.
Parameter onCompleted
A transform function to apply when the end of the source sequence is reached.
Parameter thisArg
An optional "this" to use to invoke each transform.
Returns
An observable sequence whose elements are the result of invoking the one-to-many transform function corresponding to each notification in the input sequence.
method forEach
forEach: ( onNext?: (value: T) => void, onError?: (exception: any) => void, onCompleted?: () => void) => IDisposable;
method ignoreElements
ignoreElements: () => Observable<T>;
method map
map: <TResult>( selector: (value: T, index: number, source: Observable<T>) => TResult, thisArg?: any) => Observable<TResult>;
method materialize
materialize: () => Observable<Notification<T>>;
method merge
merge: { (maxConcurrent: number): T; (other: Observable<T>): Observable<T>; (other: IPromise<T>): Observable<T>;};
method mergeAll
mergeAll: () => T;
method mergeObservable
mergeObservable: () => T;
method pluck
pluck: <TResult>(prop: string) => Observable<TResult>;
method publish
publish: () => ConnectableObservable<T>;
method repeat
repeat: (repeatCount?: number) => Observable<T>;
method retry
retry: (retryCount?: number) => Observable<T>;
method retryWhen
retryWhen: <TError>( notifier: (errors: Observable<TError>) => Observable<any>) => Observable<T>;
method scan
scan: { <TAcc>( accumulator: ( acc: TAcc, value: T, index?: number, source?: Observable<TAcc> ) => TAcc, seed: TAcc ): Observable<TAcc>; ( accumulator: ( acc: T, value: T, index?: number, source?: Observable<T> ) => T ): Observable<T>;};
Applies an accumulator function over an observable sequence and returns each intermediate result. The optional seed value is used as the initial accumulator value. For aggregation behavior with no intermediate results, see Observable.aggregate.
Parameter accumulator
An accumulator function to be invoked on each element.
Parameter seed
The initial accumulator value.
Returns
An observable sequence containing the accumulated values.
Example 1
var res = source.scan(function (acc, x) { return acc + x; }); var res = source.scan(function (acc, x) { return acc + x; }, 0);
method select
select: <TResult>( selector: (value: T, index: number, source: Observable<T>) => TResult, thisArg?: any) => Observable<TResult>;
method selectConcat
selectConcat: { <T2, R>( selector: (value: T, index: number) => Observable<T2>, resultSelector: (value1: T, value2: T2, index: number) => R ): Observable<R>; <T2, R>( selector: (value: T, index: number) => IPromise<T2>, resultSelector: (value1: T, value2: T2, index: number) => R ): Observable<R>; <R>(selector: (value: T, index: number) => Observable<R>): Observable<R>; <R>(selector: (value: T, index: number) => IPromise<R>): Observable<R>; <R>(sequence: Observable<R>): Observable<R>;};
method selectMany
selectMany: { <TOther, TResult>( selector: (value: T) => Observable<TOther>, resultSelector: (item: T, other: TOther) => TResult ): Observable<TResult>; <TOther, TResult>( selector: (value: T) => IPromise<TOther>, resultSelector: (item: T, other: TOther) => TResult ): Observable<TResult>; <TResult>(selector: (value: T) => Observable<TResult>): Observable<TResult>; <TResult>(selector: (value: T) => IPromise<TResult>): Observable<TResult>; <TResult>(other: Observable<TResult>): Observable<TResult>; <TResult>(other: IPromise<TResult>): Observable<TResult>; <TResult>(selector: (value: T) => TResult[]): Observable<TResult>;};
method selectManyObserver
selectManyObserver: <T2, T3, T4>( onNext: (value: T, index: number) => Observable<T2>, onError: (exception: any) => Observable<T3>, onCompleted: () => Observable<T4>, thisArg?: any) => Observable<T2 | T3 | T4>;
Projects each notification of an observable sequence to an observable sequence and merges the resulting observable sequences into one observable sequence.
Parameter onNext
A transform function to apply to each element; the second parameter of the function represents the index of the source element.
Parameter onError
A transform function to apply when an error occurs in the source sequence.
Parameter onCompleted
A transform function to apply when the end of the source sequence is reached.
Parameter thisArg
An optional "this" to use to invoke each transform.
Returns
An observable sequence whose elements are the result of invoking the one-to-many transform function corresponding to each notification in the input sequence.
method selectSwitch
selectSwitch: <TResult>( selector: ( value: T, index: number, source: Observable<T> ) => Observable<TResult>, thisArg?: any) => Observable<TResult>;
Projects each element of an observable sequence into a new sequence of observable sequences by incorporating the element's index and then transforms an observable sequence of observable sequences into an observable sequence producing values only from the most recent observable sequence.
Parameter selector
A transform function to apply to each source element; the second parameter of the function represents the index of the source element.
Parameter thisArg
Object to use as this when executing callback.
Returns
An observable sequence whose elements are the result of invoking the transform function on each element of source producing an Observable of Observable sequences and that at any point in time produces the elements of the most recent inner observable sequence that has been received.
method skip
skip: (count: number) => Observable<T>;
method skipLast
skipLast: (count: number) => Observable<T>;
method skipUntil
skipUntil: { <T2>(other: Observable<T2>): Observable<T>; <T2>(other: IPromise<T2>): Observable<T>;};
method skipWhile
skipWhile: ( predicate: (value: T, index: number, source: Observable<T>) => boolean, thisArg?: any) => Observable<T>;
method startWith
startWith: { (...values: T[]): Observable<T>; (scheduler: IScheduler, ...values: T[]): Observable<T>;};
method switch
switch: () => T;
method switchLatest
switchLatest: () => T;
method switchMap
switchMap: <TResult>( selector: (value: T, index: number, source: Observable<T>) => TResult, thisArg?: any) => Observable<TResult>;
Projects each element of an observable sequence into a new sequence of observable sequences by incorporating the element's index and then transforms an observable sequence of observable sequences into an observable sequence producing values only from the most recent observable sequence.
Parameter selector
A transform function to apply to each source element; the second parameter of the function represents the index of the source element.
Parameter thisArg
Object to use as this when executing callback. 2.2.28
Returns
An observable sequence whose elements are the result of invoking the transform function on each element of source producing an Observable of Observable sequences and that at any point in time produces the elements of the most recent inner observable sequence that has been received.
method take
take: (count: number, scheduler?: IScheduler) => Observable<T>;
method takeLast
takeLast: (count: number) => Observable<T>;
method takeLastBuffer
takeLastBuffer: (count: number) => Observable<T[]>;
method takeUntil
takeUntil: { <T2>(other: Observable<T2>): Observable<T>; <T2>(other: IPromise<T2>): Observable<T>;};
method takeWhile
takeWhile: ( predicate: (value: T, index: number, source: Observable<T>) => boolean, thisArg?: any) => Observable<T>;
method tap
tap: { (observer: Observer<T>): Observable<T>; ( onNext?: (value: T) => void, onError?: (exception: Error) => void, onCompleted?: () => void ): Observable<T>;};
method tapOnCompleted
tapOnCompleted: (onCompleted: () => void, thisArg?: any) => Observable<T>;
method tapOnError
tapOnError: (onError: (exception: any) => void, thisArg?: any) => Observable<T>;
method tapOnNext
tapOnNext: (onNext: (value: T) => void, thisArg?: any) => Observable<T>;
method toArray
toArray: () => Observable<T[]>;
method toPromise
toPromise: { <TPromise extends IPromise<T>>( promiseCtor: new ( resolver: ( resolvePromise: (value: T) => void, rejectPromise: (reason: any) => void ) => void ) => TPromise ): TPromise; ( promiseCtor?: new ( resolver: ( resolvePromise: (value: T) => void, rejectPromise: (reason: any) => void ) => void ) => IPromise<T> ): IPromise<T>;};
Converts an existing observable sequence to an ES6 Compatible Promise
Parameter promiseCtor
The constructor of the promise.
Returns
An ES6 compatible promise with the last value from the observable sequence.
Example 1
var promise = Rx.Observable.return(42).toPromise(RSVP.Promise);
Converts an existing observable sequence to an ES6 Compatible Promise
Parameter promiseCtor
The constructor of the promise. If not provided, it looks for it in Rx.config.Promise.
Returns
An ES6 compatible promise with the last value from the observable sequence.
Example 1
var promise = Rx.Observable.return(42).toPromise(RSVP.Promise);
// With config Rx.config.Promise = RSVP.Promise; var promise = Rx.Observable.return(42).toPromise();
method where
where: ( predicate: (value: T, index: number, source: Observable<T>) => boolean, thisArg?: any) => Observable<T>;
method withLatestFrom
withLatestFrom: { <T2>(second: Observable<T2> | IPromise<T2>): Observable<[T, T2]>; <T2, TResult>( second: any, resultSelector: (v1: T, v2: T2) => TResult ): Observable<TResult>; <T2, T3>(second: any, third: any): Observable<[T, T2, T3]>; <T2, T3, TResult>( second: any, third: any, resultSelector: (v1: T, v2: T2, v3: T3) => TResult ): Observable<TResult>; <T2, T3, T4>(second: any, third: any, fourth: any): Observable< [T, T2, T3, T4] >; <T2, T3, T4, TResult>( second: any, third: any, fourth: any, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult ): Observable<TResult>; <T2, T3, T4, T5>( second: any, third: any, fourth: any, fifth: any ): Observable<[T, T2, T3, T4, T5]>; <T2, T3, T4, T5, TResult>( second: any, third: any, fourth: any, fifth: any, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4, v5: T5) => TResult ): Observable<TResult>; <TOther, TResult>( souces: any[], resultSelector: (firstValue: T, ...otherValues: TOther[]) => TResult ): Observable<TResult>;};
method zip
zip: { <T2>(second: Observable<T2> | IPromise<T2>): Observable<[T, T2]>; <T2, TResult>( second: any, resultSelector: (v1: T, v2: T2) => TResult ): Observable<TResult>; <T2, T3>(second: any, third: any): Observable<[T, T2, T3]>; <T2, T3, TResult>( second: any, third: any, resultSelector: (v1: T, v2: T2, v3: T3) => TResult ): Observable<TResult>; <T2, T3, T4>(second: any, third: any, fourth: any): Observable< [T, T2, T3, T4] >; <T2, T3, T4, TResult>( second: any, third: any, fourth: any, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult ): Observable<TResult>; <T2, T3, T4, T5>( second: any, third: any, fourth: any, fifth: any ): Observable<[T, T2, T3, T4, T5]>; <T2, T3, T4, T5, TResult>( second: any, third: any, fourth: any, fifth: any, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4, v5: T5) => TResult ): Observable<TResult>; <TOther, TResult>( second: any[], resultSelector: (left: T, ...right: TOther[]) => TResult ): Observable<TResult>;};
interface Observable
interface Observable<T> {}
method debounce
debounce: (dueTime: number, scheduler?: IScheduler) => Observable<T>;
method delay
delay: { (dueTime: Date, scheduler?: IScheduler): Observable<T>; (dueTime: number, scheduler?: IScheduler): Observable<T>;};
method sample
sample: { (interval: number, scheduler?: IScheduler): Observable<T>; <TSample>( sampler: Observable<TSample>, scheduler?: IScheduler ): Observable<T>;};
method throttle
throttle: (dueTime: number, scheduler?: IScheduler) => Observable<T>;
Deprecated
use #debounce or #throttleWithTimeout instead.
method throttleWithTimeout
throttleWithTimeout: (dueTime: number, scheduler?: IScheduler) => Observable<T>;
method timeInterval
timeInterval: (scheduler?: IScheduler) => Observable<TimeInterval<T>>;
method timeout
timeout: { ( dueTime: Date, other?: Observable<T>, scheduler?: IScheduler ): Observable<T>; ( dueTime: number, other?: Observable<T>, scheduler?: IScheduler ): Observable<T>;};
method timestamp
timestamp: (scheduler?: IScheduler) => Observable<Timestamp<T>>;
interface ObservableStatic
interface ObservableStatic {}
property prototype
prototype: any;
method catch
catch: { <T>(sources: Array<IPromise<T>> | Array<Observable<T>>): Observable<T>; <T>(...sources: Observable<T>[]): Observable<T>; <T>(...sources: IPromise<T>[]): Observable<T>;};
method catchError
catchError: { <T>(sources: Array<IPromise<T>> | Array<Observable<T>>): Observable<T>; <T>(...sources: Observable<T>[]): Observable<T>; <T>(...sources: IPromise<T>[]): Observable<T>;};
method catchException
catchException: { <T>(sources: Array<IPromise<T>> | Array<Observable<T>>): Observable<T>; <T>(...sources: Observable<T>[]): Observable<T>; <T>(...sources: IPromise<T>[]): Observable<T>;};
method combineLatest
combineLatest: { <T, T2>( first: Observable<T> | IPromise<T>, second: Observable<T2> | IPromise<T2> ): Observable<[T, T2]>; <T, T2, TResult>( first: any, second: any, resultSelector: (v1: T, v2: T2) => TResult ): Observable<TResult>; <T, T2, T3>(first: any, second: any, third: any): Observable<[T, T2, T3]>; <T, T2, T3, TResult>( first: any, second: any, third: any, resultSelector: (v1: T, v2: T2, v3: T3) => TResult ): Observable<TResult>; <T, T2, T3, T4>( first: any, second: any, third: any, fourth: any ): Observable<[T, T2, T3, T4]>; <T, T2, T3, T4, TResult>( first: any, second: any, third: any, fourth: any, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult ): Observable<TResult>; <T, T2, T3, T4, T5>( first: any, second: any, third: any, fourth: any, fifth: any ): Observable<[T, T2, T3, T4, T5]>; <T, T2, T3, T4, T5, TResult>( first: any, second: any, third: any, fourth: any, fifth: any, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4, v5: T5) => TResult ): Observable<TResult>; <T>(sources: any[]): Observable<T[]>; <TOther, TResult>( sources: any[], resultSelector: (...otherValues: TOther[]) => TResult ): Observable<TResult>;};
method concat
concat: { <T>(...sources: Array<Observable<T>>): Observable<T>; <T>(...sources: IPromise<T>[]): Observable<T>; <T>(sources: IPromise<T>[] | Observable<T>[]): Observable<T>;};
method create
create: { <T>(subscribe: (observer: Observer<T>) => IDisposable): Observable<T>; <T>(subscribe: (observer: Observer<T>) => () => void): Observable<T>; <T>(subscribe: (observer: Observer<T>) => void): Observable<T>;};
method createWithDisposable
createWithDisposable: <T>( subscribe: (observer: Observer<T>) => IDisposable) => Observable<T>;
method defer
defer: { <T>(observableFactory: () => Observable<T>): Observable<T>; <T>(observableFactory: () => IPromise<T>): Observable<T>;};
method empty
empty: <T>(scheduler?: IScheduler) => Observable<T>;
method from
from: { <T, TResult>( array: T[], mapFn: (value: T, index: number) => TResult, thisArg?: any, scheduler?: IScheduler ): Observable<TResult>; <T>( array: T[], mapFn?: (value: T, index: number) => T, thisArg?: any, scheduler?: IScheduler ): Observable<T>; <T, TResult>( array: { [index: number]: T; length: number }, mapFn: (value: T, index: number) => TResult, thisArg?: any, scheduler?: IScheduler ): Observable<TResult>; <T>( array: { [index: number]: T; length: number }, mapFn?: (value: T, index: number) => T, thisArg?: any, scheduler?: IScheduler ): Observable<T>; <T>( iterable: any, mapFn?: (value: any, index: number) => T, thisArg?: any, scheduler?: IScheduler ): Observable<T>;};
This method creates a new Observable sequence from an array object.
Parameter array
An array-like or iterable object to convert to an Observable sequence.
Parameter mapFn
Map function to call on every element of the array.
Parameter thisArg
The context to use calling the mapFn if provided.
Parameter scheduler
Optional scheduler to use for scheduling. If not provided, defaults to Scheduler.currentThread.
This method creates a new Observable sequence from an array object.
Parameter array
An array-like or iterable object to convert to an Observable sequence.
Parameter mapFn
Map function to call on every element of the array.
Parameter thisArg
The context to use calling the mapFn if provided.
Parameter scheduler
Optional scheduler to use for scheduling. If not provided, defaults to Scheduler.currentThread.
This method creates a new Observable sequence from an array-like object.
Parameter array
An array-like or iterable object to convert to an Observable sequence.
Parameter mapFn
Map function to call on every element of the array.
Parameter thisArg
The context to use calling the mapFn if provided.
Parameter scheduler
Optional scheduler to use for scheduling. If not provided, defaults to Scheduler.currentThread.
This method creates a new Observable sequence from an array-like object.
Parameter array
An array-like or iterable object to convert to an Observable sequence.
Parameter mapFn
Map function to call on every element of the array.
Parameter thisArg
The context to use calling the mapFn if provided.
Parameter scheduler
Optional scheduler to use for scheduling. If not provided, defaults to Scheduler.currentThread.
This method creates a new Observable sequence from an array-like or iterable object.
Parameter array
An array-like or iterable object to convert to an Observable sequence.
Parameter mapFn
Map function to call on every element of the array.
Parameter thisArg
The context to use calling the mapFn if provided.
Parameter scheduler
Optional scheduler to use for scheduling. If not provided, defaults to Scheduler.currentThread.
method fromArray
fromArray: { <T>(array: T[], scheduler?: IScheduler): Observable<T>; <T>( array: { [index: number]: T; length: number }, scheduler?: IScheduler ): Observable<T>;};
method fromPromise
fromPromise: <T>(promise: IPromise<T>) => Observable<T>;
Converts a Promise to an Observable sequence
Parameter promise
An ES6 Compliant promise.
Returns
An Observable sequence which wraps the existing promise success and failure.
method generate
generate: <TState, TResult>( initialState: TState, condition: (state: TState) => boolean, iterate: (state: TState) => TState, resultSelector: (state: TState) => TResult, scheduler?: IScheduler) => Observable<TResult>;
method just
just: <T>(value: T, scheduler?: IScheduler) => Observable<T>;
2.2.28
method merge
merge: { <T>(...sources: Array<Observable<T>>): Observable<T>; <T>(...sources: IPromise<T>[]): Observable<T>; <T>(sources: IPromise<T>[] | Observable<T>[]): Observable<T>; <T>(scheduler: IScheduler, ...sources: Observable<T>[]): Observable<T>; <T>(scheduler: IScheduler, ...sources: IPromise<T>[]): Observable<T>; <T>( scheduler: IScheduler, sources: IPromise<T>[] | Observable<T>[] ): Observable<T>;};
method never
never: <T>() => Observable<T>;
method of
of: <T>(...values: T[]) => Observable<T>;
This method creates a new Observable instance with a variable number of arguments, regardless of number or type of the arguments.
Returns
The observable sequence whose elements are pulled from the given arguments.
Example 1
var res = Rx.Observable.of(1, 2, 3); 2.2.28
method ofWithScheduler
ofWithScheduler: <T>(scheduler?: IScheduler, ...values: T[]) => Observable<T>;
This method creates a new Observable instance with a variable number of arguments, regardless of number or type of the arguments.
Parameter scheduler
A scheduler to use for scheduling the arguments.
Returns
The observable sequence whose elements are pulled from the given arguments.
Example 1
var res = Rx.Observable.ofWithScheduler(Rx.Scheduler.timeout, 1, 2, 3); 2.2.28
method pairs
pairs: <T>( obj: { [key: string]: T }, scheduler?: IScheduler) => Observable<[string, T]>;
method range
range: ( start: number, count: number, scheduler?: IScheduler) => Observable<number>;
method repeat
repeat: <T>( value: T, repeatCount?: number, scheduler?: IScheduler) => Observable<T>;
method return
return: <T>(value: T, scheduler?: IScheduler) => Observable<T>;
method returnValue
returnValue: <T>(value: T, scheduler?: IScheduler) => Observable<T>;
method throw
throw: <T>(exception: Error, scheduler?: IScheduler) => Observable<T>;
method throwError
throwError: <T>(error: Error, scheduler?: IScheduler) => Observable<T>;
method throwException
throwException: <T>(exception: Error, scheduler?: IScheduler) => Observable<T>;
method withLatestFrom
withLatestFrom: { <T, T2>( first: Observable<T> | IPromise<T>, second: Observable<T2> | IPromise<T2> ): Observable<[T, T2]>; <T, T2, TResult>( first: any, second: any, resultSelector: (v1: T, v2: T2) => TResult ): Observable<TResult>; <T, T2, T3>(first: any, second: any, third: any): Observable<[T, T2, T3]>; <T, T2, T3, TResult>( first: any, second: any, third: any, resultSelector: (v1: T, v2: T2, v3: T3) => TResult ): Observable<TResult>; <T, T2, T3, T4>( first: any, second: any, third: any, fourth: any ): Observable<[T, T2, T3, T4]>; <T, T2, T3, T4, TResult>( first: any, second: any, third: any, fourth: any, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4) => TResult ): Observable<TResult>; <T, T2, T3, T4, T5>( first: any, second: any, third: any, fourth: any, fifth: any ): Observable<[T, T2, T3, T4, T5]>; <T, T2, T3, T4, T5, TResult>( first: any, second: any, third: any, fourth: any, fifth: any, resultSelector: (v1: T, v2: T2, v3: T3, v4: T4, v5: T5) => TResult ): Observable<TResult>; <TOther, TResult>( souces: any[], resultSelector: (...otherValues: TOther[]) => TResult ): Observable<TResult>;};
method zip
zip: { <T1, T2>( first: Observable<T1> | IPromise<T1>, sources: | Observable<T2> | IPromise<T2> | Array<Observable<T2> | IPromise<T2>> ): Observable<[T1, T2]>; <T1, T2, TResult>( first: any, sources: any[], resultSelector: (item1: T1, ...right: T2[]) => TResult ): Observable<TResult>; <T1, T2, TResult>( source1: any, source2: any, resultSelector: (item1: T1, item2: T2) => TResult ): Observable<TResult>; <T1, T2, T3>(source1: any, source2: any, source3: any): Observable< [T1, T2, T3] >; <T1, T2, T3, TResult>( source1: any, source2: any, source3: any, resultSelector: (item1: T1, item2: T2, item3: T3) => TResult ): Observable<TResult>; <T1, T2, T3, T4>( source1: any, source2: any, source3: any, source4: any ): Observable<[T1, T2, T3, T4]>; <T1, T2, T3, T4, TResult>( source1: any, source2: any, source3: any, source4: any, resultSelector: (item1: T1, item2: T2, item3: T3, item4: T4) => TResult ): Observable<TResult>; <T1, T2, T3, T4, T5>( source1: any, source2: any, source3: any, source4: any, source5: any ): Observable<[T1, T2, T3, T4, T5]>; <T1, T2, T3, T4, T5, TResult>( source1: any, source2: any, source3: any, source4: any, source5: any, resultSelector: ( item1: T1, item2: T2, item3: T3, item4: T4, item5: T5 ) => TResult ): Observable<TResult>;};
method zipArray
zipArray: { <T>(...sources: Array<Observable<T> | IPromise<T>>): Observable<T[]>; <T>(sources: any[]): Observable<T[]>;};
interface ObservableStatic
interface ObservableStatic {}
property fromCallback
fromCallback: { // with single result callback without selector <TResult>( func: (callback: (result: TResult) => any) => any, context?: any ): () => Observable<TResult>; <T1, TResult>( func: (arg1: T1, callback: (result: TResult) => any) => any, context?: any ): (arg1: T1) => Observable<TResult>; <T1, T2, TResult>( func: (arg1: T1, arg2: T2, callback: (result: TResult) => any) => any, context?: any ): (arg1: T1, arg2: T2) => Observable<TResult>; <T1, T2, T3, TResult>( func: ( arg1: T1, arg2: T2, arg3: T3, callback: (result: TResult) => any ) => any, context?: any ): (arg1: T1, arg2: T2, arg3: T3) => Observable<TResult>; // with any callback with selector <TCallbackResult, TResult>( func: (callback: Function) => any, context: any, selector: (args: TCallbackResult[]) => TResult ): () => Observable<TResult>; <T1, TCallbackResult, TResult>( func: (arg1: T1, callback: Function) => any, context: any, selector: (args: TCallbackResult[]) => TResult ): (arg1: T1) => Observable<TResult>; <T1, T2, TCallbackResult, TResult>( func: (arg1: T1, arg2: T2, callback: Function) => any, context: any, selector: (args: TCallbackResult[]) => TResult ): (arg1: T1, arg2: T2) => Observable<TResult>; <T1, T2, T3, TCallbackResult, TResult>( func: (arg1: T1, arg2: T2, arg3: T3, callback: Function) => any, context: any, selector: (args: TCallbackResult[]) => TResult ): (arg1: T1, arg2: T2, arg3: T3) => Observable<TResult>; // with any callback without selector <TResult>( func: (callback: Function) => any, context?: any ): () => Observable<TResult>; <T1, TResult>(func: (arg1: T1, callback: Function) => any, context?: any): ( arg1: T1 ) => Observable<TResult>; <T1, T2, TResult>( func: (arg1: T1, arg2: T2, callback: Function) => any, context?: any ): (arg1: T1, arg2: T2) => Observable<TResult>; <T1, T2, T3, TResult>( func: (arg1: T1, arg2: T2, arg3: T3, callback: Function) => any, context?: any ): (arg1: T1, arg2: T2, arg3: T3) => Observable<TResult>; // with any function with selector <TCallbackResult, TResult>( func: Function, context: any, selector: (args: TCallbackResult[]) => TResult ): (...args: any[]) => Observable<TResult>; // with any function without selector <TResult>(func: Function, context?: any): ( ...args: any[] ) => Observable<TResult>;};
property fromNodeCallback
fromNodeCallback: { // with single result callback without selector <T>( func: (callback: (err: any, result: T) => any) => any, context?: any ): () => Observable<T>; <T1, T>( func: (arg1: T1, callback: (err: any, result: T) => any) => any, context?: any ): (arg1: T1) => Observable<T>; <T1, T2, T>( func: ( arg1: T1, arg2: T2, callback: (err: any, result: T) => any ) => any, context?: any ): (arg1: T1, arg2: T2) => Observable<T>; <T1, T2, T3, T>( func: ( arg1: T1, arg2: T2, arg3: T3, callback: (err: any, result: T) => any ) => any, context?: any ): (arg1: T1, arg2: T2, arg3: T3) => Observable<T>; // with any callback with selector <TC, TR>( func: (callback: Function) => any, context: any, selector: (results: TC[]) => TR ): () => Observable<TR>; <T1, TC, TR>( func: (arg1: T1, callback: Function) => any, context: any, selector: (results: TC[]) => TR ): (arg1: T1) => Observable<TR>; <T1, T2, TC, TR>( func: (arg1: T1, arg2: T2, callback: Function) => any, context: any, selector: (results: TC[]) => TR ): (arg1: T1, arg2: T2) => Observable<TR>; <T1, T2, T3, TC, TR>( func: (arg1: T1, arg2: T2, arg3: T3, callback: Function) => any, context: any, selector: (results: TC[]) => TR ): (arg1: T1, arg2: T2, arg3: T3) => Observable<TR>; // with any callback without selector <TR>(func: (callback: Function) => any, context?: any): () => Observable<TR>; <T1, TR>(func: (arg1: T1, callback: Function) => any, context?: any): ( arg1: T1 ) => Observable<TR>; <T1, T2, TR>( func: (arg1: T1, arg2: T2, callback: Function) => any, context?: any ): (arg1: T1, arg2: T2) => Observable<TR>; <T1, T2, T3, TR>( func: (arg1: T1, arg2: T2, arg3: T3, callback: Function) => any, context?: any ): (arg1: T1, arg2: T2, arg3: T3) => Observable<TR>; // with any function with selector <TC, T>(func: Function, context: any, selector: (results: TC[]) => T): ( ...args: any[] ) => Observable<T>; // with any function without selector <T>(func: Function, context?: any): (...args: any[]) => Observable<T>;};
method fromEvent
fromEvent: <T>( element: | ArrayLike<DOMEventTarget> | DOMEventTarget | NodeEventTarget | NativeEventTarget, eventName: string, selector?: (...args: any[]) => T) => Observable<T>;
method fromEventPattern
fromEventPattern: <T>( addHandler: (handler: Function) => void, removeHandler: (handler: Function) => void, selector?: (...args: any[]) => T) => Observable<T>;
interface ObservableStatic
interface ObservableStatic {}
method interval
interval: { (period: number, scheduler?: IScheduler): Observable<number>; ( dutTime: number, period: number, scheduler?: IScheduler ): Observable<number>;};
method timer
timer: { ( dueTime: number, period: number, scheduler?: IScheduler ): Observable<number>; (dueTime: number, scheduler?: IScheduler): Observable<number>;};
interface Observer
interface Observer<T> extends IObserver<T> {}
method asObserver
asObserver: () => Observer<T>;
method toNotifier
toNotifier: () => (notification: Notification<T>) => void;
interface ObserverStatic
interface ObserverStatic {}
method create
create: <T>( onNext?: (value: T) => void, onError?: (exception: any) => void, onCompleted?: () => void) => Observer<T>;
method fromNotifier
fromNotifier: <T>( handler: (notification: Notification<T>, thisArg?: any) => void) => Observer<T>;
interface Scheduler
interface Scheduler extends IScheduler {}
interface SchedulerStatic
interface SchedulerStatic {}
property currentThread
currentThread: ICurrentThreadScheduler;
property default
default: IScheduler;
property immediate
immediate: IScheduler;
property timeout
timeout: IScheduler;
method normalize
normalize: (timeSpan: number) => number;
construct signature
new ( now: () => number, schedule: ( state: any, action: (scheduler: IScheduler, state: any) => IDisposable ) => IDisposable, scheduleRelative: ( state: any, dueTime: number, action: (scheduler: IScheduler, state: any) => IDisposable ) => IDisposable, scheduleAbsolute: ( state: any, dueTime: number, action: (scheduler: IScheduler, state: any) => IDisposable ) => IDisposable): Scheduler;
interface TimeInterval
interface TimeInterval<T> {}
namespace rx-lite.config
namespace rx-lite.config {}
variable Promise
let Promise: new <T>( resolver: ( resolvePromise: (value: T) => void, rejectPromise: (reason: any) => void ) => void) => IPromise<T>;
variable useNativeEvents
const useNativeEvents: boolean;
Configuration option to determine whether to use native events only
namespace rx-lite.helpers
namespace rx-lite.helpers {}
function asArray
asArray: <T>(...args: T[]) => T[];
function defaultComparer
defaultComparer: (left: any, right: any) => boolean;
function defaultError
defaultError: (err: any) => void;
function defaultKeySerializer
defaultKeySerializer: (key: any) => string;
function defaultNow
defaultNow: () => number;
function defaultSubComparer
defaultSubComparer: (left: any, right: any) => number;
function identity
identity: <T>(value: T) => T;
function isFunction
isFunction: (value: any) => boolean;
function isPromise
isPromise: (p: any) => boolean;
function noop
noop: () => void;
function not
not: (value: any) => boolean;
function notDefined
notDefined: (value: any) => boolean;
namespace rx-lite.internals
namespace rx-lite.internals {}
function addRef
addRef: <T>( xs: Observable<T>, r: { getDisposable(): IDisposable }) => Observable<T>;
function isEqual
isEqual: (left: any, right: any) => boolean;
class PriorityQueue
class PriorityQueue<TTime> {}
constructor
constructor(capacity: number);
property count
static count: number;
property length
length: number;
method dequeue
dequeue: () => ScheduledItem<TTime>;
method enqueue
enqueue: (item: ScheduledItem<TTime>) => void;
method heapify
heapify: (index: number) => void;
method isHigherPriority
isHigherPriority: (left: number, right: number) => boolean;
method peek
peek: () => ScheduledItem<TTime>;
method percolate
percolate: (index: number) => void;
method remove
remove: (item: ScheduledItem<TTime>) => boolean;
method removeAt
removeAt: (index: number) => void;
class ScheduledItem
class ScheduledItem<TTime> {}
constructor
constructor( scheduler: IScheduler, state: any, action: (scheduler: IScheduler, state: any) => IDisposable, dueTime: {}, comparer?: (x: TTime, y: TTime) => number);
property action
action: (scheduler: IScheduler, state: any) => IDisposable;
property comparer
comparer: (x: TTime, y: TTime) => number;
property disposable
disposable: SingleAssignmentDisposable;
property dueTime
dueTime: {};
property scheduler
scheduler: IScheduler;
property state
state: {};
method compareTo
compareTo: (other: ScheduledItem<TTime>) => number;
method invoke
invoke: () => void;
method invokeCore
invokeCore: () => IDisposable;
method isCancelled
isCancelled: () => boolean;
namespace Rx.config
namespace Rx.config {}
variable Promise
let Promise: new <T>( resolver: ( resolvePromise: (value: T) => void, rejectPromise: (reason: any) => void ) => void) => IPromise<T>;
variable useNativeEvents
const useNativeEvents: boolean;
Configuration option to determine whether to use native events only
namespace Rx.helpers
namespace Rx.helpers {}
function asArray
asArray: <T>(...args: T[]) => T[];
function defaultComparer
defaultComparer: (left: any, right: any) => boolean;
function defaultError
defaultError: (err: any) => void;
function defaultKeySerializer
defaultKeySerializer: (key: any) => string;
function defaultNow
defaultNow: () => number;
function defaultSubComparer
defaultSubComparer: (left: any, right: any) => number;
function identity
identity: <T>(value: T) => T;
function isFunction
isFunction: (value: any) => boolean;
function isPromise
isPromise: (p: any) => boolean;
function noop
noop: () => void;
function not
not: (value: any) => boolean;
function notDefined
notDefined: (value: any) => boolean;
namespace Rx.internals
namespace Rx.internals {}
function addRef
addRef: <T>( xs: Observable<T>, r: { getDisposable(): IDisposable }) => Observable<T>;
function isEqual
isEqual: (left: any, right: any) => boolean;
class PriorityQueue
class PriorityQueue<TTime> {}
constructor
constructor(capacity: number);
property count
static count: number;
property length
length: number;
method dequeue
dequeue: () => ScheduledItem<TTime>;
method enqueue
enqueue: (item: ScheduledItem<TTime>) => void;
method heapify
heapify: (index: number) => void;
method isHigherPriority
isHigherPriority: (left: number, right: number) => boolean;
method peek
peek: () => ScheduledItem<TTime>;
method percolate
percolate: (index: number) => void;
method remove
remove: (item: ScheduledItem<TTime>) => boolean;
method removeAt
removeAt: (index: number) => void;
class ScheduledItem
class ScheduledItem<TTime> {}
constructor
constructor( scheduler: IScheduler, state: any, action: (scheduler: IScheduler, state: any) => IDisposable, dueTime: {}, comparer?: (x: TTime, y: TTime) => number);
property action
action: (scheduler: IScheduler, state: any) => IDisposable;
property comparer
comparer: (x: TTime, y: TTime) => number;
property disposable
disposable: SingleAssignmentDisposable;
property dueTime
dueTime: {};
property scheduler
scheduler: IScheduler;
property state
state: {};
method compareTo
compareTo: (other: ScheduledItem<TTime>) => number;
method invoke
invoke: () => void;
method invokeCore
invokeCore: () => IDisposable;
method isCancelled
isCancelled: () => boolean;
Package Files (1)
Dependencies (2)
Dev Dependencies (0)
No dev dependencies.
Peer Dependencies (0)
No peer dependencies.
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@types/rx-lite
.
- Markdown[![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@types/rx-lite)
- HTML<a href="https://www.jsdocs.io/package/@types/rx-lite"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 11010 ms. - Missing or incorrect documentation? Open an issue for this package.