This commit is contained in:
Julien Valverdé
2024-07-05 01:23:58 +02:00
parent cb0973b5ed
commit d875652142
5 changed files with 22 additions and 31 deletions

View File

@@ -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)
)
)
}