@reffuse/extension-query 0.1.4 #15

Merged
Thilawyn merged 340 commits from next into master 2025-05-26 04:15:01 +02:00
Showing only changes of commit f25fefb0f3 - Show all commits

View File

@@ -1,24 +1,7 @@
import type * as AsyncData from "@typed/async-data"
import { type Cause, Effect, type Fiber, type Option, type Stream, type SubscriptionRef } from "effect"
import { Effect } from "effect"
import * as QueryRunner from "./QueryRunner.js"
import * as QueryProgress from "./QueryProgress.js"
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 interface ServiceProps<K extends readonly unknown[], A, E, R> {
readonly key: Stream.Stream<K>
readonly query: (key: K) => Effect.Effect<A, E, R | QueryProgress.QueryProgress>
readonly options?: QueryRunner.RunOptions
}
export const Service = <Self>() => <
const Id extends string,
K extends readonly unknown[], A, E, R,
>(
id: Id,
props: ServiceProps<K, A, E, R>,
) =>