Skip to content

Commit f819c3f

Browse files
committed
Move path to context object and updat InvalidType error
1 parent a475131 commit f819c3f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+704
-1020
lines changed

IDEAS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
- Fix refinement on union schema which also uses `S.to`
1010
- TS API: Removed `S.transform` in favor of `S.to`
1111
- Add `S.uint8Array` and `S.enableUint8Array`
12+
- Updated `InvalidType` error code to include the received schema
1213

1314
### TS
1415

packages/sury/src/S.resi

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,12 @@ and error = private {
256256
and errorCode =
257257
| OperationFailed(string)
258258
| InvalidOperation({description: string})
259-
| InvalidType({expected: schema<unknown>, received: unknown, unionErrors?: array<error>})
259+
| InvalidType({
260+
expected: schema<unknown>,
261+
received?: schema<unknown>,
262+
value: unknown,
263+
unionErrors?: array<error>,
264+
})
260265
| FailedTransformation({from: schema<unknown>, to: schema<unknown>, error: exn})
261266
| UnsupportedTransformation({from: schema<unknown>, to: schema<unknown>})
262267
| ExcessField(string)

0 commit comments

Comments
 (0)