( self: Client.HttpClient.With<E, R> )
| 365 | |
| 366 | /** @internal */ |
| 367 | export const withScope = <E, R>( |
| 368 | self: Client.HttpClient.With<E, R> |
| 369 | ): Client.HttpClient.With<E, R | Scope.Scope> => |
| 370 | transform( |
| 371 | self, |
| 372 | (effect, request) => { |
| 373 | const controller = new AbortController() |
| 374 | scopedRequests.set(request, controller) |
| 375 | return Effect.zipRight( |
| 376 | Effect.scopeWith((scope) => Scope.addFinalizer(scope, Effect.sync(() => controller.abort()))), |
| 377 | effect |
| 378 | ) |
| 379 | } |
| 380 | ) |
| 381 | |
| 382 | export const { |
| 383 | /** @internal */ |
nothing calls this directly
no test coverage detected