Effect-TS / schema

Modeling the schema of data structures as first-class values

Home Page:https://effect.website

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Small correction in the DefaultValues part of the Optional fields section

parischap opened this issue Β· comments

πŸ“– Documentation

I think this line:

const schema = S.struct({ a. S.optional(S.number).withDefault(() => 0) });

should be replaced by:

const schema = S.struct({ a: S.optional(S.number).withDefault(() => 0) });