Helper Method for Replacing Fields Based on Previous Values in Effect Typescript

Is there a helper method do replace fields (ideally based on the previous value of the field?)

const MySchema = Schema.Struct({
  hello: Schema.String
})

const MySchema2 = MySchema.pipe(
  Schema.omit("hello"),
  Schema.extend(Schema.Struct(
    {
      hello: Schema.NullOr(MySchema.fields.hello)
    }
  ))
)
Was this page helpful?