I think you should export sanitizedConfig instead of export default verifiedConfig.
Also, rather than maintaining those two, almost identical interfaces, one could use export type Config = Required<ENV>. Otherwise, a fantastic post! This solution should be part of a dotenv-ts package.
I think you should export
sanitizedConfig
instead ofexport default verifiedConfig
.Also, rather than maintaining those two, almost identical interfaces, one could use
export type Config = Required<ENV>
. Otherwise, a fantastic post! This solution should be part of a dotenv-ts package.Thanks for spotting that out its a typo