0.2.1 #26

Merged
Thilawyn merged 144 commits from next into master 2025-12-01 23:37:40 +01:00
Showing only changes of commit 10cec68ee2 - Show all commits

View File

@@ -106,12 +106,11 @@ export const service = <K extends readonly any[], A, E = never, R = never, P = n
export const run = <K extends readonly any[], A, E, R, P>( export const run = <K extends readonly any[], A, E, R, P>(
self: Query<K, A, E, R, P> self: Query<K, A, E, R, P>
): Effect.Effect<void, never, Scope.Scope | R> => Stream.runForEach(self.key, key => ): Effect.Effect<void, never, Scope.Scope | R> => {
(self as QueryImpl<K, A, E, R, P>).interrupt.pipe( const _self = self as QueryImpl<K, A, E, R, P>
Effect.andThen(SubscriptionRef.set((self as QueryImpl<K, A, E, R, P>).latestKey, Option.some(key))), return Stream.runForEach(_self.key, key => _self.interrupt.pipe(
Effect.andThen((self as QueryImpl<K, A, E, R, P>).start(key)), Effect.andThen(SubscriptionRef.set(_self.latestKey, Option.some(key))),
Effect.andThen(sub => Effect.forkScoped( Effect.andThen(_self.start(key)),
(self as QueryImpl<K, A, E, R, P>).watch(sub) Effect.andThen(sub => Effect.forkScoped(_self.watch(sub))),
)), ))
) }
)