anyone has an idea on how to do that, i'
anyone has an idea on how to do that, i'm a bit stuck on this one :/
also looking into a different approach where i could defined a schema and later on extend the fields of that schema to make them optional.
const origin = S.Struct({ name: S.String, state: S.String.pipe(S.minLength(1), S.maxLength(23)) }) // { name:string; state: string }
const later = ...do something maybe something with extends or origin.fields? // { name?:string; state?: string }
tried this
but i loose the types and makes my eyes bleed a bit too
also looking into a different approach where i could defined a schema and later on extend the fields of that schema to make them optional.
const origin = S.Struct({ name: S.String, state: S.String.pipe(S.minLength(1), S.maxLength(23)) }) // { name:string; state: string }
const later = ...do something maybe something with extends or origin.fields? // { name?:string; state?: string }
tried this
but i loose the types and makes my eyes bleed a bit too
