What is 'declare global' in TypeScript?
08:19 15 Jul 2019

What is declare global and how is it possible? I found this code inside Lodash typings. The problem is that when I try to replicate this into my.d.ts file exactly since global is not a namespace, module, function or var, I'm not allowed to do it. So question is how this declaration is possible in Typescript.

PS: so maybe there are some additional compiler options which will allow this?

declare global {
    interface Set { }
}
typescript typescript-typings