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 c4b902b110 - Show all commits

View File

@@ -1,4 +1,4 @@
import { Effect, Exit, Fiber, Layer, ManagedRuntime, Ref, Runtime, Scope, Stream, SubscriptionRef } from "effect" import { Effect, Fiber, Layer, ManagedRuntime, Ref, Runtime, Scope, Stream, SubscriptionRef } from "effect"
import React from "react" import React from "react"
@@ -26,36 +26,6 @@ export class Reffuse<R, ER> {
} }
useRunSync<A, E>(effect: Effect.Effect<A, E, R>): A {
return this.useRuntime().runSync(effect)
}
useRunSyncExit<A, E>(effect: Effect.Effect<A, E, R>): Exit.Exit<A, ER | E> {
return this.useRuntime().runSyncExit(effect)
}
useRunPromise<A, E>(
effect: Effect.Effect<A, E, R>,
options?: { readonly signal?: AbortSignal },
): Promise<A> {
return this.useRuntime().runPromise(effect, options)
}
useRunPromiseExit<A, E>(
effect: Effect.Effect<A, E, R>,
options?: { readonly signal?: AbortSignal },
): Promise<Exit.Exit<A, ER | E>> {
return this.useRuntime().runPromiseExit(effect, options)
}
useRunFork<A, E>(
self: Effect.Effect<A, E, R>,
options?: Runtime.RunForkOptions,
): Fiber.RuntimeFiber<A, ER | E> {
return this.useRuntime().runFork(self, options)
}
useFork<A, E>( useFork<A, E>(
self: Effect.Effect<A, E, R | Scope.Scope>, self: Effect.Effect<A, E, R | Scope.Scope>,
deps?: React.DependencyList, deps?: React.DependencyList,