@reactive-js/core
Advanced tools
Comparing version 0.116.1 to 0.117.0
@@ -251,7 +251,3 @@ import { EnumerableLike } from "../collections.js"; | ||
forEach<T>(effect: SideEffect1<T>): ObservableOperatorWithSideEffects<T, T>; | ||
forkMerge<TObservableIn extends ObservableLike, T>(fst: Function1<TObservableIn, PureRunnableLike<T>>, snd: Function1<TObservableIn, PureRunnableLike<T>>, ...tail: readonly Function1<TObservableIn, PureRunnableLike<T>>[]): Function1<TObservableIn, PureRunnableLike<T>>; | ||
forkMerge<TObservableIn extends ObservableLike, T>(fst: Function1<TObservableIn, PureDeferredObservableLike<T>>, snd: Function1<TObservableIn, PureDeferredObservableLike<T>>, ...tail: readonly Function1<TObservableIn, PureDeferredObservableLike<T>>[]): Function1<TObservableIn, PureDeferredObservableLike<T>>; | ||
forkMerge<TObservableIn extends ObservableLike, T>(fst: Function1<TObservableIn, RunnableLike<T>>, snd: Function1<TObservableIn, RunnableLike<T>>, ...tail: readonly Function1<TObservableIn, RunnableLike<T>>[]): Function1<TObservableIn, RunnableWithSideEffectsLike<T>>; | ||
forkMerge<TObservableIn extends ObservableLike, T>(fst: Function1<TObservableIn, PureObservableLike<T>>, snd: Function1<TObservableIn, PureObservableLike<T>>, ...tail: readonly Function1<TObservableIn, PureObservableLike<T>>[]): Function1<TObservableIn, MulticastObservableLike<T>>; | ||
forkMerge<TObservableIn extends ObservableLike, T>(fst: Function1<TObservableIn, ObservableLike<T>>, snd: Function1<TObservableIn, ObservableLike<T>>, ...tail: readonly Function1<TObservableIn, ObservableLike<T>>[]): Function1<TObservableIn, DeferredObservableWithSideEffectsLike<T>>; | ||
forkMerge<TIn, TOut>(fst: Function1<MulticastObservableLike<TIn>, ObservableLike<TOut>>, snd: Function1<MulticastObservableLike<TIn>, ObservableLike<TOut>>, ...tail: readonly Function1<MulticastObservableLike<TIn>, ObservableLike<TOut>>[]): Function1<ObservableLike<TIn>, DeferredObservableWithSideEffectsLike<TOut>>; | ||
fromAsyncFactory<T>(): Function1<Function1<AbortSignal, Promise<T>>, DeferredObservableWithSideEffectsLike<T>>; | ||
@@ -258,0 +254,0 @@ fromAsyncIterable<T>(): Function1<AsyncIterable<T>, DeferredObservableWithSideEffectsLike<T>>; |
import * as ReadonlyArray from "../../../collections/ReadonlyArray.js"; | ||
import { ObservableLike_isDeferred, ObservableLike_isPure, ObservableLike_isRunnable, ObservableLike_observe, } from "../../../concurrent.js"; | ||
import { ObservableLike_observe, } from "../../../concurrent.js"; | ||
import { invoke, pipe } from "../../../functions.js"; | ||
import Observable_allArePure from "./Observable.allArePure.js"; | ||
import Observable_allAreRunnable from "./Observable.allAreRunnable.js"; | ||
import Observable_createWithConfig from "./Observable.createWithConfig.js"; | ||
import * as Disposable from "../../../utils/Disposable.js"; | ||
import Observable_create from "./Observable.create.js"; | ||
import Observable_isDeferred from "./Observable.isDeferred.js"; | ||
import Observable_mergeMany from "./Observable.mergeMany.js"; | ||
import Observable_multicast from "./Observable.multicast.js"; | ||
const Observable_forkMerge = ((...ops) => (obs) => { | ||
const mapped = pipe(ops, ReadonlyArray.map(op => op(obs))); | ||
return Observable_allArePure(mapped) | ||
? Observable_mergeMany(mapped) | ||
: Observable_createWithConfig(observer => { | ||
const src = Observable_isDeferred(obs) | ||
? pipe(obs, Observable_multicast(observer, { autoDispose: true })) | ||
: obs; | ||
pipe(ops, ReadonlyArray.map(op => op(src)), Observable_mergeMany, invoke(ObservableLike_observe, observer)); | ||
}, { | ||
[ObservableLike_isPure]: false, | ||
[ObservableLike_isDeferred]: true, | ||
[ObservableLike_isRunnable]: Observable_allAreRunnable(mapped), | ||
}); | ||
const Observable_forkMerge = (...ops) => (obs) => Observable_create(observer => { | ||
const src = Observable_isDeferred(obs) | ||
? pipe(obs, Observable_multicast(observer, { autoDispose: true }), Disposable.addTo(observer)) | ||
: obs; | ||
pipe(ops, ReadonlyArray.map(op => op(src)), Observable_mergeMany, invoke(ObservableLike_observe, observer)); | ||
}); | ||
export default Observable_forkMerge; |
{ | ||
"name": "@reactive-js/core", | ||
"version": "0.116.1", | ||
"version": "0.117.0", | ||
"type": "module", | ||
@@ -87,3 +87,3 @@ "keywords": [ | ||
}, | ||
"gitHead": "ce4584f79fb2c25f012c5f545a21bcf76d22698b" | ||
"gitHead": "7b8649bc12963cebc88718432542059709db7733" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
659194
11727