Video wird geladen...

Video konnte nicht geladen werden

Zur Startseite

⚡️ 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

Profilbild von The Solomon
The Solomonvor 1 Jahr

You still have to declare it at two places though. 😅

Profilbild von ahmed
ahmedvor 1 Jahr

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

Profilbild von Antonio Passarelli
Antonio Passarellivor 1 Jahr

works on WebStorm as well 😍 nice one!!!

Profilbild von Shelton Louis
Shelton Louisvor 1 Jahr

Or you could use this!

Profilbild von Denis
Denisvor 1 Jahr

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

Profilbild von Maurice Wipf
Maurice Wipfvor 1 Jahr

Great, thanks a lot!

Profilbild von Enoch Klu
Enoch Kluvor 1 Jahr

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

Profilbild von an lê xuân
an lê xuânvor 1 Jahr

Is there any same thing with Golang

Ähnliche Videos