@types/rx-lite-experimental
- Version 4.0.4
- Published
- 23.7 kB
- 1 dependency
- MIT license
Install
npm i @types/rx-lite-experimental
yarn add @types/rx-lite-experimental
pnpm add @types/rx-lite-experimental
Overview
TypeScript definitions for rx-lite-experimental
Index
Namespaces
namespace Rx
namespace Rx {}
interface Observable
interface Observable<T> {}
method doWhile
doWhile: (condition: () => boolean) => Observable<T>;
Repeats source as long as condition holds emulating a do while loop.
Parameter condition
The condition which determines if the source will be repeated.
Returns
An observable sequence which is repeated as long as the condition holds.
method expand
expand: ( selector: (item: T) => Observable<T>, scheduler?: IScheduler) => Observable<T>;
Expands an observable sequence by recursively invoking selector.
Parameter selector
Selector function to invoke for each produced element, resulting in another sequence to which the selector will be invoked recursively again.
Parameter scheduler
Scheduler on which to perform the expansion. If not provided, this defaults to the current thread scheduler.
Returns
An observable sequence containing all the elements produced by the recursive expansion.
method forkJoin
forkJoin: { <TSecond, TResult>( second: Observable<TSecond>, resultSelector: (left: T, right: TSecond) => TResult ): Observable<TResult>; <TSecond, TResult>( second: IPromise<TSecond>, resultSelector: (left: T, right: TSecond) => TResult ): Observable<TResult>;};
Runs two observable sequences in parallel and combines their last elemenets.
Parameter second
Second observable sequence or promise.
Parameter resultSelector
Result selector function to invoke with the last elements of both sequences.
Returns
An observable sequence with the result of calling the selector function with the last elements of both input sequences.
method let
let: <TResult>( selector: (source: Observable<T>) => Observable<TResult>) => Observable<TResult>;
Returns an observable sequence that is the result of invoking the selector on the source sequence, without sharing subscriptions. This operator allows for a fluent style of writing queries that use the same sequence multiple times.
Parameter selector
Selector function which can use the source sequence as many times as needed, without sharing subscriptions to the source sequence.
Returns
An observable sequence that contains the elements of a sequence produced by multicasting the source sequence within a selector function.
method letBind
letBind: <TResult>( selector: (source: Observable<T>) => Observable<TResult>) => Observable<TResult>;
Returns an observable sequence that is the result of invoking the selector on the source sequence, without sharing subscriptions. This operator allows for a fluent style of writing queries that use the same sequence multiple times.
Parameter selector
Selector function which can use the source sequence as many times as needed, without sharing subscriptions to the source sequence.
Returns
An observable sequence that contains the elements of a sequence produced by multicasting the source sequence within a selector function.
method manySelect
manySelect: <TResult>( selector: ( item: Observable<T>, index: number, source: Observable<T> ) => TResult, scheduler?: IScheduler) => Observable<TResult>;
Comonadic bind operator.
Parameter selector
A transform function to apply to each element.
Parameter scheduler
Scheduler used to execute the operation. If not specified, defaults to the ImmediateScheduler.
Returns
An observable sequence which results from the comonadic bind operation.
interface ObservableStatic
interface ObservableStatic {}
method case
case: { <T>( selector: () => string, sources: { [key: string]: Observable<T> }, elseSource: Observable<T> ): Observable<T>; <T>( selector: () => string, sources: { [key: string]: IPromise<T> }, elseSource: Observable<T> ): Observable<T>; <T>( selector: () => string, sources: { [key: string]: Observable<T> }, elseSource: IPromise<T> ): Observable<T>; <T>( selector: () => string, sources: { [key: string]: IPromise<T> }, elseSource: IPromise<T> ): Observable<T>; <T>( selector: () => string, sources: { [key: string]: Observable<T> }, scheduler?: IScheduler ): Observable<T>; <T>( selector: () => string, sources: { [key: string]: IPromise<T> }, scheduler?: IScheduler ): Observable<T>; <T>( selector: () => number, sources: { [key: number]: Observable<T> }, elseSource: Observable<T> ): Observable<T>; <T>( selector: () => number, sources: { [key: number]: IPromise<T> }, elseSource: Observable<T> ): Observable<T>; <T>( selector: () => number, sources: { [key: number]: Observable<T> }, elseSource: IPromise<T> ): Observable<T>; <T>( selector: () => number, sources: { [key: number]: IPromise<T> }, elseSource: IPromise<T> ): Observable<T>; <T>( selector: () => number, sources: { [key: number]: Observable<T> }, scheduler?: IScheduler ): Observable<T>; <T>( selector: () => number, sources: { [key: number]: IPromise<T> }, scheduler?: IScheduler ): Observable<T>;};
Uses selector to determine which source in sources to use. There is an alias 'switchCase' for browsers <IE9.
Parameter selector
The function which extracts the value for to test in a case statement.
Parameter sources
A object which has keys which correspond to the case statement labels.
Parameter elseSource
The observable sequence or promise that will be run if the sources are not matched.
Returns
An observable sequence which is determined by a case statement.
Example 1
res = Rx.Observable.case(selector, { '1': obs1, '2': obs2 }, obs0);
Uses selector to determine which source in sources to use. There is an alias 'switchCase' for browsers <IE9.
Parameter selector
The function which extracts the value for to test in a case statement.
Parameter sources
A object which has keys which correspond to the case statement labels.
Parameter scheduler
Scheduler used to create Rx.Observabe.Empty.
Returns
An observable sequence which is determined by a case statement.
Example 1
res = Rx.Observable.case(selector, { '1': obs1, '2': obs2 }); res = Rx.Observable.case(selector, { '1': obs1, '2': obs2 }, scheduler);
method for
for: <T, TResult>( sources: T[], resultSelector: (item: T) => Observable<TResult>) => Observable<TResult>;
Concatenates the observable sequences obtained by running the specified result selector for each element in source. There is an alias for this method called 'forIn' for browsers <IE9
Parameter sources
An array of values to turn into an observable sequence.
Parameter resultSelector
A function to apply to each item in the sources array to turn it into an observable sequence.
Returns
An observable sequence from the concatenated observable sequences.
method forIn
forIn: <T, TResult>( sources: T[], resultSelector: (item: T) => Observable<TResult>) => Observable<TResult>;
Concatenates the observable sequences obtained by running the specified result selector for each element in source. There is an alias for this method called 'forIn' for browsers <IE9
Parameter sources
An array of values to turn into an observable sequence.
Parameter resultSelector
A function to apply to each item in the sources array to turn it into an observable sequence.
Returns
An observable sequence from the concatenated observable sequences.
method forkJoin
forkJoin: { <T>(sources: Array<Observable<T>>): Observable<T[]>; <T>(sources: IPromise<T>[]): Observable<T[]>; <T>(...args: Observable<T>[]): Observable<T[]>; <T>(...args: IPromise<T>[]): Observable<T[]>;};
Runs all observable sequences in parallel and collect their last elements.
Parameter sources
Array of source sequences or promises.
Returns
An observable sequence with an array collecting the last elements of all the input sequences.
Example 1
res = Rx.Observable.forkJoin([obs1, obs2]);
Runs all observable sequences in parallel and collect their last elements.
Parameter args
Source sequences or promises.
Returns
An observable sequence with an array collecting the last elements of all the input sequences.
Example 1
res = Rx.Observable.forkJoin(obs1, obs2, ...);
method if
if: { <T>( condition: () => boolean, thenSource: Observable<T>, elseSource: Observable<T> ): Observable<T>; <T>( condition: () => boolean, thenSource: Observable<T>, elseSource: IPromise<T> ): Observable<T>; <T>( condition: () => boolean, thenSource: IPromise<T>, elseSource: Observable<T> ): Observable<T>; <T>( condition: () => boolean, thenSource: IPromise<T>, elseSource: IPromise<T> ): Observable<T>; <T>( condition: () => boolean, thenSource: Observable<T>, scheduler?: IScheduler ): Observable<T>; <T>( condition: () => boolean, thenSource: IPromise<T>, scheduler?: IScheduler ): Observable<T>;};
Determines whether an observable collection contains values. There is an alias for this method called 'ifThen' for browsers <IE9
Parameter condition
The condition which determines if the thenSource or elseSource will be run.
Parameter thenSource
The observable sequence or promise that will be run if the condition function returns true.
Parameter elseSource
The observable sequence or promise that will be run if the condition function returns false.
Returns
An observable sequence which is either the thenSource or elseSource.
Example 1
res = Rx.Observable.if(condition, obs1, obs2);
Determines whether an observable collection contains values. There is an alias for this method called 'ifThen' for browsers <IE9
Parameter condition
The condition which determines if the thenSource or empty sequence will be run.
Parameter thenSource
The observable sequence or promise that will be run if the condition function returns true.
Parameter scheduler
Scheduler used to create Rx.Observabe.Empty.
Returns
An observable sequence which is either the thenSource or empty sequence.
Example 1
res = Rx.Observable.if(condition, obs1, scheduler);
method ifThen
ifThen: { <T>( condition: () => boolean, thenSource: Observable<T>, elseSource: Observable<T> ): Observable<T>; <T>( condition: () => boolean, thenSource: Observable<T>, elseSource: IPromise<T> ): Observable<T>; <T>( condition: () => boolean, thenSource: IPromise<T>, elseSource: Observable<T> ): Observable<T>; <T>( condition: () => boolean, thenSource: IPromise<T>, elseSource: IPromise<T> ): Observable<T>; <T>( condition: () => boolean, thenSource: Observable<T>, scheduler?: IScheduler ): Observable<T>; <T>( condition: () => boolean, thenSource: IPromise<T>, scheduler?: IScheduler ): Observable<T>;};
Determines whether an observable collection contains values. There is an alias for this method called 'ifThen' for browsers <IE9
Parameter condition
The condition which determines if the thenSource or elseSource will be run.
Parameter thenSource
The observable sequence or promise that will be run if the condition function returns true.
Parameter elseSource
The observable sequence or promise that will be run if the condition function returns false.
Returns
An observable sequence which is either the thenSource or elseSource.
Example 1
res = Rx.Observable.if(condition, obs1, obs2);
Determines whether an observable collection contains values. There is an alias for this method called 'ifThen' for browsers <IE9
Parameter condition
The condition which determines if the thenSource or empty sequence will be run.
Parameter thenSource
The observable sequence or promise that will be run if the condition function returns true.
Parameter scheduler
Scheduler used to create Rx.Observabe.Empty.
Returns
An observable sequence which is either the thenSource or empty sequence.
Example 1
res = Rx.Observable.if(condition, obs1, scheduler);
method switchCase
switchCase: { <T>( selector: () => string, sources: { [key: string]: Observable<T> }, elseSource: Observable<T> ): Observable<T>; <T>( selector: () => string, sources: { [key: string]: IPromise<T> }, elseSource: Observable<T> ): Observable<T>; <T>( selector: () => string, sources: { [key: string]: Observable<T> }, elseSource: IPromise<T> ): Observable<T>; <T>( selector: () => string, sources: { [key: string]: IPromise<T> }, elseSource: IPromise<T> ): Observable<T>; <T>( selector: () => string, sources: { [key: string]: Observable<T> }, scheduler?: IScheduler ): Observable<T>; <T>( selector: () => string, sources: { [key: string]: IPromise<T> }, scheduler?: IScheduler ): Observable<T>; <T>( selector: () => number, sources: { [key: number]: Observable<T> }, elseSource: Observable<T> ): Observable<T>; <T>( selector: () => number, sources: { [key: number]: IPromise<T> }, elseSource: Observable<T> ): Observable<T>; <T>( selector: () => number, sources: { [key: number]: Observable<T> }, elseSource: IPromise<T> ): Observable<T>; <T>( selector: () => number, sources: { [key: number]: IPromise<T> }, elseSource: IPromise<T> ): Observable<T>; <T>( selector: () => number, sources: { [key: number]: Observable<T> }, scheduler?: IScheduler ): Observable<T>; <T>( selector: () => number, sources: { [key: number]: IPromise<T> }, scheduler?: IScheduler ): Observable<T>;};
Uses selector to determine which source in sources to use. There is an alias 'switchCase' for browsers <IE9.
Parameter selector
The function which extracts the value for to test in a case statement.
Parameter sources
A object which has keys which correspond to the case statement labels.
Parameter elseSource
The observable sequence or promise that will be run if the sources are not matched.
Returns
An observable sequence which is determined by a case statement.
Example 1
res = Rx.Observable.case(selector, { '1': obs1, '2': obs2 }, obs0);
Uses selector to determine which source in sources to use. There is an alias 'switchCase' for browsers <IE9.
Parameter selector
The function which extracts the value for to test in a case statement.
Parameter sources
A object which has keys which correspond to the case statement labels.
Parameter scheduler
Scheduler used to create Rx.Observabe.Empty.
Returns
An observable sequence which is determined by a case statement.
Example 1
res = Rx.Observable.case(selector, { '1': obs1, '2': obs2 }); res = Rx.Observable.case(selector, { '1': obs1, '2': obs2 }, scheduler);
method while
while: { <T>(condition: () => boolean, source: Observable<T>): Observable<T>; <T>(condition: () => boolean, source: IPromise<T>): Observable<T>;};
Repeats source as long as condition holds emulating a while loop. There is an alias for this method called 'whileDo' for browsers <IE9
Parameter condition
The condition which determines if the source will be repeated.
Parameter source
The observable sequence or promise that will be run if the condition function returns true.
Returns
An observable sequence which is repeated as long as the condition holds.
method whileDo
whileDo: { <T>(condition: () => boolean, source: Observable<T>): Observable<T>; <T>(condition: () => boolean, source: IPromise<T>): Observable<T>;};
Repeats source as long as condition holds emulating a while loop. There is an alias for this method called 'whileDo' for browsers <IE9
Parameter condition
The condition which determines if the source will be repeated.
Parameter source
The observable sequence or promise that will be run if the condition function returns true.
Returns
An observable sequence which is repeated as long as the condition holds.
namespace rx-lite-experimental
module 'rx-lite-experimental' {}
interface Observable
interface Observable<T> {}
method doWhile
doWhile: (condition: () => boolean) => Observable<T>;
Repeats source as long as condition holds emulating a do while loop.
Parameter condition
The condition which determines if the source will be repeated.
Returns
An observable sequence which is repeated as long as the condition holds.
method expand
expand: ( selector: (item: T) => Observable<T>, scheduler?: IScheduler) => Observable<T>;
Expands an observable sequence by recursively invoking selector.
Parameter selector
Selector function to invoke for each produced element, resulting in another sequence to which the selector will be invoked recursively again.
Parameter scheduler
Scheduler on which to perform the expansion. If not provided, this defaults to the current thread scheduler.
Returns
An observable sequence containing all the elements produced by the recursive expansion.
method forkJoin
forkJoin: { <TSecond, TResult>( second: Observable<TSecond>, resultSelector: (left: T, right: TSecond) => TResult ): Observable<TResult>; <TSecond, TResult>( second: IPromise<TSecond>, resultSelector: (left: T, right: TSecond) => TResult ): Observable<TResult>;};
Runs two observable sequences in parallel and combines their last elemenets.
Parameter second
Second observable sequence or promise.
Parameter resultSelector
Result selector function to invoke with the last elements of both sequences.
Returns
An observable sequence with the result of calling the selector function with the last elements of both input sequences.
method let
let: <TResult>( selector: (source: Observable<T>) => Observable<TResult>) => Observable<TResult>;
Returns an observable sequence that is the result of invoking the selector on the source sequence, without sharing subscriptions. This operator allows for a fluent style of writing queries that use the same sequence multiple times.
Parameter selector
Selector function which can use the source sequence as many times as needed, without sharing subscriptions to the source sequence.
Returns
An observable sequence that contains the elements of a sequence produced by multicasting the source sequence within a selector function.
method letBind
letBind: <TResult>( selector: (source: Observable<T>) => Observable<TResult>) => Observable<TResult>;
Returns an observable sequence that is the result of invoking the selector on the source sequence, without sharing subscriptions. This operator allows for a fluent style of writing queries that use the same sequence multiple times.
Parameter selector
Selector function which can use the source sequence as many times as needed, without sharing subscriptions to the source sequence.
Returns
An observable sequence that contains the elements of a sequence produced by multicasting the source sequence within a selector function.
method manySelect
manySelect: <TResult>( selector: ( item: Observable<T>, index: number, source: Observable<T> ) => TResult, scheduler?: IScheduler) => Observable<TResult>;
Comonadic bind operator.
Parameter selector
A transform function to apply to each element.
Parameter scheduler
Scheduler used to execute the operation. If not specified, defaults to the ImmediateScheduler.
Returns
An observable sequence which results from the comonadic bind operation.
interface ObservableStatic
interface ObservableStatic {}
method case
case: { <T>( selector: () => string, sources: { [key: string]: Observable<T> }, elseSource: Observable<T> ): Observable<T>; <T>( selector: () => string, sources: { [key: string]: IPromise<T> }, elseSource: Observable<T> ): Observable<T>; <T>( selector: () => string, sources: { [key: string]: Observable<T> }, elseSource: IPromise<T> ): Observable<T>; <T>( selector: () => string, sources: { [key: string]: IPromise<T> }, elseSource: IPromise<T> ): Observable<T>; <T>( selector: () => string, sources: { [key: string]: Observable<T> }, scheduler?: IScheduler ): Observable<T>; <T>( selector: () => string, sources: { [key: string]: IPromise<T> }, scheduler?: IScheduler ): Observable<T>; <T>( selector: () => number, sources: { [key: number]: Observable<T> }, elseSource: Observable<T> ): Observable<T>; <T>( selector: () => number, sources: { [key: number]: IPromise<T> }, elseSource: Observable<T> ): Observable<T>; <T>( selector: () => number, sources: { [key: number]: Observable<T> }, elseSource: IPromise<T> ): Observable<T>; <T>( selector: () => number, sources: { [key: number]: IPromise<T> }, elseSource: IPromise<T> ): Observable<T>; <T>( selector: () => number, sources: { [key: number]: Observable<T> }, scheduler?: IScheduler ): Observable<T>; <T>( selector: () => number, sources: { [key: number]: IPromise<T> }, scheduler?: IScheduler ): Observable<T>;};
Uses selector to determine which source in sources to use. There is an alias 'switchCase' for browsers <IE9.
Parameter selector
The function which extracts the value for to test in a case statement.
Parameter sources
A object which has keys which correspond to the case statement labels.
Parameter elseSource
The observable sequence or promise that will be run if the sources are not matched.
Returns
An observable sequence which is determined by a case statement.
Example 1
res = Rx.Observable.case(selector, { '1': obs1, '2': obs2 }, obs0);
Uses selector to determine which source in sources to use. There is an alias 'switchCase' for browsers <IE9.
Parameter selector
The function which extracts the value for to test in a case statement.
Parameter sources
A object which has keys which correspond to the case statement labels.
Parameter scheduler
Scheduler used to create Rx.Observabe.Empty.
Returns
An observable sequence which is determined by a case statement.
Example 1
res = Rx.Observable.case(selector, { '1': obs1, '2': obs2 }); res = Rx.Observable.case(selector, { '1': obs1, '2': obs2 }, scheduler);
method for
for: <T, TResult>( sources: T[], resultSelector: (item: T) => Observable<TResult>) => Observable<TResult>;
Concatenates the observable sequences obtained by running the specified result selector for each element in source. There is an alias for this method called 'forIn' for browsers <IE9
Parameter sources
An array of values to turn into an observable sequence.
Parameter resultSelector
A function to apply to each item in the sources array to turn it into an observable sequence.
Returns
An observable sequence from the concatenated observable sequences.
method forIn
forIn: <T, TResult>( sources: T[], resultSelector: (item: T) => Observable<TResult>) => Observable<TResult>;
Concatenates the observable sequences obtained by running the specified result selector for each element in source. There is an alias for this method called 'forIn' for browsers <IE9
Parameter sources
An array of values to turn into an observable sequence.
Parameter resultSelector
A function to apply to each item in the sources array to turn it into an observable sequence.
Returns
An observable sequence from the concatenated observable sequences.
method forkJoin
forkJoin: { <T>(sources: Array<Observable<T>>): Observable<T[]>; <T>(sources: IPromise<T>[]): Observable<T[]>; <T>(...args: Observable<T>[]): Observable<T[]>; <T>(...args: IPromise<T>[]): Observable<T[]>;};
Runs all observable sequences in parallel and collect their last elements.
Parameter sources
Array of source sequences or promises.
Returns
An observable sequence with an array collecting the last elements of all the input sequences.
Example 1
res = Rx.Observable.forkJoin([obs1, obs2]);
Runs all observable sequences in parallel and collect their last elements.
Parameter args
Source sequences or promises.
Returns
An observable sequence with an array collecting the last elements of all the input sequences.
Example 1
res = Rx.Observable.forkJoin(obs1, obs2, ...);
method if
if: { <T>( condition: () => boolean, thenSource: Observable<T>, elseSource: Observable<T> ): Observable<T>; <T>( condition: () => boolean, thenSource: Observable<T>, elseSource: IPromise<T> ): Observable<T>; <T>( condition: () => boolean, thenSource: IPromise<T>, elseSource: Observable<T> ): Observable<T>; <T>( condition: () => boolean, thenSource: IPromise<T>, elseSource: IPromise<T> ): Observable<T>; <T>( condition: () => boolean, thenSource: Observable<T>, scheduler?: IScheduler ): Observable<T>; <T>( condition: () => boolean, thenSource: IPromise<T>, scheduler?: IScheduler ): Observable<T>;};
Determines whether an observable collection contains values. There is an alias for this method called 'ifThen' for browsers <IE9
Parameter condition
The condition which determines if the thenSource or elseSource will be run.
Parameter thenSource
The observable sequence or promise that will be run if the condition function returns true.
Parameter elseSource
The observable sequence or promise that will be run if the condition function returns false.
Returns
An observable sequence which is either the thenSource or elseSource.
Example 1
res = Rx.Observable.if(condition, obs1, obs2);
Determines whether an observable collection contains values. There is an alias for this method called 'ifThen' for browsers <IE9
Parameter condition
The condition which determines if the thenSource or empty sequence will be run.
Parameter thenSource
The observable sequence or promise that will be run if the condition function returns true.
Parameter scheduler
Scheduler used to create Rx.Observabe.Empty.
Returns
An observable sequence which is either the thenSource or empty sequence.
Example 1
res = Rx.Observable.if(condition, obs1, scheduler);
method ifThen
ifThen: { <T>( condition: () => boolean, thenSource: Observable<T>, elseSource: Observable<T> ): Observable<T>; <T>( condition: () => boolean, thenSource: Observable<T>, elseSource: IPromise<T> ): Observable<T>; <T>( condition: () => boolean, thenSource: IPromise<T>, elseSource: Observable<T> ): Observable<T>; <T>( condition: () => boolean, thenSource: IPromise<T>, elseSource: IPromise<T> ): Observable<T>; <T>( condition: () => boolean, thenSource: Observable<T>, scheduler?: IScheduler ): Observable<T>; <T>( condition: () => boolean, thenSource: IPromise<T>, scheduler?: IScheduler ): Observable<T>;};
Determines whether an observable collection contains values. There is an alias for this method called 'ifThen' for browsers <IE9
Parameter condition
The condition which determines if the thenSource or elseSource will be run.
Parameter thenSource
The observable sequence or promise that will be run if the condition function returns true.
Parameter elseSource
The observable sequence or promise that will be run if the condition function returns false.
Returns
An observable sequence which is either the thenSource or elseSource.
Example 1
res = Rx.Observable.if(condition, obs1, obs2);
Determines whether an observable collection contains values. There is an alias for this method called 'ifThen' for browsers <IE9
Parameter condition
The condition which determines if the thenSource or empty sequence will be run.
Parameter thenSource
The observable sequence or promise that will be run if the condition function returns true.
Parameter scheduler
Scheduler used to create Rx.Observabe.Empty.
Returns
An observable sequence which is either the thenSource or empty sequence.
Example 1
res = Rx.Observable.if(condition, obs1, scheduler);
method switchCase
switchCase: { <T>( selector: () => string, sources: { [key: string]: Observable<T> }, elseSource: Observable<T> ): Observable<T>; <T>( selector: () => string, sources: { [key: string]: IPromise<T> }, elseSource: Observable<T> ): Observable<T>; <T>( selector: () => string, sources: { [key: string]: Observable<T> }, elseSource: IPromise<T> ): Observable<T>; <T>( selector: () => string, sources: { [key: string]: IPromise<T> }, elseSource: IPromise<T> ): Observable<T>; <T>( selector: () => string, sources: { [key: string]: Observable<T> }, scheduler?: IScheduler ): Observable<T>; <T>( selector: () => string, sources: { [key: string]: IPromise<T> }, scheduler?: IScheduler ): Observable<T>; <T>( selector: () => number, sources: { [key: number]: Observable<T> }, elseSource: Observable<T> ): Observable<T>; <T>( selector: () => number, sources: { [key: number]: IPromise<T> }, elseSource: Observable<T> ): Observable<T>; <T>( selector: () => number, sources: { [key: number]: Observable<T> }, elseSource: IPromise<T> ): Observable<T>; <T>( selector: () => number, sources: { [key: number]: IPromise<T> }, elseSource: IPromise<T> ): Observable<T>; <T>( selector: () => number, sources: { [key: number]: Observable<T> }, scheduler?: IScheduler ): Observable<T>; <T>( selector: () => number, sources: { [key: number]: IPromise<T> }, scheduler?: IScheduler ): Observable<T>;};
Uses selector to determine which source in sources to use. There is an alias 'switchCase' for browsers <IE9.
Parameter selector
The function which extracts the value for to test in a case statement.
Parameter sources
A object which has keys which correspond to the case statement labels.
Parameter elseSource
The observable sequence or promise that will be run if the sources are not matched.
Returns
An observable sequence which is determined by a case statement.
Example 1
res = Rx.Observable.case(selector, { '1': obs1, '2': obs2 }, obs0);
Uses selector to determine which source in sources to use. There is an alias 'switchCase' for browsers <IE9.
Parameter selector
The function which extracts the value for to test in a case statement.
Parameter sources
A object which has keys which correspond to the case statement labels.
Parameter scheduler
Scheduler used to create Rx.Observabe.Empty.
Returns
An observable sequence which is determined by a case statement.
Example 1
res = Rx.Observable.case(selector, { '1': obs1, '2': obs2 }); res = Rx.Observable.case(selector, { '1': obs1, '2': obs2 }, scheduler);
method while
while: { <T>(condition: () => boolean, source: Observable<T>): Observable<T>; <T>(condition: () => boolean, source: IPromise<T>): Observable<T>;};
Repeats source as long as condition holds emulating a while loop. There is an alias for this method called 'whileDo' for browsers <IE9
Parameter condition
The condition which determines if the source will be repeated.
Parameter source
The observable sequence or promise that will be run if the condition function returns true.
Returns
An observable sequence which is repeated as long as the condition holds.
method whileDo
whileDo: { <T>(condition: () => boolean, source: Observable<T>): Observable<T>; <T>(condition: () => boolean, source: IPromise<T>): Observable<T>;};
Repeats source as long as condition holds emulating a while loop. There is an alias for this method called 'whileDo' for browsers <IE9
Parameter condition
The condition which determines if the source will be repeated.
Parameter source
The observable sequence or promise that will be run if the condition function returns true.
Returns
An observable sequence which is repeated as long as the condition holds.
Package Files (1)
Dependencies (1)
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-experimental
.
- Markdown[![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@types/rx-lite-experimental)
- HTML<a href="https://www.jsdocs.io/package/@types/rx-lite-experimental"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 4359 ms. - Missing or incorrect documentation? Open an issue for this package.