title: Typescript Error? or just typescript checking is not perfect?
body: <p>I recently started to write typescript but have years experience with JS.</p>
  
  <hr>
  
  <p><strong>Example 1</strong></p>
  
  <p>Then while development I found that</p>
  
  <pre><code>const A : B = class B {}
  </code></pre>
  
  <p>Above will throw warning of "Cannot fine name'B'".</p>
  
  <p>However, this will not.</p>
  
  <pre><code>class B {}
  
  const A : B = B ;
  </code></pre>
  
  <p><strong>Example 2</strong></p>
  
  <p>The other example is</p>
  
  <pre><code>class B {}
  
  const A : B = B ;
  
  const C : A = A ;
  </code></pre>
  
  <p>This will throw warning of "Cannot fine name'A'"</p>
  
  <hr>
  
  <p>The result, tsc checking seems like only can recognize anything start from "class".</p>
  
  <p>In JS perspective there is nothing wrong. Even compile with all of them will work....</p>
  
  <p>So my question is, I am thinking this is just the tsc checking not good enough...., however, if I bypass this will lose the meaning of type checking, therefore I can only compromise my writing style probably need to drop it down.</p>
  
  <p>Can you provide me some advise if I am wrong? or if there another reason for the error?</p>