function scoped
thefrontside/effectionfunction scoped<T>(operation: () => Operation<T>): Operation<T>
Encapsulate an operation so that no effects will persist outside of it. All active effects such as concurrent tasks and resources will be shut down, and all contexts will be restored to their values outside of the scope.
Type Parameters
T
Parameters
operation: () => Operation<T>
- the operation to be encapsulated
Return Type
Operation<T>
the scoped operation