Fix ScopeRegistry
Lint / lint (push) Failing after 41s

This commit is contained in:
Julien Valverdé
2026-07-24 23:07:06 +02:00
parent faac021527
commit 7d6bab81be
+8 -1
View File
@@ -1,7 +1,11 @@
import { type Cause, Chunk, Context, DateTime, type Duration, Effect, Equal, Exit, HashMap, Layer, Option, Order, Scope, Semaphore, Stream, SubscriptionRef } from "effect" import { type Cause, Chunk, Context, DateTime, type Duration, Effect, Equal, Exit, HashMap, Layer, Option, Order, Predicate, Scope, Semaphore, Stream, SubscriptionRef } from "effect"
export const ScopeRegistryServiceTypeId: unique symbol = Symbol.for("@effect-view/ScopeRegistryService/ScopeRegistryService")
export type ScopeRegistryServiceTypeId = typeof ScopeRegistryServiceTypeId
export interface ScopeRegistryService { export interface ScopeRegistryService {
readonly [ScopeRegistryServiceTypeId]: ScopeRegistryServiceTypeId
readonly ref: SubscriptionRef.SubscriptionRef<HashMap.HashMap<ScopeRegistryService.Key, ScopeRegistryService.Entry>> readonly ref: SubscriptionRef.SubscriptionRef<HashMap.HashMap<ScopeRegistryService.Key, ScopeRegistryService.Entry>>
register( register(
@@ -30,10 +34,13 @@ export declare namespace ScopeRegistryService {
} }
} }
export const isScopeRegistryService = (u: unknown): u is ScopeRegistryService => Predicate.hasProperty(u, ScopeRegistryServiceTypeId)
export const makeKey = (): ScopeRegistryService.Key => Equal.byReference({}) export const makeKey = (): ScopeRegistryService.Key => Equal.byReference({})
export class ScopeRegistryServiceImpl implements ScopeRegistryService { export class ScopeRegistryServiceImpl implements ScopeRegistryService {
readonly [ScopeRegistryServiceTypeId]: ScopeRegistryServiceTypeId = ScopeRegistryServiceTypeId
constructor( constructor(
readonly ref: SubscriptionRef.SubscriptionRef<HashMap.HashMap<ScopeRegistryService.Key, ScopeRegistryService.Entry>>, readonly ref: SubscriptionRef.SubscriptionRef<HashMap.HashMap<ScopeRegistryService.Key, ScopeRegistryService.Entry>>,
readonly runSemaphore: Semaphore.Semaphore, readonly runSemaphore: Semaphore.Semaphore,