jamesfoleyJ
Denoβ€’15mo ago
jamesfoley

Using TypeScript with .env file

I was wondering if anyone could point me in the direction of resources that would guide me through the process of creating type safe environmental variables for a Deno project. I am using the @std/dotenv library to read the vars but how to make them type safe.

What would be considered best practice? Should I use Zod or can I extend an existing type/interface that exists?

Your help is gratefully appreciated.
Was this page helpful?