(self: Micro<A, E, R>)
| 3425 | * @category resources & finalization |
| 3426 | */ |
| 3427 | export const scoped = <A, E, R>(self: Micro<A, E, R>): Micro<A, E, Exclude<R, MicroScope>> => |
| 3428 | suspend(() => { |
| 3429 | const scope = new MicroScopeImpl() |
| 3430 | return onExit(provideService(self, MicroScope, scope), (exit) => scope.close(exit)) |
| 3431 | }) |
| 3432 | |
| 3433 | /** |
| 3434 | * Create a resource with a cleanup `Micro` effect, ensuring the cleanup is |