0.1.13 #18
@@ -3,15 +3,9 @@ import { type Cause, Effect, type Fiber, type Option, type Stream, type Subscrip
|
||||
import * as QueryRunner from "./QueryRunner.js"
|
||||
|
||||
|
||||
export interface QueryService<K extends readonly unknown[], A, E> {
|
||||
readonly latestKey: SubscriptionRef.SubscriptionRef<Option.Option<K>>
|
||||
readonly state: SubscriptionRef.SubscriptionRef<AsyncData.AsyncData<A, E>>
|
||||
readonly forkRefresh: Effect.Effect<readonly [
|
||||
fiber: Fiber.RuntimeFiber<AsyncData.Success<A> | AsyncData.Failure<E>, Cause.NoSuchElementException>,
|
||||
state: Stream.Stream<AsyncData.AsyncData<A, E>>,
|
||||
]>
|
||||
}
|
||||
|
||||
export const Tag = <const Id extends string>(id: Id) => <
|
||||
Self, K extends readonly unknown[], A, E = never
|
||||
>() => Effect.Tag(id)<Self, QueryRunner.QueryRunner<K, A, E>>()
|
||||
|
||||
|
||||
export const Service = <Self>() =>
|
||||
|
||||
Reference in New Issue
Block a user