From bb0579408d9d161b9e3f02f738b34ce9e8c46b9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Valverd=C3=A9?= Date: Thu, 23 Oct 2025 10:49:00 +0200 Subject: [PATCH] Fix --- packages/effect-fc/src/Component.ts | 8 ++++---- packages/effect-fc/src/ReactRuntime.ts | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/effect-fc/src/Component.ts b/packages/effect-fc/src/Component.ts index f7d1881..9536427 100644 --- a/packages/effect-fc/src/Component.ts +++ b/packages/effect-fc/src/Component.ts @@ -405,15 +405,15 @@ export const withRuntime: { }) -export class ComponentScopeMap extends Effect.Service()("effect-fc/Component/ComponentScopeMap", { +export class ScopeMap extends Effect.Service()("effect-fc/Component/ScopeMap", { effect: Effect.bind( Effect.Do, "ref", - () => Ref.make(HashMap.empty()), + () => Ref.make(HashMap.empty()), ), }) {} -export namespace ComponentScopeMap { +export namespace ScopeMap { export interface Entry { readonly scope: Scope.CloseableScope readonly closeFiber: Option.Option> @@ -432,7 +432,7 @@ export const useScope: { runtimeRef.current = yield* Effect.runtime() const key = React.useId() - const scopeMap = yield* ComponentScopeMap as unknown as Effect.Effect + const scopeMap = yield* ScopeMap as unknown as Effect.Effect const scope = React.useMemo(() => Runtime.runSync(runtimeRef.current)(Effect.andThen( scopeMap.ref, diff --git a/packages/effect-fc/src/ReactRuntime.ts b/packages/effect-fc/src/ReactRuntime.ts index 5e46ab6..2b1bc01 100644 --- a/packages/effect-fc/src/ReactRuntime.ts +++ b/packages/effect-fc/src/ReactRuntime.ts @@ -22,10 +22,10 @@ export const isReactRuntime = (u: unknown): u is ReactRuntime export const make = ( layer: Layer.Layer, memoMap?: Layer.MemoMap, -): ReactRuntime => Object.setPrototypeOf( +): ReactRuntime => Object.setPrototypeOf( Object.assign(function() {}, { runtime: ManagedRuntime.make( - Layer.merge(layer, Component.ComponentScopeMap.Default), + Layer.merge(layer, Component.ScopeMap.Default), memoMap, ), // biome-ignore lint/style/noNonNullAssertion: context initialization