0.1.0 #1

Merged
Thilawyn merged 87 commits from next into master 2025-01-18 00:54:42 +01:00
Showing only changes of commit fcd37a5910 - Show all commits

View File

@@ -1,5 +1,4 @@
import { Effect, Exit, Fiber, ManagedRuntime, Ref, Stream, SubscriptionRef } from "effect" import { Effect, Exit, Fiber, ManagedRuntime, Ref, Runtime, Stream, SubscriptionRef } from "effect"
import type { RunForkOptions } from "effect/Runtime"
import React from "react" import React from "react"
@@ -49,7 +48,7 @@ export class Reffuse<R, ER> {
runFork<A, E>( runFork<A, E>(
self: Effect.Effect<A, E, R>, self: Effect.Effect<A, E, R>,
options?: RunForkOptions, options?: Runtime.RunForkOptions,
): Fiber.RuntimeFiber<A, ER | E> { ): Fiber.RuntimeFiber<A, ER | E> {
return this.useRuntime().runFork(self, options) return this.useRuntime().runFork(self, options)
} }
@@ -58,7 +57,7 @@ export class Reffuse<R, ER> {
useFork<A, E>( useFork<A, E>(
self: Effect.Effect<A, E, R>, self: Effect.Effect<A, E, R>,
deps?: React.DependencyList, deps?: React.DependencyList,
options?: RunForkOptions, options?: Runtime.RunForkOptions,
): void { ): void {
return React.useEffect(() => { return React.useEffect(() => {
const fiber = this.runFork(self.pipe(Effect.scoped), options) const fiber = this.runFork(self.pipe(Effect.scoped), options)