process.env is of type ProcessEnv with this definition:
export interface ProcessEnv {
[key: string]: string | undefined;
}
I'd like to augment this TypeScript interface so that it contains the keys specific to my app, so that the result is something like:
export interface ProcessEnv {
MY_VARIABLE_1: string;
MY_OTHER_VARIABLE: string;
[key: string]: string | undefined;
}
I cannot find a way to do it, I guess it will be declare module or declare namespace somewhere but cannot find a specific way to achieve this.
[key:string]:stringany more specific.as? Or you want a cleaner solution ?declare namespace ...) so that when I doprocess.env., the IDE suggests my custom variables.