Setting Default Value for Optional Field based on Required Fields in TypeScript Schema Class
hey there! I have this schema, where
I would like to make the default value of
name is optional and the other two fields are requiredI would like to make the default value of
name be ${referenceYear}/${referenceSemester} if name is not present when I call Round.make, but I could not find a way to do it using Schema.optionalWith. I'm not sure if that should be done with encode/decode or if there's something specific for this scenario. Can anyone help me on that?