title: Is there ever a reason to use the declare keyword in front of types and interfaces?
body: <p>I have come across some code like this:</p>
  
  <pre><code>declare type A = { ... };
  declare interface B { ... }
  </code></pre>
  
  <p>From searching for the <code>declare</code> keyword (and none of the hits pointed to me the TypeScript docs for some reason), <code>declare</code> is used when a variable exists in JavaScript and you need to reference it from TypeScript, so you declare to the compiler that this variable indeed exists.</p>
  
  <p>All examples I have found that use this keyword use it like this: <code>declare var a;</code></p>
  
  <p>Why would I ever use it in front of a <code>type</code> or <code>interface</code>? Based on my understanding of <code>declare</code>, it is completely useless to do so, but the compiler doesn't give me any errors.</p>