@@ -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,
|
||||||
|
|||||||
Reference in New Issue
Block a user