RPC work
This commit is contained in:
@@ -1,19 +0,0 @@
|
||||
import { Context, Effect, Layer, Runtime } from "effect"
|
||||
import type { RuntimeFiber } from "effect/Fiber"
|
||||
import type { Services } from "../Services"
|
||||
|
||||
|
||||
export class TRPCEffectRuntime extends Context.Tag("TRPCEffectRuntime")<TRPCEffectRuntime,
|
||||
<A, E>(
|
||||
self: Effect.Effect<A, E, Services>,
|
||||
options?: Runtime.RunForkOptions,
|
||||
) => RuntimeFiber<A, E>
|
||||
>() {}
|
||||
|
||||
export module TRPCEffectRuntime {
|
||||
export const Live = Layer.effect(TRPCEffectRuntime,
|
||||
Effect.runtime<Services>().pipe(
|
||||
Effect.map(Runtime.runFork)
|
||||
)
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user