@typed/fx 1.0.5 → 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 +4 -3
- 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
|
@@ -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 { takeUntil } from './takeUntil.js'
|
|
7
7
|
|
package/src/operator/tap.ts
CHANGED
package/src/operator/tapError.ts
CHANGED
package/src/operator/throttle.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as Effect from '@effect/io/Effect'
|
|
2
|
-
import * as Fiber from '@effect/io/Fiber'
|
|
3
|
-
import * as Duration from '@fp-ts/data/Duration'
|
|
2
|
+
import type * as Fiber from '@effect/io/Fiber'
|
|
3
|
+
import type * as Duration from '@fp-ts/data/Duration'
|
|
4
4
|
import { pipe } from '@fp-ts/data/Function'
|
|
5
5
|
|
|
6
|
-
import { Fx } from '../Fx.js'
|
|
6
|
+
import type { Fx } from '../Fx.js'
|
|
7
7
|
import { suspend } from '../constructor/suspend.js'
|
|
8
8
|
|
|
9
9
|
import { filterEffect } from './filterEffect.js'
|
package/src/operator/tuple.ts
CHANGED
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
import { deepStrictEqual } from 'assert'
|
|
2
|
-
|
|
3
|
-
import * as Effect from '@effect/io/Effect'
|
|
4
|
-
import * as Fiber from '@effect/io/Fiber'
|
|
5
|
-
import * as TestClock from '@effect/io/internal/testing/testClock'
|
|
6
|
-
import * as TE from '@effect/io/internal/testing/testEnvironment'
|
|
7
|
-
import * as Duration from '@fp-ts/data/Duration'
|
|
8
|
-
import { pipe } from '@fp-ts/data/Function'
|
|
9
|
-
import { describe, it } from 'vitest'
|
|
10
|
-
|
|
11
|
-
import { at } from '../constructor/at.js'
|
|
12
|
-
import { periodic } from '../constructor/periodic.js'
|
|
13
|
-
import { collectAll } from '../run/collectAll.js'
|
|
14
|
-
|
|
15
|
-
import { until } from './until.js'
|
|
16
|
-
import { withItems } from './withItems.js'
|
|
17
|
-
|
|
18
|
-
describe(import.meta.url, () => {
|
|
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
|
+
// import * as TestClock from '@effect/io/internal/testing/testClock'
|
|
6
|
+
// import * as TE from '@effect/io/internal/testing/testEnvironment'
|
|
7
|
+
// import * as Duration from '@fp-ts/data/Duration'
|
|
8
|
+
// import { pipe } from '@fp-ts/data/Function'
|
|
9
|
+
// import { describe, it } from 'vitest'
|
|
10
|
+
|
|
11
|
+
// import { at } from '../constructor/at.js'
|
|
12
|
+
// import { periodic } from '../constructor/periodic.js'
|
|
13
|
+
// import { collectAll } from '../run/collectAll.js'
|
|
14
|
+
|
|
15
|
+
// import { until } from './until.js'
|
|
16
|
+
// import { withItems } from './withItems.js'
|
|
17
|
+
|
|
18
|
+
// describe(import.meta.url, () => {
|
|
19
|
+
// describe(until.name, () => {
|
|
20
|
+
// it('interrupts a stream when a signal is received', async () => {
|
|
21
|
+
// const delay = 20
|
|
22
|
+
// const expected = 5
|
|
23
|
+
// const fx = pipe(
|
|
24
|
+
// periodic(Duration.millis(delay)),
|
|
25
|
+
// withItems([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]),
|
|
26
|
+
// until(at(Duration.millis(delay * expected), null)),
|
|
27
|
+
// )
|
|
28
|
+
|
|
29
|
+
// const test = pipe(
|
|
30
|
+
// Effect.gen(function* ($) {
|
|
31
|
+
// const fiber = yield* $(Effect.fork(collectAll(fx)))
|
|
32
|
+
|
|
33
|
+
// for (let i = 0; i < expected; i++) {
|
|
34
|
+
// yield* $(TestClock.adjust(Duration.millis(delay)))
|
|
35
|
+
// }
|
|
36
|
+
|
|
37
|
+
// return yield* $(Fiber.join(fiber))
|
|
38
|
+
// }),
|
|
39
|
+
// Effect.provideSomeLayer(TE.TestEnvironment),
|
|
40
|
+
// )
|
|
41
|
+
|
|
42
|
+
// const events = await Effect.unsafeRunPromise(test)
|
|
43
|
+
|
|
44
|
+
// deepStrictEqual(events, [1, 2, 3, 4, 5])
|
|
45
|
+
// })
|
|
46
|
+
// })
|
|
47
|
+
// })
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as Effect from '@effect/io/Effect'
|
|
2
|
-
import { RuntimeFlagsPatch } from '@effect/io/Fiber/Runtime/Flags/Patch'
|
|
2
|
+
import type { RuntimeFlagsPatch } from '@effect/io/Fiber/Runtime/Flags/Patch'
|
|
3
3
|
import { pipe } from '@fp-ts/data/Function'
|
|
4
4
|
|
|
5
5
|
import { Fx } from '../Fx.js'
|
package/src/run/collectAll.ts
CHANGED
package/src/run/collectN.ts
CHANGED
package/src/run/drain.ts
CHANGED
package/src/run/observe.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as Effect from '@effect/io/Effect'
|
|
2
|
-
import { Scope } from '@effect/io/Scope'
|
|
2
|
+
import type { Scope } from '@effect/io/Scope'
|
|
3
3
|
import { flow } 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 { run_ } from './run.js'
|
|
8
8
|
|
package/src/run/reduce.ts
CHANGED
package/src/run/run.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
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 { Scope } from '@effect/io/Scope'
|
|
5
|
+
import type { Scope } from '@effect/io/Scope'
|
|
6
6
|
import { flow, pipe } from '@fp-ts/data/Function'
|
|
7
7
|
|
|
8
8
|
import { Fx, Sink } from '../Fx.js'
|
package/src/run/unsafe.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as Effect from '@effect/io/Effect'
|
|
2
|
-
import * as Exit from '@effect/io/Exit'
|
|
3
|
-
import * as Fiber from '@effect/io/Fiber'
|
|
4
|
-
import { Cancel } from '@effect/io/Runtime'
|
|
5
|
-
import * as Scope from '@effect/io/Scope'
|
|
2
|
+
import type * as Exit from '@effect/io/Exit'
|
|
3
|
+
import type * as Fiber from '@effect/io/Fiber'
|
|
4
|
+
import type { Cancel } from '@effect/io/Runtime'
|
|
5
|
+
import type * as Scope from '@effect/io/Scope'
|
|
6
6
|
|
|
7
|
-
import { Fx } from '../Fx.js'
|
|
7
|
+
import type { Fx } from '../Fx.js'
|
|
8
8
|
|
|
9
9
|
import { drain } from './drain.js'
|
|
10
10
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as A from '@fp-ts/core/typeclass/Alternative'
|
|
1
|
+
import type * as A from '@fp-ts/core/typeclass/Alternative'
|
|
2
2
|
|
|
3
3
|
import { CoproductRace, CoproductOrElse } from './Coproduct.js'
|
|
4
4
|
import { SemiAlternativeRace, SemiAlternativeOrElse } from './SemiAlternative.js'
|
|
5
|
-
import { FxTypeLambda } from './TypeLambda.js'
|
|
5
|
+
import type { FxTypeLambda } from './TypeLambda.js'
|
|
6
6
|
|
|
7
7
|
export const ApplicativeRace: A.Alternative<FxTypeLambda> = {
|
|
8
8
|
...SemiAlternativeRace,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import * as A from '@fp-ts/core/typeclass/Applicative'
|
|
1
|
+
import type * as A from '@fp-ts/core/typeclass/Applicative'
|
|
2
2
|
|
|
3
|
-
import { Fx } from '../Fx.js'
|
|
3
|
+
import type { Fx } from '../Fx.js'
|
|
4
4
|
import { combineAll } from '../operator/combine.js'
|
|
5
5
|
|
|
6
6
|
import { Of } from './Of.js'
|
|
7
7
|
import { SemiApplicative } from './SemiApplicative.js'
|
|
8
|
-
import { FxTypeLambda } from './TypeLambda.js'
|
|
8
|
+
import type { FxTypeLambda } from './TypeLambda.js'
|
|
9
9
|
|
|
10
10
|
export const Applicative: A.Applicative<FxTypeLambda> = {
|
|
11
11
|
...SemiApplicative,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as B from '@fp-ts/core/typeclass/Bicovariant'
|
|
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 { map } from '../operator/map.js'
|
|
6
6
|
import { mapError } from '../operator/mapError.js'
|
|
7
7
|
|
|
8
|
-
import { FxTypeLambda } from './TypeLambda.js'
|
|
8
|
+
import type { FxTypeLambda } from './TypeLambda.js'
|
|
9
9
|
|
|
10
10
|
export const Bicovariant: B.Bicovariant<FxTypeLambda> = {
|
|
11
11
|
bimap: (f, g) => (fa) => pipe(fa, mapError(f), map(g)),
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as C from '@fp-ts/core/typeclass/Chainable'
|
|
1
|
+
import type * as C from '@fp-ts/core/typeclass/Chainable'
|
|
2
2
|
|
|
3
3
|
import { Covariant } from './Covariant.js'
|
|
4
4
|
import { FlatMap, SwitchMap, ExhaustMap } from './FlatMap.js'
|
|
5
|
-
import { FxTypeLambda } from './TypeLambda.js'
|
|
5
|
+
import type { FxTypeLambda } from './TypeLambda.js'
|
|
6
6
|
|
|
7
7
|
export const Chainable: C.Chainable<FxTypeLambda> = {
|
|
8
8
|
...FlatMap,
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import * as Cause from '@effect/io/Cause'
|
|
2
|
-
import * as CP from '@fp-ts/core/typeclass/Coproduct'
|
|
2
|
+
import type * as CP from '@fp-ts/core/typeclass/Coproduct'
|
|
3
3
|
|
|
4
|
-
import { Fx } from '../Fx.js'
|
|
4
|
+
import type { Fx } from '../Fx.js'
|
|
5
5
|
import { failCause } from '../constructor/failCause.js'
|
|
6
6
|
import { never } from '../constructor/never.js'
|
|
7
7
|
import { orElse } from '../operator/orElse.js'
|
|
8
8
|
import { raceAll } from '../operator/race.js'
|
|
9
9
|
|
|
10
10
|
import { SemiCoproductRace, SemiCoproductOrElse } from './SemiCoproduct.js'
|
|
11
|
-
import { FxTypeLambda } from './TypeLambda.js'
|
|
11
|
+
import type { FxTypeLambda } from './TypeLambda.js'
|
|
12
12
|
|
|
13
13
|
export const CoproductRace: CP.Coproduct<FxTypeLambda> = {
|
|
14
14
|
...SemiCoproductRace,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as C from '@fp-ts/core/typeclass/Covariant'
|
|
2
2
|
|
|
3
|
-
import { Fx } from '../Fx.js'
|
|
3
|
+
import type { Fx } from '../Fx.js'
|
|
4
4
|
import { map } from '../operator/map.js'
|
|
5
5
|
|
|
6
|
-
import { FxTypeLambda } from './TypeLambda.js'
|
|
6
|
+
import type { FxTypeLambda } from './TypeLambda.js'
|
|
7
7
|
|
|
8
8
|
export const Covariant: C.Covariant<FxTypeLambda> = C.make((f) => map(f))
|
|
9
9
|
|
package/src/typeclass/FlatMap.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import * as F from '@fp-ts/core/typeclass/FlatMap'
|
|
1
|
+
import type * as F from '@fp-ts/core/typeclass/FlatMap'
|
|
2
2
|
|
|
3
3
|
import { exhaustMap } from '../operator/exhaustMap.js'
|
|
4
4
|
import { flatMap } from '../operator/flatMap.js'
|
|
5
5
|
import { switchMap } from '../operator/switchMap.js'
|
|
6
6
|
|
|
7
|
-
import { FxTypeLambda } from './TypeLambda.js'
|
|
7
|
+
import type { FxTypeLambda } from './TypeLambda.js'
|
|
8
8
|
|
|
9
9
|
export const FlatMap: F.FlatMap<FxTypeLambda> = {
|
|
10
10
|
flatMap,
|
package/src/typeclass/Monad.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import * as M from '@fp-ts/core/typeclass/Monad'
|
|
1
|
+
import type * as M from '@fp-ts/core/typeclass/Monad'
|
|
2
2
|
|
|
3
3
|
import { Covariant } from './Covariant.js'
|
|
4
4
|
import { FlatMap, SwitchMap, ExhaustMap } from './FlatMap.js'
|
|
5
5
|
import { Pointed } from './Pointed.js'
|
|
6
|
-
import { FxTypeLambda } from './TypeLambda.js'
|
|
6
|
+
import type { FxTypeLambda } from './TypeLambda.js'
|
|
7
7
|
|
|
8
8
|
export const Monad: M.Monad<FxTypeLambda> = {
|
|
9
9
|
...FlatMap,
|
package/src/typeclass/Of.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as O from '@fp-ts/core/typeclass/Of'
|
|
1
|
+
import type * as O from '@fp-ts/core/typeclass/Of'
|
|
2
2
|
|
|
3
3
|
import { succeed } from '../constructor/succeed.js'
|
|
4
4
|
|
|
5
|
-
import { FxTypeLambda } from './TypeLambda.js'
|
|
5
|
+
import type { FxTypeLambda } from './TypeLambda.js'
|
|
6
6
|
|
|
7
7
|
export const Of: O.Of<FxTypeLambda> = {
|
|
8
8
|
of: succeed,
|
package/src/typeclass/Pointed.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as P from '@fp-ts/core/typeclass/Pointed'
|
|
1
|
+
import type * as P from '@fp-ts/core/typeclass/Pointed'
|
|
2
2
|
|
|
3
3
|
import { Covariant } from './Covariant.js'
|
|
4
4
|
import { Of } from './Of.js'
|
|
5
|
-
import { FxTypeLambda } from './TypeLambda.js'
|
|
5
|
+
import type { FxTypeLambda } from './TypeLambda.js'
|
|
6
6
|
|
|
7
7
|
export const Pointed: P.Pointed<FxTypeLambda> = {
|
|
8
8
|
...Of,
|
package/src/typeclass/Product.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import * as P from '@fp-ts/core/typeclass/Product'
|
|
1
|
+
import type * as P from '@fp-ts/core/typeclass/Product'
|
|
2
2
|
|
|
3
3
|
import { combineAll } from '../operator/combine.js'
|
|
4
4
|
|
|
5
5
|
import { Of } from './Of.js'
|
|
6
6
|
import { SemiProduct } from './SemiProduct.js'
|
|
7
|
-
import { FxTypeLambda } from './TypeLambda.js'
|
|
7
|
+
import type { FxTypeLambda } from './TypeLambda.js'
|
|
8
8
|
|
|
9
9
|
export const Product: P.Product<FxTypeLambda> = {
|
|
10
10
|
...SemiProduct,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as SA from '@fp-ts/core/typeclass/SemiAlternative'
|
|
1
|
+
import type * as SA from '@fp-ts/core/typeclass/SemiAlternative'
|
|
2
2
|
|
|
3
3
|
import { Covariant } from './Covariant.js'
|
|
4
4
|
import { SemiCoproductRace, SemiCoproductOrElse } from './SemiCoproduct.js'
|
|
5
|
-
import { FxTypeLambda } from './TypeLambda.js'
|
|
5
|
+
import type { FxTypeLambda } from './TypeLambda.js'
|
|
6
6
|
|
|
7
7
|
export const SemiAlternativeRace: SA.SemiAlternative<FxTypeLambda> = {
|
|
8
8
|
...SemiCoproductRace,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as SA from '@fp-ts/core/typeclass/SemiApplicative'
|
|
1
|
+
import type * as SA from '@fp-ts/core/typeclass/SemiApplicative'
|
|
2
2
|
|
|
3
3
|
import { Covariant } from './Covariant.js'
|
|
4
4
|
import { SemiProduct } from './SemiProduct.js'
|
|
5
|
-
import { FxTypeLambda } from './TypeLambda.js'
|
|
5
|
+
import type { FxTypeLambda } from './TypeLambda.js'
|
|
6
6
|
|
|
7
7
|
export const SemiApplicative: SA.SemiApplicative<FxTypeLambda> = {
|
|
8
8
|
...SemiProduct,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import * as SCP from '@fp-ts/core/typeclass/SemiCoproduct'
|
|
1
|
+
import type * as SCP from '@fp-ts/core/typeclass/SemiCoproduct'
|
|
2
2
|
|
|
3
3
|
import { orElse } from '../operator/orElse.js'
|
|
4
4
|
import { race, raceAll } from '../operator/race.js'
|
|
5
5
|
|
|
6
6
|
import { Covariant } from './Covariant.js'
|
|
7
|
-
import { FxTypeLambda } from './TypeLambda.js'
|
|
7
|
+
import type { FxTypeLambda } from './TypeLambda.js'
|
|
8
8
|
|
|
9
9
|
export const SemiCoproductRace: SCP.SemiCoproduct<FxTypeLambda> = {
|
|
10
10
|
coproduct: race,
|
|
@@ -3,7 +3,7 @@ import * as SP from '@fp-ts/core/typeclass/SemiProduct'
|
|
|
3
3
|
import { combine } from '../operator/combine.js'
|
|
4
4
|
|
|
5
5
|
import { Covariant } from './Covariant.js'
|
|
6
|
-
import { FxTypeLambda } from './TypeLambda.js'
|
|
6
|
+
import type { FxTypeLambda } from './TypeLambda.js'
|
|
7
7
|
|
|
8
8
|
export const SemiProduct: SP.SemiProduct<FxTypeLambda> = {
|
|
9
9
|
product: combine,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { TypeLambda } from '@fp-ts/core/HKT'
|
|
1
|
+
import type { TypeLambda } from '@fp-ts/core/HKT'
|
|
2
2
|
|
|
3
|
-
import { Fx } from '../Fx.js'
|
|
3
|
+
import type { Fx } from '../Fx.js'
|
|
4
4
|
|
|
5
5
|
export interface FxTypeLambda extends TypeLambda {
|
|
6
6
|
readonly type: Fx<this['Out2'], this['Out1'], this['Target']>
|