Question
What is 'declare global' in Typescript?
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<T> { }
}