const scope = Effect.runSync(Scope.make());
const runtime = pipe(
//
Layer.toRuntime(AppLiveLayer),
Effect.provideService(Scope.Scope, scope),
Effect.cached,
Effect.runSync
);
export const stitch = <R extends Env, E, A>(self: Effect.Effect<R, E, A>) => {
return pipe(
Effect.runFork(runtime),
Fiber.map(Runtime.runFork),
Fiber.mapFiber((_) => _(Effect.either(self))),
Effect.fromFiberEffect
);
};
const scope = Effect.runSync(Scope.make());
const runtime = pipe(
//
Layer.toRuntime(AppLiveLayer),
Effect.provideService(Scope.Scope, scope),
Effect.cached,
Effect.runSync
);
export const stitch = <R extends Env, E, A>(self: Effect.Effect<R, E, A>) => {
return pipe(
Effect.runFork(runtime),
Fiber.map(Runtime.runFork),
Fiber.mapFiber((_) => _(Effect.either(self))),
Effect.fromFiberEffect
);
};