DEV Community

Discussion on: Parsing .env with TypeScript

Collapse
 
codeofarmz profile image
codeOfArmz

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.

Collapse
 
asjadanis profile image
Asjad Anis

Thanks for spotting that out its a typo