Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>TS Env TypingsNew to Visual Studio Code? Get it now.
TS Env Typings

TS Env Typings

Yassin Eldeeb

|
1,712 installs
| (3) | Free
Automatically generate typings for process.env from your env file on save.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

env-typings README

TS Env Typings is an extension to auto generate Typescript typings for your env variables from your development .env file everytime you save the specefied file.

Showoff

Setup

1- Specify "env-typings.json" file in the root of your project.

2- Add "path" field to your dev .env file.

Config File

That's it enjoy your auto generated typings from your .env file everytime you hit save.

Features

1- Specify path for the generated output

2- auto detect env variable type so that It can give you a nice example in the intellisense on how to use and parse it.

Auto Detect Type

3- Variants for an env variable

Variants

  • add a comment at the end of the env line that includes "# variants:"
  • specify the different variants for your variable seperated by a "|" like you would in typscript
  • quotes are optional around the variants values.
NODE_ENV='development' # variants: "development" | "production" | "testing"

Requirements

  • Typescript Project
  • @types/node installed

Enjoy!

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft