Questions about Schema Validation and Error Messages in Effect Typescript Library

Hi there. I'm having 2 1 burning question about this code:

1. Why Schema.validate is returning an Either when the docs states:
declare const validate: <A, I, R>(
  schema: Schema<A, I, R>,
  options?: ParseOptions
) => (u: unknown, overrideOptions?: ParseOptions) => Effect.Effect<A, ParseResult.ParseError, R>


2. Why the error message says Expected undefined, actual 1.234 when it expects either
undefined
or number?


Link to the playground: https://effect.website/play/#b84a9a08ae93
image.png
Was this page helpful?