wishthis/node_modules/rxjs/dist/cjs/internal/scheduled/scheduled.js

41 lines
1.9 KiB
JavaScript
Raw Normal View History

2022-01-21 08:28:41 +00:00
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
2022-06-08 10:36:39 +00:00
exports.scheduled = void 0;
2022-01-21 08:28:41 +00:00
var scheduleObservable_1 = require("./scheduleObservable");
var schedulePromise_1 = require("./schedulePromise");
var scheduleArray_1 = require("./scheduleArray");
var scheduleIterable_1 = require("./scheduleIterable");
2022-06-08 10:36:39 +00:00
var scheduleAsyncIterable_1 = require("./scheduleAsyncIterable");
2022-01-21 08:28:41 +00:00
var isInteropObservable_1 = require("../util/isInteropObservable");
var isPromise_1 = require("../util/isPromise");
var isArrayLike_1 = require("../util/isArrayLike");
var isIterable_1 = require("../util/isIterable");
2022-06-08 10:36:39 +00:00
var isAsyncIterable_1 = require("../util/isAsyncIterable");
var throwUnobservableError_1 = require("../util/throwUnobservableError");
var isReadableStreamLike_1 = require("../util/isReadableStreamLike");
var scheduleReadableStreamLike_1 = require("./scheduleReadableStreamLike");
2022-01-21 08:28:41 +00:00
function scheduled(input, scheduler) {
if (input != null) {
if (isInteropObservable_1.isInteropObservable(input)) {
return scheduleObservable_1.scheduleObservable(input, scheduler);
}
2022-06-08 10:36:39 +00:00
if (isArrayLike_1.isArrayLike(input)) {
return scheduleArray_1.scheduleArray(input, scheduler);
}
if (isPromise_1.isPromise(input)) {
2022-01-21 08:28:41 +00:00
return schedulePromise_1.schedulePromise(input, scheduler);
}
2022-06-08 10:36:39 +00:00
if (isAsyncIterable_1.isAsyncIterable(input)) {
return scheduleAsyncIterable_1.scheduleAsyncIterable(input, scheduler);
2022-01-21 08:28:41 +00:00
}
2022-06-08 10:36:39 +00:00
if (isIterable_1.isIterable(input)) {
2022-01-21 08:28:41 +00:00
return scheduleIterable_1.scheduleIterable(input, scheduler);
}
2022-06-08 10:36:39 +00:00
if (isReadableStreamLike_1.isReadableStreamLike(input)) {
return scheduleReadableStreamLike_1.scheduleReadableStreamLike(input, scheduler);
}
2022-01-21 08:28:41 +00:00
}
2022-06-08 10:36:39 +00:00
throw throwUnobservableError_1.createInvalidObservableTypeError(input);
2022-01-21 08:28:41 +00:00
}
exports.scheduled = scheduled;
//# sourceMappingURL=scheduled.js.map