@reffuse/extension-query 0.1.5 #16

Merged
Thilawyn merged 347 commits from next into master 2025-06-01 05:28:47 +02:00
2 changed files with 13 additions and 2 deletions
Showing only changes of commit bc81c443ab - Show all commits

View File

@@ -0,0 +1,11 @@
import { Effect, type Queue, type Stream } from "effect"
export interface FailureHandler<E> {
readonly failures: Stream.Stream<E>
readonly queue: Queue.Queue<E>
}
export const Tag = <const Id extends string>(id: Id) => <
Self, E = never,
>() => Effect.Tag(id)<Self, FailureHandler<E>>()

View File

@@ -6,11 +6,11 @@ import * as QueryRunner from "./QueryRunner.js"
import type * as QueryService from "./QueryService.js"
export interface QueryExtension<GlobalE> {
export interface QueryExtension<HandlerE> {
useQuery<K extends readonly unknown[], A, E, R>(
this: ReffuseHelpers.ReffuseHelpers<R>,
props: UseQueryProps<K, A, E, R>,
): UseQueryResult<K, A, Exclude<E, GlobalE>>
): UseQueryResult<K, A, Exclude<E, HandlerE>>
}
export interface UseQueryProps<K extends readonly unknown[], A, E, R> {