title: Changing a property modifier when merging an interface
body: <p>The Window interface has a few properties that are readonly:</p>
  
  <pre><code>interface Window extends ... {
    // ...
    readonly innerHeight: number;
    readonly innerWidth: number;
    // ...
  }
  </code></pre>
  
  <p>I get that those cannot really be changed, but in my unit tests, I'm changing the values of the object to simulate the changes. And it's an object of that type.</p>
  
  <p>Is there a way I can augment that type in a custom d.ts file and change these properties modifiers? </p>
  
  <p>I tried to just create a .d.ts file with this:</p>
  
  <pre><code>interface Window {
    innerHeight: number;
    innerWidth: number;
  }
  </code></pre>
  
  <p>But the compiler is complaining with:</p>
  
  <p>All declarations of 'innerWidth' must have identical modifiers.</p>