Augmentations for the global scope can only be directly nested in external modules or ambient module declarations(2669)

You can indicate that the file is a module like so:

export {};

declare global {
    namespace NodeJS {
        interface Global {
            config: MyConfigType
        }
    }
}

Leave a Comment