Last change
on this file since 59329aa was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
1.1 KB
|
Line | |
---|
1 | import { scheduleObservable } from './scheduleObservable';
|
---|
2 | import { schedulePromise } from './schedulePromise';
|
---|
3 | import { scheduleArray } from './scheduleArray';
|
---|
4 | import { scheduleIterable } from './scheduleIterable';
|
---|
5 | import { isInteropObservable } from '../util/isInteropObservable';
|
---|
6 | import { isPromise } from '../util/isPromise';
|
---|
7 | import { isArrayLike } from '../util/isArrayLike';
|
---|
8 | import { isIterable } from '../util/isIterable';
|
---|
9 | export function scheduled(input, scheduler) {
|
---|
10 | if (input != null) {
|
---|
11 | if (isInteropObservable(input)) {
|
---|
12 | return scheduleObservable(input, scheduler);
|
---|
13 | }
|
---|
14 | else if (isPromise(input)) {
|
---|
15 | return schedulePromise(input, scheduler);
|
---|
16 | }
|
---|
17 | else if (isArrayLike(input)) {
|
---|
18 | return scheduleArray(input, scheduler);
|
---|
19 | }
|
---|
20 | else if (isIterable(input) || typeof input === 'string') {
|
---|
21 | return scheduleIterable(input, scheduler);
|
---|
22 | }
|
---|
23 | }
|
---|
24 | throw new TypeError((input !== null && typeof input || input) + ' is not observable');
|
---|
25 | }
|
---|
26 | //# sourceMappingURL=scheduled.js.map |
---|
Note:
See
TracBrowser
for help on using the repository browser.