diff --git a/packages/effect-fc/src/Component.ts b/packages/effect-fc/src/Component.ts index 0398dac..5e74bf6 100644 --- a/packages/effect-fc/src/Component.ts +++ b/packages/effect-fc/src/Component.ts @@ -4,8 +4,8 @@ import { Context, type Duration, Effect, Equivalence, ExecutionStrategy, Exit, F import * as React from "react" -export const TypeId: unique symbol = Symbol.for("@effect-fc/Component/Component") -export type TypeId = typeof TypeId +export const ComponentTypeId: unique symbol = Symbol.for("@effect-fc/Component/Component") +export type ComponentTypeId = typeof ComponentTypeId /** * Represents an Effect-based React Component that integrates the Effect system with React. @@ -13,7 +13,7 @@ export type TypeId = typeof TypeId export interface Component

extends ComponentPrototype, ComponentOptions { new(_: never): Record - readonly [TypeId]: TypeId + readonly [ComponentTypeId]: ComponentTypeId readonly "~Props": P readonly "~Success": A readonly "~Error": E @@ -34,7 +34,7 @@ export declare namespace Component { export interface ComponentPrototype

extends Pipeable.Pipeable { - readonly [TypeId]: TypeId + readonly [ComponentTypeId]: ComponentTypeId readonly use: Effect.Effect<(props: P) => A, never, Exclude> asFunctionComponent( @@ -46,7 +46,7 @@ extends Pipeable.Pipeable { } export const ComponentPrototype: ComponentPrototype = Object.freeze({ - [TypeId]: TypeId, + [ComponentTypeId]: ComponentTypeId, ...Pipeable.Prototype, get use() { return use(this) }, @@ -127,7 +127,7 @@ export const defaultOptions: ComponentOptions = { export const nonReactiveTags = [Tracer.ParentSpan] as const -export const isComponent = (u: unknown): u is Component<{}, React.ReactNode, unknown, unknown> => Predicate.hasProperty(u, TypeId) +export const isComponent = (u: unknown): u is Component<{}, React.ReactNode, unknown, unknown> => Predicate.hasProperty(u, ComponentTypeId) export declare namespace make { export type Gen = {