@typed/fx 1.0.6 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Fx.d.ts +3 -3
- package/dist/Fx.d.ts.map +1 -1
- package/dist/Subject/HoldSubject.d.ts +3 -3
- package/dist/Subject/HoldSubject.d.ts.map +1 -1
- package/dist/Subject/HoldSubject.js.map +1 -1
- package/dist/Subject/Subject.js +1 -1
- package/dist/Subject/Subject.js.map +1 -1
- package/dist/Subject/SynchronizedSubject.js +1 -1
- package/dist/Subject/SynchronizedSubject.js.map +1 -1
- package/dist/_internal/RefCounter.d.ts +1 -1
- package/dist/_internal/RefCounter.d.ts.map +1 -1
- package/dist/constructor/async.d.ts +2 -2
- package/dist/constructor/async.d.ts.map +1 -1
- package/dist/constructor/asyncEffect.d.ts +1 -1
- package/dist/constructor/asyncEffect.d.ts.map +1 -1
- package/dist/constructor/asyncInterrupt.d.ts +2 -2
- package/dist/constructor/asyncInterrupt.d.ts.map +1 -1
- package/dist/constructor/asyncInterrupt.js.map +1 -1
- package/dist/constructor/asyncOption.d.ts +3 -3
- package/dist/constructor/asyncOption.d.ts.map +1 -1
- package/dist/constructor/at.d.ts +2 -2
- package/dist/constructor/at.d.ts.map +1 -1
- package/dist/constructor/die.d.ts +1 -1
- package/dist/constructor/die.d.ts.map +1 -1
- package/dist/constructor/dieMessage.d.ts +1 -1
- package/dist/constructor/dieMessage.d.ts.map +1 -1
- package/dist/constructor/dieSync.d.ts +1 -1
- package/dist/constructor/dieSync.d.ts.map +1 -1
- package/dist/constructor/done.js +1 -1
- package/dist/constructor/done.js.map +1 -1
- package/dist/constructor/empty.js +1 -1
- package/dist/constructor/empty.js.map +1 -1
- package/dist/constructor/fail.d.ts +1 -1
- package/dist/constructor/fail.d.ts.map +1 -1
- package/dist/constructor/failCause.d.ts +2 -2
- package/dist/constructor/failCause.d.ts.map +1 -1
- package/dist/constructor/failCauseSync.d.ts +2 -2
- package/dist/constructor/failCauseSync.d.ts.map +1 -1
- package/dist/constructor/fromArray.js +1 -1
- package/dist/constructor/fromArray.js.map +1 -1
- package/dist/constructor/fromEffect.js +1 -1
- package/dist/constructor/fromEffect.js.map +1 -1
- package/dist/constructor/fromEither.d.ts +2 -2
- package/dist/constructor/fromEither.d.ts.map +1 -1
- package/dist/constructor/fromEitherCause.d.ts +3 -3
- package/dist/constructor/fromEitherCause.d.ts.map +1 -1
- package/dist/constructor/fromEmitter.d.ts +3 -3
- package/dist/constructor/fromEmitter.d.ts.map +1 -1
- package/dist/constructor/fromFiber.d.ts +2 -2
- package/dist/constructor/fromFiber.d.ts.map +1 -1
- package/dist/constructor/fromFiberEffect.d.ts +2 -2
- package/dist/constructor/fromFiberEffect.d.ts.map +1 -1
- package/dist/constructor/fromIterable.js +1 -1
- package/dist/constructor/fromIterable.js.map +1 -1
- package/dist/constructor/fromOption.d.ts +2 -2
- package/dist/constructor/fromOption.d.ts.map +1 -1
- package/dist/constructor/gen.d.ts +2 -2
- package/dist/constructor/gen.d.ts.map +1 -1
- package/dist/constructor/never.js +1 -1
- package/dist/constructor/never.js.map +1 -1
- package/dist/constructor/periodic.d.ts +2 -2
- package/dist/constructor/periodic.d.ts.map +1 -1
- package/dist/constructor/promise.d.ts +1 -1
- package/dist/constructor/promise.d.ts.map +1 -1
- package/dist/constructor/promiseAbort.d.ts +1 -1
- package/dist/constructor/promiseAbort.d.ts.map +1 -1
- package/dist/constructor/random.d.ts +2 -2
- package/dist/constructor/random.d.ts.map +1 -1
- package/dist/constructor/scheduled.d.ts +1 -1
- package/dist/constructor/scheduled.d.ts.map +1 -1
- package/dist/constructor/service.d.ts +2 -2
- package/dist/constructor/service.d.ts.map +1 -1
- package/dist/constructor/serviceWith.d.ts +2 -2
- package/dist/constructor/serviceWith.d.ts.map +1 -1
- package/dist/constructor/serviceWithEffect.d.ts +2 -2
- package/dist/constructor/serviceWithEffect.d.ts.map +1 -1
- package/dist/constructor/serviceWithFx.d.ts +1 -1
- package/dist/constructor/serviceWithFx.d.ts.map +1 -1
- package/dist/constructor/sync.d.ts +1 -1
- package/dist/constructor/sync.d.ts.map +1 -1
- package/dist/constructor/tryCatchPromise.d.ts +1 -1
- package/dist/constructor/tryCatchPromise.d.ts.map +1 -1
- package/dist/constructor/tryCatchPromiseAbort.d.ts +1 -1
- package/dist/constructor/tryCatchPromiseAbort.d.ts.map +1 -1
- package/dist/constructor/tryPromise.d.ts +1 -1
- package/dist/constructor/tryPromise.d.ts.map +1 -1
- package/dist/constructor/tryPromiseAbort.d.ts +1 -1
- package/dist/constructor/tryPromiseAbort.d.ts.map +1 -1
- package/dist/operator/as.d.ts +1 -1
- package/dist/operator/as.d.ts.map +1 -1
- package/dist/operator/catchAll.d.ts +1 -1
- package/dist/operator/catchAll.d.ts.map +1 -1
- package/dist/operator/catchAllCause.d.ts +1 -1
- package/dist/operator/catchAllCause.d.ts.map +1 -1
- package/dist/operator/catchAllDefect.d.ts +1 -1
- package/dist/operator/catchAllDefect.d.ts.map +1 -1
- package/dist/operator/compact.d.ts +2 -2
- package/dist/operator/compact.d.ts.map +1 -1
- package/dist/operator/concatMap.d.ts +1 -1
- package/dist/operator/concatMap.d.ts.map +1 -1
- package/dist/operator/debounce.d.ts +1 -1
- package/dist/operator/debounce.d.ts.map +1 -1
- package/dist/operator/delay.d.ts +1 -1
- package/dist/operator/delay.d.ts.map +1 -1
- package/dist/operator/exhaustMapEffect.d.ts +2 -2
- package/dist/operator/exhaustMapEffect.d.ts.map +1 -1
- package/dist/operator/exhaustMapLatestEffect.d.ts +2 -2
- package/dist/operator/exhaustMapLatestEffect.d.ts.map +1 -1
- package/dist/operator/filter.d.ts +1 -1
- package/dist/operator/filter.d.ts.map +1 -1
- package/dist/operator/flatMapCause.d.ts +1 -1
- package/dist/operator/flatMapCause.d.ts.map +1 -1
- package/dist/operator/flatMapConcurrently.d.ts +1 -1
- package/dist/operator/flatMapConcurrently.d.ts.map +1 -1
- package/dist/operator/flatMapEffect.d.ts +2 -2
- package/dist/operator/flatMapEffect.d.ts.map +1 -1
- package/dist/operator/flatMapEffectConcurrently.d.ts +2 -2
- package/dist/operator/flatMapEffectConcurrently.d.ts.map +1 -1
- package/dist/operator/hold.d.ts +3 -3
- package/dist/operator/hold.d.ts.map +1 -1
- package/dist/operator/mapCause.d.ts +1 -1
- package/dist/operator/mapCause.d.ts.map +1 -1
- package/dist/operator/mapError.d.ts +1 -1
- package/dist/operator/mapError.d.ts.map +1 -1
- package/dist/operator/multicast.d.ts +4 -4
- package/dist/operator/multicast.d.ts.map +1 -1
- package/dist/operator/onDone.d.ts +1 -1
- package/dist/operator/onDone.d.ts.map +1 -1
- package/dist/operator/onError.d.ts +1 -1
- package/dist/operator/onError.d.ts.map +1 -1
- package/dist/operator/onExit.d.ts +2 -2
- package/dist/operator/onExit.d.ts.map +1 -1
- package/dist/operator/onInterrupt.d.ts +2 -2
- package/dist/operator/onInterrupt.d.ts.map +1 -1
- package/dist/operator/orElse.d.ts +1 -1
- package/dist/operator/orElse.d.ts.map +1 -1
- package/dist/operator/provideLayer.d.ts +2 -2
- package/dist/operator/provideLayer.d.ts.map +1 -1
- package/dist/operator/provideService.d.ts +1 -1
- package/dist/operator/provideService.d.ts.map +1 -1
- package/dist/operator/provideServiceEffect.d.ts +1 -1
- package/dist/operator/provideServiceEffect.d.ts.map +1 -1
- package/dist/operator/provideSomeLayer.d.ts +1 -1
- package/dist/operator/provideSomeLayer.d.ts.map +1 -1
- package/dist/operator/sample.d.ts +1 -1
- package/dist/operator/sample.d.ts.map +1 -1
- package/dist/operator/sandbox.d.ts +2 -2
- package/dist/operator/sandbox.d.ts.map +1 -1
- package/dist/operator/scan.d.ts +1 -1
- package/dist/operator/scan.d.ts.map +1 -1
- package/dist/operator/scanEffect.js +1 -1
- package/dist/operator/scanEffect.js.map +1 -1
- package/dist/operator/separate.d.ts +1 -1
- package/dist/operator/separate.d.ts.map +1 -1
- package/dist/operator/skip.d.ts +1 -1
- package/dist/operator/skip.d.ts.map +1 -1
- package/dist/operator/skipAfter.d.ts +1 -1
- package/dist/operator/skipAfter.d.ts.map +1 -1
- package/dist/operator/skipUntil.d.ts +1 -1
- package/dist/operator/skipUntil.d.ts.map +1 -1
- package/dist/operator/skipWhile.d.ts +2 -2
- package/dist/operator/skipWhile.d.ts.map +1 -1
- package/dist/operator/skipWhile.js.map +1 -1
- package/dist/operator/startWith.d.ts +1 -1
- package/dist/operator/startWith.d.ts.map +1 -1
- package/dist/operator/struct.d.ts +1 -1
- package/dist/operator/struct.d.ts.map +1 -1
- package/dist/operator/switchMapCause.d.ts +1 -1
- package/dist/operator/switchMapCause.d.ts.map +1 -1
- package/dist/operator/switchMapCause.js.map +1 -1
- package/dist/operator/switchMapEffect.d.ts +2 -2
- package/dist/operator/switchMapEffect.d.ts.map +1 -1
- package/dist/operator/switchMapError.d.ts +2 -2
- package/dist/operator/switchMapError.d.ts.map +1 -1
- package/dist/operator/switchMapError.js +1 -1
- package/dist/operator/switchMapError.js.map +1 -1
- package/dist/operator/switchMatch.d.ts.map +1 -1
- package/dist/operator/switchMatch.js +2 -2
- package/dist/operator/switchMatch.js.map +1 -1
- package/dist/operator/take.d.ts +1 -1
- package/dist/operator/take.d.ts.map +1 -1
- package/dist/operator/takeUntil.d.ts +1 -1
- package/dist/operator/takeUntil.d.ts.map +1 -1
- package/dist/operator/takeWhile.d.ts +2 -2
- package/dist/operator/takeWhile.d.ts.map +1 -1
- package/dist/operator/takeWhile.js.map +1 -1
- package/dist/operator/tap.d.ts +1 -1
- package/dist/operator/tap.d.ts.map +1 -1
- package/dist/operator/tapDefect.d.ts +1 -1
- package/dist/operator/tapDefect.d.ts.map +1 -1
- package/dist/operator/tapError.d.ts +1 -1
- package/dist/operator/tapError.d.ts.map +1 -1
- package/dist/operator/throttle.d.ts +2 -2
- package/dist/operator/throttle.d.ts.map +1 -1
- package/dist/operator/tuple.d.ts +1 -1
- package/dist/operator/tuple.d.ts.map +1 -1
- package/dist/operator/withItems.d.ts +1 -1
- package/dist/operator/withItems.d.ts.map +1 -1
- package/dist/operator/withRuntimeFlags.d.ts +1 -1
- package/dist/operator/withRuntimeFlags.d.ts.map +1 -1
- package/dist/run/collectAll.d.ts +1 -1
- package/dist/run/collectAll.d.ts.map +1 -1
- package/dist/run/collectN.d.ts +1 -1
- package/dist/run/collectN.d.ts.map +1 -1
- package/dist/run/drain.d.ts +1 -1
- package/dist/run/drain.d.ts.map +1 -1
- package/dist/run/observe.d.ts +2 -2
- package/dist/run/observe.d.ts.map +1 -1
- package/dist/run/reduce.d.ts +1 -1
- package/dist/run/reduce.d.ts.map +1 -1
- package/dist/run/run.d.ts +2 -2
- package/dist/run/run.d.ts.map +1 -1
- package/dist/run/run.js +1 -1
- package/dist/run/run.js.map +1 -1
- package/dist/run/unsafe.d.ts +5 -5
- package/dist/run/unsafe.d.ts.map +1 -1
- package/dist/typeclass/Alternative.d.ts +2 -2
- package/dist/typeclass/Alternative.d.ts.map +1 -1
- package/dist/typeclass/Applicative.d.ts +2 -2
- package/dist/typeclass/Applicative.d.ts.map +1 -1
- package/dist/typeclass/Bicovariant.d.ts +2 -2
- package/dist/typeclass/Bicovariant.d.ts.map +1 -1
- package/dist/typeclass/Chainable.d.ts +2 -2
- package/dist/typeclass/Chainable.d.ts.map +1 -1
- package/dist/typeclass/Coproduct.d.ts +2 -2
- package/dist/typeclass/Coproduct.d.ts.map +1 -1
- package/dist/typeclass/Covariant.d.ts +2 -2
- package/dist/typeclass/Covariant.d.ts.map +1 -1
- package/dist/typeclass/FlatMap.d.ts +2 -2
- package/dist/typeclass/FlatMap.d.ts.map +1 -1
- package/dist/typeclass/Monad.d.ts +2 -2
- package/dist/typeclass/Monad.d.ts.map +1 -1
- package/dist/typeclass/Of.d.ts +2 -2
- package/dist/typeclass/Of.d.ts.map +1 -1
- package/dist/typeclass/Pointed.d.ts +2 -2
- package/dist/typeclass/Pointed.d.ts.map +1 -1
- package/dist/typeclass/Product.d.ts +2 -2
- package/dist/typeclass/Product.d.ts.map +1 -1
- package/dist/typeclass/SemiAlternative.d.ts +2 -2
- package/dist/typeclass/SemiAlternative.d.ts.map +1 -1
- package/dist/typeclass/SemiApplicative.d.ts +2 -2
- package/dist/typeclass/SemiApplicative.d.ts.map +1 -1
- package/dist/typeclass/SemiCoproduct.d.ts +2 -2
- package/dist/typeclass/SemiCoproduct.d.ts.map +1 -1
- package/dist/typeclass/SemiProduct.d.ts +1 -1
- package/dist/typeclass/SemiProduct.d.ts.map +1 -1
- package/dist/typeclass/TypeLambda.d.ts +2 -2
- package/dist/typeclass/TypeLambda.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/Fx.ts +3 -3
- package/src/Subject/HoldSubject.ts +3 -3
- package/src/_internal/RefCounter.ts +1 -1
- package/src/constructor/async.ts +2 -2
- package/src/constructor/asyncEffect.ts +1 -1
- package/src/constructor/asyncInterrupt.ts +3 -5
- package/src/constructor/asyncOption.ts +3 -3
- package/src/constructor/at.ts +2 -2
- package/src/constructor/die.ts +1 -1
- package/src/constructor/dieMessage.ts +1 -1
- package/src/constructor/dieSync.ts +1 -1
- package/src/constructor/fail.ts +1 -1
- package/src/constructor/failCause.ts +2 -2
- package/src/constructor/failCauseSync.ts +2 -2
- package/src/constructor/fromEither.ts +2 -2
- package/src/constructor/fromEitherCause.ts +3 -3
- package/src/constructor/fromEmitter.ts +3 -3
- package/src/constructor/fromFiber.ts +2 -2
- package/src/constructor/fromFiberEffect.ts +2 -2
- package/src/constructor/fromOption.ts +2 -2
- package/src/constructor/gen.ts +2 -2
- package/src/constructor/periodic.ts +2 -2
- package/src/constructor/promise.ts +1 -1
- package/src/constructor/promiseAbort.ts +1 -1
- package/src/constructor/random.ts +2 -2
- package/src/constructor/scheduled.ts +1 -1
- package/src/constructor/service.ts +2 -2
- package/src/constructor/serviceWith.ts +2 -2
- package/src/constructor/serviceWithEffect.ts +2 -2
- package/src/constructor/serviceWithFx.ts +1 -1
- package/src/constructor/sync.ts +1 -1
- package/src/constructor/tryCatchPromise.ts +1 -1
- package/src/constructor/tryCatchPromiseAbort.ts +1 -1
- package/src/constructor/tryPromise.ts +1 -1
- package/src/constructor/tryPromiseAbort.ts +1 -1
- package/src/operator/as.ts +1 -1
- package/src/operator/catchAll.ts +1 -1
- package/src/operator/catchAllCause.ts +1 -1
- package/src/operator/catchAllDefect.ts +1 -1
- package/src/operator/compact.ts +2 -2
- package/src/operator/concatMap.ts +1 -1
- package/src/operator/debounce.ts +1 -1
- package/src/operator/delay.ts +1 -1
- package/src/operator/exhaustMap.ts +1 -1
- package/src/operator/exhaustMapEffect.ts +2 -2
- package/src/operator/exhaustMapLatest.ts +2 -2
- package/src/operator/exhaustMapLatestEffect.ts +2 -2
- package/src/operator/filter.ts +1 -1
- package/src/operator/flatMapCause.ts +1 -1
- package/src/operator/flatMapConcurrently.ts +1 -1
- package/src/operator/flatMapEffect.ts +2 -2
- package/src/operator/flatMapEffectConcurrently.ts +2 -2
- package/src/operator/hold.ts +3 -3
- package/src/operator/mapCause.ts +1 -1
- package/src/operator/mapError.ts +1 -1
- package/src/operator/multicast.ts +4 -4
- package/src/operator/onDone.ts +1 -1
- package/src/operator/onError.ts +1 -1
- package/src/operator/onExit.ts +2 -2
- package/src/operator/onInterrupt.ts +2 -2
- package/src/operator/orElse.ts +1 -1
- package/src/operator/provideEnvironment.ts +1 -1
- package/src/operator/provideLayer.ts +2 -2
- package/src/operator/provideService.ts +1 -1
- package/src/operator/provideServiceEffect.ts +2 -2
- package/src/operator/provideSomeEnvironment.ts +1 -1
- package/src/operator/provideSomeLayer.ts +1 -1
- package/src/operator/race.ts +1 -1
- package/src/operator/sample.ts +1 -1
- package/src/operator/sandbox.ts +2 -2
- package/src/operator/scan.ts +1 -1
- package/src/operator/separate.ts +1 -1
- package/src/operator/since.test.ts +48 -47
- package/src/operator/skip.ts +1 -1
- package/src/operator/skipAfter.ts +1 -1
- package/src/operator/skipUntil.ts +1 -1
- package/src/operator/skipWhile.ts +2 -2
- package/src/operator/startWith.ts +1 -1
- package/src/operator/struct.ts +1 -1
- package/src/operator/switchMapCause.ts +4 -4
- package/src/operator/switchMapEffect.ts +2 -2
- package/src/operator/switchMapError.ts +4 -7
- package/src/operator/switchMatch.test.ts +2 -2
- package/src/operator/switchMatch.ts +2 -2
- package/src/operator/take.ts +1 -1
- package/src/operator/takeUntil.ts +2 -2
- package/src/operator/takeWhile.ts +2 -2
- package/src/operator/tap.ts +1 -1
- package/src/operator/tapDefect.ts +1 -1
- package/src/operator/tapError.ts +1 -1
- package/src/operator/throttle.ts +3 -3
- package/src/operator/tuple.ts +1 -1
- package/src/operator/until.test.ts +47 -47
- package/src/operator/withItems.ts +1 -1
- package/src/operator/withRuntimeFlags.ts +1 -1
- package/src/run/collectAll.ts +1 -1
- package/src/run/collectN.ts +1 -1
- package/src/run/drain.ts +1 -1
- package/src/run/observe.ts +2 -2
- package/src/run/reduce.ts +1 -1
- package/src/run/run.ts +2 -2
- package/src/run/unsafe.ts +5 -5
- package/src/typeclass/Alternative.ts +2 -2
- package/src/typeclass/Applicative.ts +3 -3
- package/src/typeclass/Bicovariant.ts +2 -2
- package/src/typeclass/Chainable.ts +2 -2
- package/src/typeclass/Coproduct.ts +3 -3
- package/src/typeclass/Covariant.ts +2 -2
- package/src/typeclass/FlatMap.ts +2 -2
- package/src/typeclass/Monad.ts +2 -2
- package/src/typeclass/Of.ts +2 -2
- package/src/typeclass/Pointed.ts +2 -2
- package/src/typeclass/Product.ts +2 -2
- package/src/typeclass/SemiAlternative.ts +2 -2
- package/src/typeclass/SemiApplicative.ts +2 -2
- package/src/typeclass/SemiCoproduct.ts +2 -2
- package/src/typeclass/SemiProduct.ts +1 -1
- package/src/typeclass/TypeLambda.ts +2 -2
- package/tsconfig.build.tsbuildinfo +1 -1
package/src/operator/catchAll.ts
CHANGED
|
@@ -2,7 +2,7 @@ import * as Cause from '@effect/io/Cause'
|
|
|
2
2
|
import { match } from '@fp-ts/data/Either'
|
|
3
3
|
import { pipe } from '@fp-ts/data/Function'
|
|
4
4
|
|
|
5
|
-
import { Fx } from '../Fx.js'
|
|
5
|
+
import type { Fx } from '../Fx.js'
|
|
6
6
|
import { failCause } from '../constructor/failCause.js'
|
|
7
7
|
|
|
8
8
|
import { catchAllCause } from './catchAllCause.js'
|
|
@@ -2,7 +2,7 @@ import * as Cause from '@effect/io/Cause'
|
|
|
2
2
|
import { pipe } from '@fp-ts/data/Function'
|
|
3
3
|
import { match } from '@fp-ts/data/Option'
|
|
4
4
|
|
|
5
|
-
import { Fx } from '../Fx.js'
|
|
5
|
+
import type { Fx } from '../Fx.js'
|
|
6
6
|
import { failCause } from '../constructor/failCause.js'
|
|
7
7
|
|
|
8
8
|
import { catchAllCause } from './catchAllCause.js'
|
package/src/operator/compact.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { identity } from '@fp-ts/data/Function'
|
|
2
|
-
import { Option } from '@fp-ts/data/Option'
|
|
2
|
+
import type { Option } from '@fp-ts/data/Option'
|
|
3
3
|
|
|
4
|
-
import { Fx } from '../Fx.js'
|
|
4
|
+
import type { Fx } from '../Fx.js'
|
|
5
5
|
|
|
6
6
|
import { filterMap } from './filterMap.js'
|
|
7
7
|
|
package/src/operator/debounce.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as Effect from '@effect/io/Effect'
|
|
2
2
|
import * as Fiber from '@effect/io/Fiber'
|
|
3
|
-
import * as Duration from '@fp-ts/data/Duration'
|
|
3
|
+
import type * as Duration from '@fp-ts/data/Duration'
|
|
4
4
|
import { pipe } from '@fp-ts/data/Function'
|
|
5
5
|
|
|
6
6
|
import { Fx } from '../Fx.js'
|
package/src/operator/delay.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Effect } from '@effect/io/Effect'
|
|
1
|
+
import type { Effect } from '@effect/io/Effect'
|
|
2
2
|
import { flow } from '@fp-ts/data/Function'
|
|
3
3
|
|
|
4
|
-
import { Fx } from '../Fx.js'
|
|
4
|
+
import type { Fx } from '../Fx.js'
|
|
5
5
|
import { fromEffect } from '../constructor/fromEffect.js'
|
|
6
6
|
|
|
7
7
|
import { exhaustMap } from './exhaustMap.js'
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as Effect from '@effect/io/Effect'
|
|
2
|
-
import * as Fiber from '@effect/io/Fiber'
|
|
2
|
+
import type * as Fiber from '@effect/io/Fiber'
|
|
3
3
|
import * as Ref from '@effect/io/Ref/Synchronized'
|
|
4
|
-
import { Scope } from '@effect/io/Scope'
|
|
4
|
+
import type { Scope } from '@effect/io/Scope'
|
|
5
5
|
import { pipe } from '@fp-ts/data/Function'
|
|
6
6
|
|
|
7
7
|
import { Fx } from '../Fx.js'
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Effect } from '@effect/io/Effect'
|
|
1
|
+
import type { Effect } from '@effect/io/Effect'
|
|
2
2
|
import { flow } from '@fp-ts/data/Function'
|
|
3
3
|
|
|
4
|
-
import { Fx } from '../Fx.js'
|
|
4
|
+
import type { Fx } from '../Fx.js'
|
|
5
5
|
import { fromEffect } from '../constructor/fromEffect.js'
|
|
6
6
|
|
|
7
7
|
import { exhaustMapLatest } from './exhaustMapLatest.js'
|
package/src/operator/filter.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as TSemaphore from '@effect/stm/TSemaphore'
|
|
2
2
|
import { flow, pipe } from '@fp-ts/data/Function'
|
|
3
3
|
|
|
4
|
-
import { Fx } from '../Fx.js'
|
|
4
|
+
import type { Fx } from '../Fx.js'
|
|
5
5
|
import { suspend } from '../constructor/suspend.js'
|
|
6
6
|
|
|
7
7
|
import { flatMap } from './flatMap.js'
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Effect } from '@effect/io/Effect'
|
|
1
|
+
import type { Effect } from '@effect/io/Effect'
|
|
2
2
|
import { flow } from '@fp-ts/data/Function'
|
|
3
3
|
|
|
4
|
-
import { Fx } from '../Fx.js'
|
|
4
|
+
import type { Fx } from '../Fx.js'
|
|
5
5
|
import { fromEffect } from '../constructor/fromEffect.js'
|
|
6
6
|
|
|
7
7
|
import { flatMap } from './flatMap.js'
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Effect } from '@effect/io/Effect'
|
|
1
|
+
import type { Effect } from '@effect/io/Effect'
|
|
2
2
|
import { flow } from '@fp-ts/data/Function'
|
|
3
3
|
|
|
4
|
-
import { Fx } from '../Fx.js'
|
|
4
|
+
import type { Fx } from '../Fx.js'
|
|
5
5
|
import { fromEffect } from '../constructor/fromEffect.js'
|
|
6
6
|
|
|
7
7
|
import { flatMapConcurrently } from './flatMapConcurrently.js'
|
package/src/operator/hold.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import * as Cause from '@effect/io/Cause'
|
|
1
|
+
import type * as Cause from '@effect/io/Cause'
|
|
2
2
|
import * as Effect from '@effect/io/Effect'
|
|
3
3
|
import * as Fiber from '@effect/io/Fiber'
|
|
4
|
-
import { Scope } from '@effect/io/Scope'
|
|
4
|
+
import type { Scope } from '@effect/io/Scope'
|
|
5
5
|
import { pipe } from '@fp-ts/data/Function'
|
|
6
6
|
import * as MutableRef from '@fp-ts/data/MutableRef'
|
|
7
7
|
import * as Option from '@fp-ts/data/Option'
|
|
8
8
|
|
|
9
|
-
import { Fx } from '../Fx.js'
|
|
9
|
+
import type { Fx } from '../Fx.js'
|
|
10
10
|
import { asap } from '../_internal/RefCounter.js'
|
|
11
11
|
|
|
12
12
|
import { MulticastFx } from './multicast.js'
|
package/src/operator/mapCause.ts
CHANGED
package/src/operator/mapError.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Cause } from '@effect/io/Cause'
|
|
1
|
+
import type { Cause } from '@effect/io/Cause'
|
|
2
2
|
import * as Deferred from '@effect/io/Deferred'
|
|
3
3
|
import * as Effect from '@effect/io/Effect'
|
|
4
4
|
import * as Fiber from '@effect/io/Fiber'
|
|
5
|
-
import { RuntimeFiber } from '@effect/io/Fiber'
|
|
6
|
-
import { Scope } from '@effect/io/Scope'
|
|
7
|
-
import { Context } from '@fp-ts/data/Context'
|
|
5
|
+
import type { RuntimeFiber } from '@effect/io/Fiber'
|
|
6
|
+
import type { Scope } from '@effect/io/Scope'
|
|
7
|
+
import type { Context } from '@fp-ts/data/Context'
|
|
8
8
|
import { pipe } from '@fp-ts/data/Function'
|
|
9
9
|
|
|
10
10
|
import { Fx } from '../Fx.js'
|
package/src/operator/onDone.ts
CHANGED
package/src/operator/onError.ts
CHANGED
package/src/operator/onExit.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as Effect from '@effect/io/Effect'
|
|
1
|
+
import type * as Effect from '@effect/io/Effect'
|
|
2
2
|
import * as Exit from '@effect/io/Exit'
|
|
3
3
|
import { pipe } from '@fp-ts/data/Function'
|
|
4
4
|
|
|
5
|
-
import { Fx } from '../Fx.js'
|
|
5
|
+
import type { Fx } from '../Fx.js'
|
|
6
6
|
|
|
7
7
|
import { onDoneCause } from './onDoneCause.js'
|
|
8
8
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as Effect from '@effect/io/Effect'
|
|
2
|
-
import { FiberId } from '@effect/io/Fiber/Id'
|
|
2
|
+
import type { FiberId } from '@effect/io/Fiber/Id'
|
|
3
3
|
import { flow, pipe } from '@fp-ts/data/Function'
|
|
4
|
-
import { HashSet } from '@fp-ts/data/HashSet'
|
|
4
|
+
import type { HashSet } from '@fp-ts/data/HashSet'
|
|
5
5
|
|
|
6
6
|
import { Fx } from '../Fx.js'
|
|
7
7
|
|
package/src/operator/orElse.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Layer } from '@effect/io/Layer'
|
|
1
|
+
import type { Layer } from '@effect/io/Layer'
|
|
2
2
|
import { pipe } from '@fp-ts/data/Function'
|
|
3
3
|
|
|
4
|
-
import { Fx } from '../Fx.js'
|
|
4
|
+
import type { Fx } from '../Fx.js'
|
|
5
5
|
|
|
6
6
|
import { provideSomeLayer } from './provideSomeLayer.js'
|
|
7
7
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as Effect from '@effect/io/Effect'
|
|
2
|
-
import { Scope } from '@effect/io/Scope'
|
|
3
|
-
import * as Context from '@fp-ts/data/Context'
|
|
2
|
+
import type { Scope } from '@effect/io/Scope'
|
|
3
|
+
import type * as Context from '@fp-ts/data/Context'
|
|
4
4
|
import { pipe } from '@fp-ts/data/Function'
|
|
5
5
|
|
|
6
6
|
import { Fx } from '../Fx.js'
|
package/src/operator/race.ts
CHANGED
|
@@ -3,7 +3,7 @@ import * as Effect from '@effect/io/Effect'
|
|
|
3
3
|
import * as ExecutionStrategy from '@effect/io/ExecutionStrategy'
|
|
4
4
|
import * as Exit from '@effect/io/Exit'
|
|
5
5
|
import * as Scope from '@effect/io/Scope'
|
|
6
|
-
import { Chunk } from '@fp-ts/data/Chunk'
|
|
6
|
+
import type { Chunk } from '@fp-ts/data/Chunk'
|
|
7
7
|
import { pipe } from '@fp-ts/data/Function'
|
|
8
8
|
|
|
9
9
|
import { Fx } from '../Fx.js'
|
package/src/operator/sample.ts
CHANGED
package/src/operator/sandbox.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Cause } from '@effect/io/Cause'
|
|
1
|
+
import type { Cause } from '@effect/io/Cause'
|
|
2
2
|
import { pipe } from '@fp-ts/data/Function'
|
|
3
3
|
|
|
4
|
-
import { Fx } from '../Fx.js'
|
|
4
|
+
import type { Fx } from '../Fx.js'
|
|
5
5
|
import { fail } from '../constructor/fail.js'
|
|
6
6
|
|
|
7
7
|
import { catchAllCause } from './catchAllCause.js'
|
package/src/operator/scan.ts
CHANGED
package/src/operator/separate.ts
CHANGED
|
@@ -1,47 +1,48 @@
|
|
|
1
|
-
import { deepStrictEqual } from 'assert'
|
|
2
|
-
|
|
3
|
-
import * as Effect from '@effect/io/Effect'
|
|
4
|
-
import * as Fiber from '@effect/io/Fiber'
|
|
5
|
-
|
|
6
|
-
import * as
|
|
7
|
-
import * as
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
import {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
})
|
|
1
|
+
// import { deepStrictEqual } from 'assert'
|
|
2
|
+
|
|
3
|
+
// import * as Effect from '@effect/io/Effect'
|
|
4
|
+
// import * as Fiber from '@effect/io/Fiber'
|
|
5
|
+
// // TODO: Fix these tests reaching the test environment
|
|
6
|
+
// import * as TestClock from '@effect/io/internal/testing/testClock'
|
|
7
|
+
// import * as TE from '@effect/io/internal/testing/testEnvironment'
|
|
8
|
+
// import * as Duration from '@fp-ts/data/Duration'
|
|
9
|
+
// import { pipe } from '@fp-ts/data/Function'
|
|
10
|
+
// import { describe, it } from 'vitest'
|
|
11
|
+
|
|
12
|
+
// import { at } from '../constructor/at.js'
|
|
13
|
+
// import { periodic } from '../constructor/periodic.js'
|
|
14
|
+
// import { collectAll } from '../run/collectAll.js'
|
|
15
|
+
|
|
16
|
+
// import { since } from './since.js'
|
|
17
|
+
// import { withItems } from './withItems.js'
|
|
18
|
+
|
|
19
|
+
// describe(import.meta.url, () => {
|
|
20
|
+
// describe(since.name, () => {
|
|
21
|
+
// it('interrupts a stream when a signal is received', async () => {
|
|
22
|
+
// const delay = 20
|
|
23
|
+
// const expected = 5
|
|
24
|
+
// const fx = pipe(
|
|
25
|
+
// periodic(Duration.millis(delay)),
|
|
26
|
+
// withItems([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]),
|
|
27
|
+
// since(at(Duration.millis(delay * expected), null)),
|
|
28
|
+
// )
|
|
29
|
+
|
|
30
|
+
// const test = pipe(
|
|
31
|
+
// Effect.gen(function* ($) {
|
|
32
|
+
// const fiber = yield* $(Effect.fork(collectAll(fx)))
|
|
33
|
+
|
|
34
|
+
// for (let i = 0; i <= expected * 2; i++) {
|
|
35
|
+
// yield* $(TestClock.adjust(Duration.millis(delay)))
|
|
36
|
+
// }
|
|
37
|
+
|
|
38
|
+
// return yield* $(Fiber.join(fiber))
|
|
39
|
+
// }),
|
|
40
|
+
// Effect.provideSomeLayer(TE.TestEnvironment),
|
|
41
|
+
// )
|
|
42
|
+
|
|
43
|
+
// const events = await Effect.unsafeRunPromise(test)
|
|
44
|
+
|
|
45
|
+
// deepStrictEqual(events, [6, 7, 8, 9, 10])
|
|
46
|
+
// })
|
|
47
|
+
// })
|
|
48
|
+
// })
|
package/src/operator/skip.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { pipe } from '@fp-ts/data/Function'
|
|
2
|
-
import { Predicate, not } from '@fp-ts/data/Predicate'
|
|
2
|
+
import { type Predicate, not } from '@fp-ts/data/Predicate'
|
|
3
3
|
|
|
4
|
-
import { Fx } from '../Fx.js'
|
|
4
|
+
import type { Fx } from '../Fx.js'
|
|
5
5
|
|
|
6
6
|
import { skipUntil } from './skipUntil.js'
|
|
7
7
|
|
package/src/operator/struct.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as Cause from '@effect/io/Cause'
|
|
1
|
+
import type * as Cause from '@effect/io/Cause'
|
|
2
2
|
import * as Effect from '@effect/io/Effect'
|
|
3
3
|
import * as Fiber from '@effect/io/Fiber'
|
|
4
4
|
import * as Ref from '@effect/io/Ref/Synchronized'
|
|
@@ -14,14 +14,14 @@ export function switchMapCause<E, R2, E2, B>(
|
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
class SwitchMapCauseFx<R, E, A, R2, E2, B>
|
|
17
|
-
extends Fx.Variance<R | R2,
|
|
18
|
-
implements Fx<R | R2,
|
|
17
|
+
extends Fx.Variance<R | R2, E2, A | B>
|
|
18
|
+
implements Fx<R | R2, E2, A | B>
|
|
19
19
|
{
|
|
20
20
|
constructor(readonly fx: Fx<R, E, A>, readonly f: (cause: Cause.Cause<E>) => Fx<R2, E2, B>) {
|
|
21
21
|
super()
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
run<R3>(sink: Fx.Sink<R3,
|
|
24
|
+
run<R3>(sink: Fx.Sink<R3, E2, A | B>) {
|
|
25
25
|
return withRefCounter(
|
|
26
26
|
0,
|
|
27
27
|
(counter) =>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Effect } from '@effect/io/Effect'
|
|
1
|
+
import type { Effect } from '@effect/io/Effect'
|
|
2
2
|
import { flow } from '@fp-ts/data/Function'
|
|
3
3
|
|
|
4
|
-
import { Fx } from '../Fx.js'
|
|
4
|
+
import type { Fx } from '../Fx.js'
|
|
5
5
|
import { fromEffect } from '../constructor/fromEffect.js'
|
|
6
6
|
|
|
7
7
|
import { switchMap } from './switchMap.js'
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import * as Cause from '@effect/io/Cause'
|
|
2
|
-
import * as Effect from '@effect/io/Effect'
|
|
2
|
+
import type * as Effect from '@effect/io/Effect'
|
|
3
3
|
import { match } from '@fp-ts/data/Either'
|
|
4
4
|
import { flow, pipe } from '@fp-ts/data/Function'
|
|
5
5
|
|
|
6
|
-
import { Fx } from '../Fx.js'
|
|
6
|
+
import type { Fx } from '../Fx.js'
|
|
7
7
|
import { failCause } from '../constructor/failCause.js'
|
|
8
|
+
import { fromEffect } from '../constructor/fromEffect.js'
|
|
8
9
|
|
|
9
10
|
import { switchMapCause } from './switchMapCause.js'
|
|
10
|
-
import { fromEffect } from '../constructor/fromEffect.js'
|
|
11
11
|
|
|
12
12
|
export function switchMapError<E, R2, E2, B>(f: (error: E) => Fx<R2, E2, B>) {
|
|
13
13
|
return <R, A>(fx: Fx<R, E, A>): Fx<R | R2, E2, A | B> =>
|
|
@@ -19,8 +19,5 @@ export function switchMapError<E, R2, E2, B>(f: (error: E) => Fx<R2, E2, B>) {
|
|
|
19
19
|
|
|
20
20
|
export function switchMapErrorEffect<E, R2, E2, B>(f: (error: E) => Effect.Effect<R2, E2, B>) {
|
|
21
21
|
return <R, A>(fx: Fx<R, E, A>): Fx<R | R2, E2, A | B> =>
|
|
22
|
-
pipe(
|
|
23
|
-
fx,
|
|
24
|
-
switchMapError(flow(f, fromEffect))
|
|
25
|
-
)
|
|
22
|
+
pipe(fx, switchMapError(flow(f, fromEffect)))
|
|
26
23
|
}
|
|
@@ -6,12 +6,12 @@ import { pipe } from '@fp-ts/data/Function'
|
|
|
6
6
|
import { describe, it } from 'vitest'
|
|
7
7
|
|
|
8
8
|
import { at } from '../constructor/at.js'
|
|
9
|
+
import { fail } from '../constructor/fail.js'
|
|
9
10
|
import { collectAll } from '../run/collectAll.js'
|
|
10
11
|
|
|
12
|
+
import { flatten } from './flatMap.js'
|
|
11
13
|
import { mergeAll } from './merge.js'
|
|
12
14
|
import { switchMatchError } from './switchMatch.js'
|
|
13
|
-
import { flatten } from './flatMap.js'
|
|
14
|
-
import { fail } from '../constructor/fail.js'
|
|
15
15
|
|
|
16
16
|
describe(import.meta.url, () => {
|
|
17
17
|
describe(switchMatchError.name, () => {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import * as Effect from '@effect/io/Effect'
|
|
2
1
|
import * as Cause from '@effect/io/Cause'
|
|
2
|
+
import * as Effect from '@effect/io/Effect'
|
|
3
3
|
import * as Fiber from '@effect/io/Fiber'
|
|
4
4
|
import * as Ref from '@effect/io/Ref/Synchronized'
|
|
5
|
+
import { either } from '@fp-ts/data'
|
|
5
6
|
import { flow, pipe } from '@fp-ts/data/Function'
|
|
6
7
|
|
|
7
8
|
import { Fx } from '../Fx.js'
|
|
8
9
|
import { withRefCounter } from '../_internal/RefCounter.js'
|
|
9
|
-
import { either } from '@fp-ts/data'
|
|
10
10
|
import { failCause } from '../constructor/failCause.js'
|
|
11
11
|
|
|
12
12
|
export function switchMatchCause<E, R2, E2, B, A, R3, E3, C>(
|
package/src/operator/take.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Effect } from '@effect/io/Effect'
|
|
2
|
-
import { Predicate } from '@fp-ts/data/Predicate'
|
|
1
|
+
import type { Effect } from '@effect/io/Effect'
|
|
2
|
+
import type { Predicate } from '@fp-ts/data/Predicate'
|
|
3
3
|
|
|
4
4
|
import { Fx } from '../Fx.js'
|
|
5
5
|
import { withEarlyExit } from '../_internal/earlyExit.js'
|