Skip to content

Instantly share code, notes, and snippets.

@adrienjoly
Last active September 8, 2021 13:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adrienjoly/c21cf1f290241a8eb45d7de072162cd9 to your computer and use it in GitHub Desktop.
Save adrienjoly/c21cf1f290241a8eb45d7de072162cd9 to your computer and use it in GitHub Desktop.
This shows how to type and extend Node.js-native's `process`
/// <reference types="node" />
declare namespace NodeJS {
export interface ProcessEnv {
NODE_ENV: 'development' | 'production' | undefined;
}
export interface Process {
env: ProcessEnv
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment