using documentMode with typescript
<p>I check if the browser is ie by:</p>

<pre><code>function isBrowserIE() {
  return window.document.documentMode;
}
</code></pre>

<p>Typescript raises an error:</p>

<blockquote>
  <p>Error TS2339: Property 'documentMode' does not exist on type 'Document'.</p>
</blockquote>

<p>This is due to the <a href="https://github.com/Microsoft/TypeScript/wiki/Breaking-Changes" rel="noreferrer">change</a> made in typescript compiler at version 1.5 : </p>

<blockquote>
  <p>Properties documentMode, parentWindow, createEventObject are removed from type Document</p>
</blockquote>

<p>How can i get rid from the error?</p>