Add Effect v4 support, Fast Refresh tooling, and revamped docs #56

Merged
Thilawyn merged 133 commits from next into master 2026-07-26 02:32:59 +02:00
Showing only changes of commit 24ce543092 - Show all commits
+6 -6
View File
@@ -1,6 +1,6 @@
/** biome-ignore-all lint/complexity/noBannedTypes: {} is the default type for React props */ /** biome-ignore-all lint/complexity/noBannedTypes: {} is the default type for React props */
/** biome-ignore-all lint/complexity/useArrowFunction: necessary for class prototypes */ /** biome-ignore-all lint/complexity/useArrowFunction: necessary for class prototypes */
import { Context, type Duration, Effect, Equivalence, ExecutionStrategy, Exit, Fiber, Function, HashMap, identity, Layer, Option, Pipeable, Predicate, Ref, Scope, Tracer } from "effect" import { Context, type Duration, Effect, Equivalence, Exit, Fiber, Function, HashMap, identity, Layer, Option, Pipeable, Predicate, Ref, Scope, Tracer } from "effect"
import * as React from "react" import * as React from "react"
@@ -130,9 +130,9 @@ export interface ComponentOptions {
* Specifies the execution strategy for finalizers when the component unmounts or its scope closes. * Specifies the execution strategy for finalizers when the component unmounts or its scope closes.
* Determines whether finalizers execute sequentially or in parallel. * Determines whether finalizers execute sequentially or in parallel.
* *
* @default ExecutionStrategy.sequential * @default "sequential"
*/ */
readonly finalizerExecutionStrategy: ExecutionStrategy.ExecutionStrategy readonly finalizerExecutionStrategy: "sequential" | "parallel"
/** /**
* Debounce duration before executing finalizers after component unmount. * Debounce duration before executing finalizers after component unmount.
@@ -146,7 +146,7 @@ export interface ComponentOptions {
export const defaultOptions: ComponentOptions = { export const defaultOptions: ComponentOptions = {
nonReactiveTags: [Tracer.ParentSpan], nonReactiveTags: [Tracer.ParentSpan],
finalizerExecutionStrategy: ExecutionStrategy.sequential, finalizerExecutionStrategy: "sequential",
finalizerExecutionDebounce: "100 millis", finalizerExecutionDebounce: "100 millis",
} }
@@ -653,7 +653,7 @@ export declare namespace ScopeMap {
export declare namespace useScope { export declare namespace useScope {
export interface Options { export interface Options {
readonly finalizerExecutionStrategy?: ExecutionStrategy.ExecutionStrategy readonly finalizerExecutionStrategy?: "sequential" | "parallel"
readonly finalizerExecutionDebounce?: Duration.Input readonly finalizerExecutionDebounce?: Duration.Input
} }
} }
@@ -805,7 +805,7 @@ export const useOnChange = Effect.fnUntraced(function* <A, E, R>(
export declare namespace useReactEffect { export declare namespace useReactEffect {
export interface Options { export interface Options {
readonly finalizerExecutionMode?: "sync" | "fork" readonly finalizerExecutionMode?: "sync" | "fork"
readonly finalizerExecutionStrategy?: ExecutionStrategy.ExecutionStrategy readonly finalizerExecutionStrategy?: "sequential" | "parallel"
} }
} }