Loading video...
Video Failed to Load
⚡️ Pro Tip: Supercharge process.env with TypeScript! Unlock the power of typed .env files and enjoy seamless code completion in TypeScript. 😱 All you need is a simple environment.d.ts with a few lines of code 👇
11,555 views • 1 year ago •via X (Twitter)
8 Comments

The Solomon1 year ago
You still have to declare it at two places though. 😅

ahmed1 year ago
Nice but I think it's better to use zod to validate at runtime + have type safery.

Antonio Passarelli1 year ago
works on WebStorm as well 😍 nice one!!!

Shelton Louis1 year ago
Or you could use this!

Denis1 year ago
I am using zod, but will give it a try 👍

Maurice Wipf1 year ago
Great, thanks a lot!

Enoch Klu1 year ago
This is a great tip! But why does adding `export {}` enable the code completion?

an lê xuân1 year ago
Is there any same thing with Golang
