I would like to store my NodeJS config in the global scope.
I tried to follow this => Extending TypeScript Global object in node.js and other solution on stackoverflow,
You can indicate that the file is a module like so:
export {}; declare global { namespace NodeJS { interface Global { config: MyConfigType } } }
Or if you're trying to add a global type within the browser context:
export {}; declare global { interface Window { ENV: any; } }