Last active
September 8, 2021 13:28
-
-
Save adrienjoly/c21cf1f290241a8eb45d7de072162cd9 to your computer and use it in GitHub Desktop.
This shows how to type and extend Node.js-native's `process`
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <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