Conditional Configuration Validation in Effect Typescript

How can I make Config one or another (or some of its values)? I'd like to have something like "if BACKEND_URL is not defined then use BACKEND_PORT, but both can't be set".

const validateConfig = Config.all({
  BACKEND_PORT: Config.integer('BACKEND_PORT'),
  BACKEND_URL: Config.url('BACKEND_URL'),
})
Was this page helpful?