Effect CommunityEC
Effect Community16mo ago
15 replies
jrmdayn

Trouble Decoding Option.none() with Effect Schema in TypeScript

I am struggling with this error from the code below:
import { Schema } from "@effect/schema"
import { Option } from "effect"

const s = Schema.Option(Schema.Number)

Schema.decodeSync(s)(Option.none())


Playground here.

If I Schema.encodeSync beforehand it works, but still, Option.none() is an object that has a _tag so I would think that it works like that too.. no?
image.png
Was this page helpful?