Загрузка видео...

Не удалось загрузить видео

На главную

⚡️ 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 просмотров • 1 год назад •via X (Twitter)

Комментарии: 8

Фото профиля The Solomon
The Solomon1 год назад

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

Фото профиля ahmed
ahmed1 год назад

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

Фото профиля Antonio Passarelli
Antonio Passarelli1 год назад

works on WebStorm as well 😍 nice one!!!

Фото профиля Shelton Louis
Shelton Louis1 год назад

Or you could use this!

Фото профиля Denis
Denis1 год назад

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

Фото профиля Maurice Wipf
Maurice Wipf1 год назад

Great, thanks a lot!

Фото профиля Enoch Klu
Enoch Klu1 год назад

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

Фото профиля an lê xuân
an lê xuân1 год назад

Is there any same thing with Golang

Похожие видео