Cleanup
This commit is contained in:
@@ -23,33 +23,13 @@ export const TRPCEffectRuntimeLive = Layer.effect(TRPCEffectRuntime,
|
|||||||
|
|
||||||
export const t = initTRPC.create()
|
export const t = initTRPC.create()
|
||||||
|
|
||||||
// export const run = <
|
|
||||||
// Args extends unknown[],
|
|
||||||
// A, E, R
|
|
||||||
// >(
|
|
||||||
// program: (...args: Args) => Effect.Effect<A, E, R>
|
|
||||||
// ) => FiberSet.makeRuntime<R>().pipe(
|
|
||||||
// Effect.map(runFork =>
|
|
||||||
// (...args: Args) => runFork(program(...args))
|
|
||||||
// )
|
|
||||||
// )
|
|
||||||
|
|
||||||
const testRouter = Effect.gen(function*() {
|
const testRouter = Effect.gen(function*() {
|
||||||
const run = yield* TRPCEffectRuntime
|
const run = yield* TRPCEffectRuntime
|
||||||
|
|
||||||
return t.router({
|
return t.router({
|
||||||
// test1: t.procedure.query(
|
test1: t.procedure.query(() => run(Effect.gen(function*() {
|
||||||
// yield* run((opts) => Effect.gen(function*() {
|
|
||||||
// const todos = yield* TodoRepository
|
|
||||||
// return "test"
|
|
||||||
// }))
|
|
||||||
// ),
|
|
||||||
|
|
||||||
test1: t.procedure.query(
|
|
||||||
(opts) => run(Effect.gen(function*() {
|
|
||||||
const todos = yield* TodoRepository
|
const todos = yield* TodoRepository
|
||||||
return "test"
|
return "test"
|
||||||
}))
|
}))),
|
||||||
),
|
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -19,4 +19,6 @@ export const ServerLive = Layer.scopedDiscard(Effect.gen(function*() {
|
|||||||
server.close()
|
server.close()
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
}))
|
})).pipe(
|
||||||
|
Layer.provide(ExpressLive)
|
||||||
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user