diff --git a/packages/effect-fc/src/ErrorObserver.ts b/packages/effect-fc/src/ErrorObserver.ts index 30f5424..75930af 100644 --- a/packages/effect-fc/src/ErrorObserver.ts +++ b/packages/effect-fc/src/ErrorObserver.ts @@ -1,20 +1,20 @@ import { type Cause, Context, Effect, Exit, Layer, Option, Pipeable, Predicate, PubSub, type Queue, type Scope, Supervisor } from "effect" -export const TypeId: unique symbol = Symbol.for("@effect-fc/ErrorObserver/ErrorObserver") -export type TypeId = typeof TypeId +export const ErrorObserverTypeId: unique symbol = Symbol.for("@effect-fc/ErrorObserver/ErrorObserver") +export type ErrorObserverTypeId = typeof ErrorObserverTypeId export interface ErrorObserver extends Pipeable.Pipeable { - readonly [TypeId]: TypeId + readonly [ErrorObserverTypeId]: ErrorObserverTypeId handle(effect: Effect.Effect): Effect.Effect readonly subscribe: Effect.Effect>, never, Scope.Scope> } export const ErrorObserver = (): Context.Tag> => Context.GenericTag("@effect-fc/ErrorObserver/ErrorObserver") -class ErrorObserverImpl +export class ErrorObserverImpl extends Pipeable.Class() implements ErrorObserver { - readonly [TypeId]: TypeId = TypeId + readonly [ErrorObserverTypeId]: ErrorObserverTypeId = ErrorObserverTypeId readonly subscribe: Effect.Effect>, never, Scope.Scope> constructor( @@ -29,7 +29,7 @@ extends Pipeable.Class() implements ErrorObserver { } } -class ErrorObserverSupervisorImpl extends Supervisor.AbstractSupervisor { +export class ErrorObserverSupervisorImpl extends Supervisor.AbstractSupervisor { readonly value = Effect.void constructor(readonly pubsub: PubSub.PubSub>) { super() @@ -43,7 +43,7 @@ class ErrorObserverSupervisorImpl extends Supervisor.AbstractSupervisor { } -export const isErrorObserver = (u: unknown): u is ErrorObserver => Predicate.hasProperty(u, TypeId) +export const isErrorObserver = (u: unknown): u is ErrorObserver => Predicate.hasProperty(u, ErrorObserverTypeId) export const layer: Layer.Layer = Layer.unwrapEffect(Effect.map( PubSub.unbounded>(),