Skip to content

Commit

Permalink
Fix WebSdk.layer not infering properly due to R and A type args being…
Browse files Browse the repository at this point in the history
… swapped (#3874)

Co-authored-by: Tim <[email protected]>
  • Loading branch information
jbmusso and tim-smart authored Oct 31, 2024
1 parent 6306e66 commit c348b4a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/hip-needles-smile.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@effect/opentelemetry": patch
---

Fix WebSdk.layer not properly infering when passing an evaluate argument of type Effect
4 changes: 2 additions & 2 deletions packages/opentelemetry/src/WebSdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ export const layerTracerProvider = (
*/
export const layer: {
(evaluate: LazyArg<Configuration>): Layer.Layer<Resource.Resource>
<R, E>(evaluate: Effect.Effect<R, E, Configuration>): Layer.Layer<Resource.Resource, E, R>
<E, R>(evaluate: Effect.Effect<Configuration, E, R>): Layer.Layer<Resource.Resource, E, R>
} = (
evaluate: LazyArg<Configuration> | Effect.Effect<any, any, Configuration>
evaluate: LazyArg<Configuration> | Effect.Effect<Configuration, any, any>
): Layer.Layer<Resource.Resource> =>
Layer.unwrapEffect(
Effect.map(
Expand Down

0 comments on commit c348b4a

Please sign in to comment.