Last change
on this file since 1ad8e64 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
485 bytes
|
Line | |
---|
1 | import { Observable } from '../Observable';
|
---|
2 | import { subscribeToObservable } from '../util/subscribeToObservable';
|
---|
3 | import { InteropObservable, SchedulerLike } from '../types';
|
---|
4 | import { scheduleObservable } from '../scheduled/scheduleObservable';
|
---|
5 |
|
---|
6 | export function fromObservable<T>(input: InteropObservable<T>, scheduler?: SchedulerLike) {
|
---|
7 | if (!scheduler) {
|
---|
8 | return new Observable<T>(subscribeToObservable(input));
|
---|
9 | } else {
|
---|
10 | return scheduleObservable(input, scheduler);
|
---|
11 | }
|
---|
12 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.