Minor Changes
-
#2101
54ddbb7
Thanks @github-actions! - Updated theMessageAnnotation
type to accept aParseIssue
; it's now(issue: ParseResult.ParseIssue) => string
to support custom error messages, which can be triggered under any circumstances.You can retrieve the actual value by accessing the
actual
property of theissue
object:import * as S from "@effect/schema/Schema"; const schema = S.string.pipe( S.filter((s): s is string => s.length === 1, { - message: (actual) => `invalid value ${actual}`, + message: (issue) => `invalid value ${issue.actual}`, }) );
-
#2101
a025b12
Thanks @github-actions! - Swap type params of Either fromEither<E, A>
toEither<R, L = never>
.Along the same line of the other changes this allows to shorten the most common types such as:
import { Either } from "effect"; const right: Either.Either<string> = Either.right("ok");
Patch Changes
-
#2193
b9cb3a9
Thanks @jessekelly881! - added Number.parse, BigInt.toNumber, ParseResult.fromOption -
#2101
136ef40
Thanks @github-actions! - Equivalence: returnEqual.equals
instead ofEquivalence.strict()
as default -
#2101
f24ac9f
Thanks @github-actions! - add support forEquivalence
to class APIs -
Updated dependencies [
5de7be5
,489fcf3
,7d9c3bf
,d8d278b
,14c5711
,5de7be5
,b9cb3a9
,585fcce
,93b412d
,55b26a6
,a025b12
,2097739
]:- effect@2.4.0