This commit is contained in:
root
2023-07-30 22:05:51 +02:00
parent 65a0be1350
commit 06acaecee1
12267 changed files with 671638 additions and 15 deletions

View File

@@ -0,0 +1,15 @@
import { concat } from '../observable/concat';
import { take } from './take';
import { ignoreElements } from './ignoreElements';
import { mapTo } from './mapTo';
import { mergeMap } from './mergeMap';
import { innerFrom } from '../observable/innerFrom';
export function delayWhen(delayDurationSelector, subscriptionDelay) {
if (subscriptionDelay) {
return function (source) {
return concat(subscriptionDelay.pipe(take(1), ignoreElements()), source.pipe(delayWhen(delayDurationSelector)));
};
}
return mergeMap(function (value, index) { return innerFrom(delayDurationSelector(value, index)).pipe(take(1), mapTo(value)); });
}
//# sourceMappingURL=delayWhen.js.map