Patch Changes
-
#3192
5d5cc6c
Thanks @KhraksMamtsov! - SupportCapitalize
Uncapitalize
filters and schemas -
#3148
359ff8a
Thanks @gcanti! - addSerializable.Serializable.Type
andSerializable.Serializable.Encoded
-
#3198
f7534b9
Thanks @gcanti! - AddtoString
toAST.PropertySignature
andAST.IndexSignature
and fix type display for IndexSignature.Before the Change
Previously, when a type mismatch occurred in
Schema.decodeUnknownSync
, the error message displayed forIndexSignature
was not accurately representing the type used. For example:import { Schema } from "@effect/schema"; const schema = Schema.Record(Schema.Char, Schema.String); Schema.decodeUnknownSync(schema)({ a: 1 }); /* throws ParseError: { readonly [x: string]: string } └─ ["a"] └─ Expected string, actual 1 */
This output incorrectly indicated
[x: string]
when the actual index type wasChar
.After the Change
The
toString
implementation now correctly reflects the type used inIndexSignature
, providing more accurate and informative error messages:import { Schema } from "@effect/schema"; const schema = Schema.Record(Schema.Char, Schema.String); Schema.decodeUnknownSync(schema)({ a: 1 }); /* throws ParseError: { readonly [x: Char]: string } └─ ["a"] └─ Expected string, actual 1 */
The updated output now correctly displays
{ readonly [x: Char]: string }
, aligning the error messages with the actual data types used in the schema. -
Updated dependencies [
a435e0f
,b5554db
,a9c4fb3
]:- effect@3.4.8