rxjs#ObservableInput TypeScript Examples
The following examples show how to use
rxjs#ObservableInput.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: scheduled.d.ts From amazon-kinesis-video-streams-webrtc-sdk-js-with-amazon-cognito with MIT No Attribution | 6 votes |
/**
* Converts from a common {@link ObservableInput} type to an observable where subscription and emissions
* are scheduled on the provided scheduler.
*
* @see from
* @see of
*
* @param input The observable, array, promise, iterable, etc you would like to schedule
* @param scheduler The scheduler to use to schedule the subscription and emissions from
* the returned observable.
*/
export declare function scheduled<T>(input: ObservableInput<T>, scheduler: SchedulerLike): Observable<T>;
Example #2
Source File: scheduled.ts From amazon-kinesis-video-streams-webrtc-sdk-js-with-amazon-cognito with MIT No Attribution | 6 votes |
/**
* Converts from a common {@link ObservableInput} type to an observable where subscription and emissions
* are scheduled on the provided scheduler.
*
* @see from
* @see of
*
* @param input The observable, array, promise, iterable, etc you would like to schedule
* @param scheduler The scheduler to use to schedule the subscription and emissions from
* the returned observable.
*/
export function scheduled<T>(input: ObservableInput<T>, scheduler: SchedulerLike): Observable<T> {
if (input != null) {
if (isInteropObservable(input)) {
return scheduleObservable(input, scheduler);
} else if (isPromise(input)) {
return schedulePromise(input, scheduler);
} else if (isArrayLike(input)) {
return scheduleArray(input, scheduler);
} else if (isIterable(input) || typeof input === 'string') {
return scheduleIterable(input, scheduler);
}
}
throw new TypeError((input !== null && typeof input || input) + ' is not observable');
}
Example #3
Source File: rxjs.resource.ts From slickgrid-universal with MIT License | 5 votes |
/** Projects each source value to an Observable which is merged in the output Observable, emitting values only from the most recently projected Observable. */
switchMap<T, O extends ObservableInput<any>>(project: (value: T, index: number) => O): OperatorFunction<T, ObservedValueOf<O>> {
return switchMap(project);
}
Example #4
Source File: rxjsResourceStub.ts From slickgrid-universal with MIT License | 5 votes |
switchMap<T, O extends ObservableInput<any>>(project: (value: T, index: number) => O): OperatorFunction<T, ObservedValueOf<O>> {
return switchMap(project);
}
Example #5
Source File: transfer.page.ts From capture-lite with GNU General Public License v3.0 | 5 votes |
readonly keyboardIsHidden$ = merge(
<ObservableInput<boolean>>this.platform.keyboardDidHide.pipe(mapTo(true)),
<ObservableInput<boolean>>this.platform.keyboardDidShow.pipe(mapTo(false))
).pipe(startWith(true));
Example #6
Source File: api.service.ts From storm with MIT License | 5 votes |
private catchError(err: HttpErrorResponse, caught: Observable<HttpEvent<any>>): ObservableInput<any> {
return throwError(new ApiException(err.status, err.error.Error));
}