title: TypeScript cast using "as"
body: <p>I was trying to cast a type <code>any</code> to boolean. So I simply did this: </p>
  
  <pre><code>let a = (&lt;any&gt;myType) as boolean;
  </code></pre>
  
  <p>But <code>a</code> was not a boolean it just contains <code>myType</code> value.
  However When I try this:</p>
  
  <pre><code>let b = Boolean(myType);
  </code></pre>
  
  <p><code>b</code> returns a boolean which is false.</p>
  
  <p>Am I missing something about "as" casting?</p>
  
  <p>Which one is correct to cast to boolean?</p>