正在加载视频...
视频加载失败
⚡️ 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 👇
8 条评论

The Solomon1 年前
You still have to declare it at two places though. 😅

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

Antonio Passarelli1 年前
works on WebStorm as well 😍 nice one!!!

Shelton Louis1 年前
Or you could use this!

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

Maurice Wipf1 年前
Great, thanks a lot!

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

an lê xuân1 年前
Is there any same thing with Golang
