Type Error with Schema.optionalWith in Effect Typescript Library
Is this a bug with Schema.optionalWith? I wouldn't expect a type error from this
https://effect.website/play/#809ca427d111
https://effect.website/play/#809ca427d111
import { type Schema, Schema as S } from "effect"
const MySchema: Schema.Schema<MySchemaType> = S.Struct({
id: S.String,
fieldWithDefault: S.optionalWith(S.Boolean, { default: () => true })
})
type MySchemaType = Readonly<{
id: string
fieldWithDefault: boolean
}>