News for hackers. Stuff that matters.
Re:An introduction to type programming in TypeScript by WorldMaker on Wednesday February 02, 2022 @01:03PM (#30181341)
Rather than declaring it yourself every time, there is an @types/node you can install with all of the Node-specific types including process.env:

https://www.npmjs.com/package/@types/node

(ETA: It's mentioned in the StackOverflow and they still add an extra definition on top of it, but the env in the types today is a Record and you don't have to do it, you just won't get auto-completion on the names.)

There are no comments on this comment yet.