<p dir="auto">Hello,</p>
<p dir="auto">Here is my code:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="let value: any
 if (value instanceof MyClass) {
     // value is any. needs to typecast like this to get intellisense working:
     (&lt;MyClass&gt;value).prop=true;
}"><pre class="notranslate"><code class="notranslate">let value: any
 if (value instanceof MyClass) {
     // value is any. needs to typecast like this to get intellisense working:
     (&lt;MyClass&gt;value).prop=true;
}
</code></pre></div>
<p dir="auto">It would be great to support this feature.</p>
<p dir="auto">Thanks in advance and I hope this could help others.</p>
<p dir="auto">I am using the following example that I took directly from the blog post (<a href="http://blogs.msdn.com/b/typescript/archive/2014/11/18/what-s-new-in-the-typescript-type-system.aspx" rel="nofollow">http://blogs.msdn.com/b/typescript/archive/2014/11/18/what-s-new-in-the-typescript-type-system.aspx</a>)</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="var x: any = &quot;foo&quot;;
if(typeof x === 'string') {
   console.log(x.subtr(1)); // Error, 'subtr' does not exist on 'string'
}
// x is still any here
x.unknown(); // OK"><pre class="notranslate"><code class="notranslate">var x: any = "foo";
if(typeof x === 'string') {
   console.log(x.subtr(1)); // Error, 'subtr' does not exist on 'string'
}
// x is still any here
x.unknown(); // OK
</code></pre></div>
<p dir="auto">I am not seeing the error or intellisense for the console.log statement.</p>
<p dir="auto">Are type guards actually supported in this case or only for union types?</p>