title: Why does TypeScript's 'declare global' cause ESLint error?
body: <p>So, I have this global interface Window at the top of the .ts file: </p>
  
  <pre><code>declare global {
      interface Window {myOwnName: string;}
  }
  </code></pre>
  
  <p>I need this because I want to assign new values to the window property.</p>
  
  <p>Code works, but ESLint gives me this error: <strong>Parsing error, unexpected token.</strong></p>
  
  <p><a href="https://i.stack.imgur.com/xn8Ln.png" rel="noreferrer"><img src="https://i.stack.imgur.com/xn8Ln.png" alt="Screenshot"></a></p>
  
  <p>Any ideas how to fix this? In my eslint.json config I do use such configuration:</p>
  
  <pre><code>config = {
      common: {
          settings: {
              'parser': '@typescript-eslint/parser',
              'plugins': [
                  '@typescript-eslint',
                  'import'
              ],
              'rules': {
                  'import/no-unresolved': 'error'
              },
              'import/resolver': {
                  'typescript': {},
                  'node': {
                      'moduleDirectory': [
                          'node_modules/',
                          'src/',
                          'proto/gen/'
                      ]
                  }
              }
          }
      }
  }
  </code></pre>
  
  <p>Thanks for help!</p>