Add Effect v4 support, Fast Refresh tooling, and revamped docs #56
@@ -1,6 +1,6 @@
|
||||
/** biome-ignore-all lint/complexity/noBannedTypes: {} is the default type for React props */
|
||||
/** 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"
|
||||
|
||||
|
||||
@@ -130,9 +130,9 @@ export interface ComponentOptions {
|
||||
* Specifies the execution strategy for finalizers when the component unmounts or its scope closes.
|
||||
* 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.
|
||||
@@ -146,7 +146,7 @@ export interface ComponentOptions {
|
||||
|
||||
export const defaultOptions: ComponentOptions = {
|
||||
nonReactiveTags: [Tracer.ParentSpan],
|
||||
finalizerExecutionStrategy: ExecutionStrategy.sequential,
|
||||
finalizerExecutionStrategy: "sequential",
|
||||
finalizerExecutionDebounce: "100 millis",
|
||||
}
|
||||
|
||||
@@ -653,7 +653,7 @@ export declare namespace ScopeMap {
|
||||
|
||||
export declare namespace useScope {
|
||||
export interface Options {
|
||||
readonly finalizerExecutionStrategy?: ExecutionStrategy.ExecutionStrategy
|
||||
readonly finalizerExecutionStrategy?: "sequential" | "parallel"
|
||||
readonly finalizerExecutionDebounce?: Duration.Input
|
||||
}
|
||||
}
|
||||
@@ -805,7 +805,7 @@ export const useOnChange = Effect.fnUntraced(function* <A, E, R>(
|
||||
export declare namespace useReactEffect {
|
||||
export interface Options {
|
||||
readonly finalizerExecutionMode?: "sync" | "fork"
|
||||
readonly finalizerExecutionStrategy?: ExecutionStrategy.ExecutionStrategy
|
||||
readonly finalizerExecutionStrategy?: "sequential" | "parallel"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user