Skip to content

Commit

Permalink
Fix transformOrFail and transformOrFailFrom signatures in the exp… (
Browse files Browse the repository at this point in the history
  • Loading branch information
gcanti committed Apr 17, 2024
1 parent 55c7f34 commit b2b5d66
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/soft-cows-sell.md
@@ -0,0 +1,5 @@
---
"@effect/schema": patch
---

Fix `transformOrFail` and `transformOrFailFrom` signatures in the exported `Class` interface by adding the missing `annotations` optional argument
6 changes: 4 additions & 2 deletions packages/schema/src/Schema.ts
Expand Up @@ -6249,7 +6249,8 @@ export interface Class<Self, Fields extends Struct.Fields, A, I, R, C, Inherited
options: ParseOptions,
ast: AST.Transformation
) => Effect.Effect<A, ParseResult.ParseIssue, R3>
}
},
annotations?: Annotations.Schema<Transformed>
) => [Transformed] extends [never] ? MissingSelfGeneric<"Base.transform">
: Class<
Transformed,
Expand Down Expand Up @@ -6279,7 +6280,8 @@ export interface Class<Self, Fields extends Struct.Fields, A, I, R, C, Inherited
options: ParseOptions,
ast: AST.Transformation
) => Effect.Effect<I, ParseResult.ParseIssue, R3>
}
},
annotations?: Annotations.Schema<Transformed>
) => [Transformed] extends [never] ? MissingSelfGeneric<"Base.transformFrom">
: Class<
Transformed,
Expand Down

0 comments on commit b2b5d66

Please sign in to comment.