const { runtime, destroy } = Effect.runSync(
Effect.gen(function* ($) {
const scope = yield* $(Scope.make());
const runtime = yield* $(
Layer.toRuntime(appLayer),
Scope.extend(scope),
);
return {
runtime,
destroy: Scope.close(scope, Exit.unit),
};
}),
);
const { runtime, destroy } = Effect.runSync(
Effect.gen(function* ($) {
const scope = yield* $(Scope.make());
const runtime = yield* $(
Layer.toRuntime(appLayer),
Scope.extend(scope),
);
return {
runtime,
destroy: Scope.close(scope, Exit.unit),
};
}),
);