Skip to content

Commit

Permalink
fix Layer.scope types to correctly use the Scope tag identifier (#4351)
Browse files Browse the repository at this point in the history
  • Loading branch information
tim-smart authored Jan 27, 2025
1 parent 502223a commit 430c846
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/red-spiders-divide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"effect": patch
---

fix Layer.scope types to correctly use the Scope tag identifier
2 changes: 1 addition & 1 deletion packages/effect/src/Layer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -648,7 +648,7 @@ export const retry: {
* @since 2.0.0
* @category constructors
*/
export const scope: Layer<Scope.CloseableScope> = internal.scope
export const scope: Layer<Scope.Scope> = internal.scope

/**
* Constructs a layer from the specified scoped effect.
Expand Down
2 changes: 1 addition & 1 deletion packages/effect/src/internal/layer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -874,7 +874,7 @@ export const scopedContext = <A, E, R>(
}

/** @internal */
export const scope: Layer.Layer<Scope.Scope.Closeable> = scopedContext(
export const scope: Layer.Layer<Scope.Scope> = scopedContext(
core.map(
fiberRuntime.acquireRelease(
fiberRuntime.scopeMake(),
Expand Down

0 comments on commit 430c846

Please sign in to comment.