Video wird geladen...
Video konnte nicht geladen werden
⚡️ 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 Aufrufe • vor 1 Jahr •via X (Twitter)
8 Kommentare

The Solomonvor 1 Jahr
You still have to declare it at two places though. 😅

ahmedvor 1 Jahr
Nice but I think it's better to use zod to validate at runtime + have type safery.

Antonio Passarellivor 1 Jahr
works on WebStorm as well 😍 nice one!!!

Shelton Louisvor 1 Jahr
Or you could use this!

Denisvor 1 Jahr
I am using zod, but will give it a try 👍

Maurice Wipfvor 1 Jahr
Great, thanks a lot!

Enoch Kluvor 1 Jahr
This is a great tip! But why does adding `export {}` enable the code completion?

an lê xuânvor 1 Jahr
Is there any same thing with Golang
