Refactor query
Lint / lint (push) Successful in 13s

This commit is contained in:
Julien Valverdé
2025-11-25 16:03:28 +01:00
parent aa243c6493
commit 6f50cf2989
2 changed files with 68 additions and 16 deletions
+3 -3
View File
@@ -198,11 +198,11 @@ export namespace unsafeForkEffect {
readonly previous?: Success<A> | Failure<A, E>
} & (
| {
readonly refreshing: true
readonly refresh: true
readonly previous: Success<A> | Failure<A, E>
}
| {
readonly refreshing?: false
readonly refresh?: false
}
)
}
@@ -218,7 +218,7 @@ export const unsafeForkEffect = <A, E, R, P = never>(
Effect.bind("ref", () => Ref.make(initial<A, E, P>())),
Effect.bind("pubsub", () => PubSub.unbounded<Result<A, E, P>>()),
Effect.bind("fiber", ({ ref, pubsub }) => Effect.forkScoped(State<A, E, P>().pipe(
Effect.andThen(state => state.set(options?.refreshing
Effect.andThen(state => state.set(options?.refresh
? refreshing(options.previous, options?.initialProgress) as Result<A, E, P>
: running(options?.initialProgress)
).pipe(