VQueryErrorHandler
All checks were successful
Lint / lint (push) Successful in 12s

This commit is contained in:
Julien Valverdé
2025-03-15 05:12:38 +01:00
parent 0437fa5dcc
commit 4e778b6c95
3 changed files with 62 additions and 12 deletions

View File

@@ -6,6 +6,9 @@ export interface ErrorHandler<E> {
readonly handle: <A, SelfE, R>(self: Effect.Effect<A, SelfE, R>) => Effect.Effect<A, Exclude<SelfE, E>, R>
}
export type Error<T> = T extends ErrorHandler<infer E> ? E : never
export const Tag = <const Id extends string>(id: Id) => <
Self, E = never,
>() => Effect.Tag(id)<Self, ErrorHandler<E>>()